Request an invite
Docs menu

osmates remote token create

Make a token for an MCP client on this Mac, and print it once.

Usage
osmates remote token create [<options>] <name>

The token is shown this once: OSMates keeps only its SHA-256. Give it to the client as Authorization: Bearer <token>. Its sessions list and may use the tools of --profile, and the client asks you before it uses a machine, as osmates mcp's clients do. A token works on this Mac only.

Arguments

<name>Required

A name you know the client by, shown when it asks and in the trail.

--profile <profile>

The tools its sessions may list and call: read-only, operator or full.

One of read-only, operator, full.

Default: operator

--days <days>

Days until it expires, 1 to 365; without it, it lasts until revoked.

--json

Print machine-readable JSON.

JSON output

With --json, it prints an object with these fields.

JSON Schema: /schemas/0/cli/remote/token/create.json

secretstringRequired
tokenobjectRequired
token.createdAtstring (date-time)Required
token.expiresAtstring (date-time)
token.idstringRequired
token.lastUsedAtstring (date-time)
token.namestringRequired
token.profilestringRequired

One of read-only, operator, full.

Exit statuses

Its exit status is one of these.

StatusMeaning
0The command did what it was asked.
1The command failed; with --json, standard error's last line is the error object.
64The command line is wrong, as ArgumentParser found before the command ran.
65What was given is wrong, found while the command ran; the same command fails until it changes.
75The same command can work later with nothing changed, as while an update finishes.
130Control-C cancelled what the command started.

Report a problem with this page