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 is idempotent: it returns the existing
token rather than minting a new one, so previously issued share URLs
keep working. To rotate the token, run note unshare first and then
share again. The response contains both the raw token and the
relative share URL for convenience. The deployment must be running the
share server (-share-port / SHARE_PORT); without it the command
fails with HTTP 503 and no token is minted.
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
| Flag | Type | Default | Description |
|---|---|---|---|
--json | bool | false | Output raw JSON |
--no-header | bool | false | Omit table headers |
--page | int | 1 | Page number for list commands (default page size: 50) |
--quiet | bool | false | Only output IDs |
--server | string | http://localhost:8181 | mahresources 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