osmates remote token create
Make a token for an MCP client on this Mac, and print it once.
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>RequiredA 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.
--jsonPrint machine-readable JSON.
JSON output
With --json, it prints an object with these fields.
JSON Schema: /schemas/0/cli/remote/token/create.json
secretstringRequiredtokenobjectRequiredtoken.createdAtstring (date-time)Requiredtoken.expiresAtstring (date-time)token.idstringRequiredtoken.lastUsedAtstring (date-time)token.namestringRequiredtoken.profilestringRequiredOne of
read-only,operator,full.
Exit statuses
Its exit status is one of these.
| Status | Meaning |
|---|---|
| 0 | The command did what it was asked. |
| 1 | The command failed; with --json, standard error's last line is the error object. |
| 64 | The command line is wrong, as ArgumentParser found before the command ran. |
| 65 | What was given is wrong, found while the command ran; the same command fails until it changes. |
| 75 | The same command can work later with nothing changed, as while an update finishes. |
| 130 | Control-C cancelled what the command started. |