Skip to main content

mr note share

Generate a share token for a note, making it readable via the public /s/<token> share URL without authentication. Calling share on a note that is already shared rotates the token, invalidating any previous share URL. The response contains both the raw token and the relative share URL for convenience.

Usage

mr note share <id>

Positional arguments:

  • <id>

Examples

Share note 42 and print the share URL

mr note share 42 --json | jq -r .shareUrl

Share and capture just the token for use elsewhere

TOKEN=$(mr note share 42 --json | jq -r .shareToken)

Flags

This command has no local flags.

Inherited global flags

FlagTypeDefaultDescription
--jsonboolfalseOutput raw JSON
--no-headerboolfalseOmit table headers
--pageint1Page number for list commands (default page size: 50)
--quietboolfalseOnly output IDs
--serverstringhttp://localhost:8181mahresources server URL (env: MAHRESOURCES_URL)

Output

Object with shareToken (string) and shareUrl (string path beginning with /s/)

Exit Codes

0 on success; 1 on any error

See Also