Gym Master in your terminal: the gymmaster command
Type gymmaster to chat with Gym Master AI on your real workspace data, like Claude Code or Codex. Plus developer subcommands: API calls, AI tools, API keys, webhooks, MCP.
Version 0.3.5 · GitHub
Install
curl -fsSL https://developers.gymmaster.vn/install.sh | shirm https://developers.gymmaster.vn/install.ps1 | iexbrew install nextx-organization/nextx/gymmasternpm install -g @gymmasterai/clinpm and Homebrew installs keep tokens in the OS keychain. The script install needs no Node.
Quick start
gymmaster login
gymmaster
gymmaster -p "yesterday's revenue by branch"
gymmaster doctorThe first gymmaster login opens your browser; over SSH, scan the QR code with the Gym Master app. gymmaster doctor checks network, clock, session and AI plan.
Log in
| Method | Command | Use when |
|---|---|---|
| Browser | gymmaster login --web | The machine has a browser (default) |
| QR code | gymmaster login --qr | SSH or headless servers — approve in the Gym Master app |
| Device code | gymmaster login --device | No browser and no app: enter a code on another device |
| API key | GYMMASTER_API_KEY=… gymmaster … | Scripts, read-only CI — an agent identity, no AI chat |
| CI OIDC | gymmaster login --ci | GitHub Actions / GitLab CI, no stored secret |
Sessions renew while used and expire after 30 idle days. Revoke them with gymmaster sessions or on the Devices page.
Chat
Run gymmaster to open it. / opens the command menu, @ attaches a file or picks an Agent, Shift+Tab cycles the permission mode, Esc stops an answer.
| Command | Meaning |
|---|---|
/help | Commands and shortcuts |
/new | New conversation (keeps workspace, agent) |
/resume [query] | Resume an earlier conversation |
/rename <name> | Rename this conversation |
/pin | Pin / unpin this conversation |
/workspace [code] | Switch workspace |
/agent [code] | Choose an Agent: general, sales, support… |
/mode read|propose|auto | Permission mode: read · propose · auto |
/model [name] | Switch model: Gym Master AI or your own |
/attach <file> | Attach an Excel / CSV / image / text file |
/pending | Writes waiting for confirmation |
/undo [id] | Undo the last write |
/journal | Journal of what the AI wrote |
/why [runId] | Why the AI answered that way (steps, tools) |
/memory | What the AI remembers — edit, lock, forget |
/schedule "question" daily 08:00 | Schedule a question daily / weekly / monthly |
/library | Images, documents and files the AI produced |
/export md|json [file] | Export the conversation to Markdown / JSON |
/tools | AI tools you can use (by your real permissions) |
/usage | AI turns this month |
/feedback up|down | Rate the last answer |
/support <problem> | Hand over to a support agent (ticket) |
/status | Account, workspace, environment, version |
/doctor | Check connectivity, clock, token, plan |
/config [key value] | Settings: language, color, update notices |
/init | Create GYMMASTER.md: instructions for this folder |
/mcp | Install the MCP server into another client |
/logout | Log out this profile |
/clear | Clear the screen (keeps the conversation) |
/exit | Exit |
Shortcuts
| Key | Meaning |
|---|---|
Enter · Shift+Enter (\ + Enter) | Send · new line |
/ | Command menu |
@ | Attach a file, pick an Agent for this message |
# | Quick note into this folder's GYMMASTER.md |
Shift+Tab | Cycle permission mode |
Esc | Stop the running answer |
Esc Esc | Edit the last message |
↑ / ↓ | Input history |
Ctrl+O | Expand / collapse steps |
Ctrl+L | Clear screen |
Ctrl+C · Ctrl+D | Clear input (twice to exit) · exit |
Permission modes and writes
| Mode | Normal write | Large write (delete, bulk > 20, permissions) | Finance |
|---|---|---|---|
| Read only | Never | Never | Never |
| Propose (default) | Change table + [y/N] | Type the count | Confirm in the app only |
| Auto-write normal | Written, undoable | Type the count | Confirm in the app only |
| No terminal (-p, CI) | Not written, prints how to confirm | Not written | Not written |
The server re-checks real permissions, the AI plan and the proposal's expiry on every write — the CLI is not the only gate.
Command reference
Generated from gymmaster help --json of the released version.
Flags for every command
| Flag | Meaning |
|---|---|
-v, --version | print the version |
-p, --print [question] | non-interactive: print the answer and exit (reads stdin too) |
-c, --continue | continue the last conversation |
-r, --resume [id] | resume a conversation (no id = pick from a list) |
-f, --file <path> | attach an Excel/CSV, image or text file (repeatable, max 3) |
--profile <name> | login profile |
--sandbox | use the sandbox environment |
-w, --workspace <code> | run this command on another workspace |
--agent <code> | choose an Agent instead of the general assistant |
--model <provider/name> | use your own model over MCP: claude, gemini, gpt, grok, ollama/<name> |
--mode <mode> | permission mode |
--output-format <format> | output format |
--json | shorthand for --output-format json |
--lang <lang> | language |
--no-color | disable colors |
--quiet | print results only |
--verbose | verbose output |
--debug | print request ids and timings (never tokens) |
gymmaster login
log in (browser or QR, chosen automatically)
| Flag | Meaning |
|---|---|
--web | log in with the browser |
--qr | scan with the Gym Master app (SSH, headless machines) |
--device | enter a code on another device (RFC 8628) |
--ci | in GitHub Actions/GitLab CI: exchange the OIDC token for a short-lived token |
--no-browser | do not open the browser, print the link only |
gymmaster logout
log out this profile (revokes the server session)
| Flag | Meaning |
|---|---|
--all | log out every profile on this machine |
gymmaster status
account, workspace, environment, AI plan, session
gymmaster sessions
your login sessions on all devices
gymmaster sessions list
list sessions
gymmaster sessions revoke [id]
revoke one session, or --others for all other sessions
| Flag | Meaning |
|---|---|
--others | every session except this one |
gymmaster workspace(ws)
your workspaces (companies)
gymmaster workspace list
list workspaces
gymmaster workspace use [code]
switch the working workspace (saved in the profile)
gymmaster ai
AI assistant: ask, history, proposals, memory, schedules
gymmaster ai ask <question...>
ask one question non-interactively (same as -p)
| Flag | Meaning |
|---|---|
--conversation <id> | continue this conversation |
gymmaster ai history
list conversations
| Flag | Meaning |
|---|---|
--search <text> | filter by text |
--limit <n> | rows · default 30 |
gymmaster ai show <id>
print a whole conversation
gymmaster ai rename <id> [title...]
rename a conversation (empty = clear)
gymmaster ai pin <id>
pin a conversation
| Flag | Meaning |
|---|---|
--off | unpin |
gymmaster ai delete <id>
delete a conversation permanently
gymmaster ai why [runId]
why the AI answered that way: steps and tools
gymmaster ai runs
recent runs
| Flag | Meaning |
|---|---|
--limit <n> | · default 20 |
gymmaster ai pending
drafts and questions waiting for you
gymmaster ai show-changeset <id>
show the rows of a draft
gymmaster ai apply <id>
apply a draft (real write)
gymmaster ai reject <id>
reject a draft
gymmaster ai undo <id>
undo what the AI wrote (within the window)
gymmaster ai journal
journal of what the AI wrote
| Flag | Meaning |
|---|---|
--module <m> | filter by module |
--limit <n> | · default 20 |
gymmaster ai memory
what the AI remembers about your company
gymmaster ai memory list
gymmaster ai memory edit <id> <text...>
edit a memory
gymmaster ai memory lock <id>
lock so the AI cannot change it
| Flag | Meaning |
|---|---|
--off | unlock |
gymmaster ai memory forget <id>
make the AI forget something
gymmaster ai schedule
schedule a recurring question
gymmaster ai schedule list
gymmaster ai schedule add <question>
e.g. ai schedule add "yesterday's revenue" --daily 08:00
| Flag | Meaning |
|---|---|
--daily <HH:mm> | |
--weekly <dow@HH:mm> | 0=Sun … 6=Sat, e.g. 1@08:00 |
--monthly <dom@HH:mm> | day 1–28, e.g. 1@08:00 |
--title <title> |
gymmaster ai schedule run <id>
run once now
gymmaster ai schedule off <id>
disable
gymmaster ai schedule on <id>
enable
gymmaster ai schedule delete <id>
delete
gymmaster ai library
images, documents and files the AI produced
gymmaster ai library list
| Flag | Meaning |
|---|---|
--kind <kind> | image | document | generated |
gymmaster ai library get <n>
download item n
| Flag | Meaning |
|---|---|
-o, --out <file> |
gymmaster ai agents
Agents available to you
gymmaster ai usage
AI turns this month
gymmaster ai feedback <messageId> <vote>
rate an answer: up / down
gymmaster ai support <problem...>
hand over to a support agent (opens a ticket)
gymmaster model
your own models for --model (keys stay in the keychain, never sent to Gym Master)
gymmaster model list
models you added
gymmaster model add <provider>
add a provider: claude, gemini, gpt, grok, ollama
| Flag | Meaning |
|---|---|
--key-from-stdin | read the API key from stdin (never put keys on the command line) |
--name <model> | model used when only the provider is given |
--url <url> | server address (Ollama or a compatible endpoint) |
gymmaster model remove <name>
remove a model and delete its key
gymmaster model default <name>
model used by default (gymmaster = Gym Master AI)
gymmaster tools
AI tools you can use (by your real permissions)
gymmaster tools login
grant AI tool access to the CLI on this machine (once)
| Flag | Meaning |
|---|---|
--no-browser | do not open the browser |
gymmaster tools logout
revoke the CLI's AI tool access
gymmaster tools list
list tools
| Flag | Meaning |
|---|---|
--module <m> | filter by module (gym, crm, sales…) |
--kind <k> | filter by kind (read | proposal | export) |
--public | public catalog (no login) |
gymmaster tools describe <name>
parameters and an example for a tool
gymmaster tools call <name>
call a tool. Write tools only create a proposal to confirm
| Flag | Meaning |
|---|---|
--args <json> | JSON arguments |
--args-file <file> | arguments from a JSON file (- = stdin) |
-a, --arg <key=value> | one argument (repeatable) |
gymmaster api <method> <path>
call the API directly (e.g. api GET /iam/auth/me)
| Flag | Meaning |
|---|---|
-f, --raw-field <key=value> | string parameter: query for GET/DELETE, JSON body for POST/PUT/PATCH (repeatable) |
-F, --field <key=value> | like -f but typed: numbers, true/false, JSON |
--input <file> | request body from a JSON file (- = stdin) |
-H, --header <K: V> | extra header (repeatable) |
--paginate | follow all pages (items/pageNumber results) |
--select <path> | print only part of the result, e.g. .items[0].name |
-i, --include | print status and headers too |
--idempotency-key <key> | idempotency key for POST |
gymmaster keys
workspace API keys
gymmaster keys list
list keys
gymmaster keys create
create a key (printed once)
| Flag | Meaning |
|---|---|
--name <name> | |
--scopes <codes> | permission codes, comma separated, e.g. gym.members.view,gym.contracts.view |
--expires <dur> | lifetime: 30d, 6m, 1y · default 90d |
--description <text> |
gymmaster keys revoke <id>
revoke a key (stops immediately)
gymmaster keys delete <id>
delete a key
gymmaster keys usage [id]
calls over 7 days
gymmaster keys calls <id>
last 50 calls of a key
gymmaster webhooks(webhook)
webhook events: browse, trigger, listen locally
gymmaster webhooks events
list events
| Flag | Meaning |
|---|---|
--module <m> |
gymmaster webhooks schema <event>
payload schema and example
gymmaster webhooks endpoints
your webhook endpoints
gymmaster webhooks endpoints list
gymmaster webhooks endpoints create <url>
| Flag | Meaning |
|---|---|
--events <list> | events, comma separated |
--description <text> |
gymmaster webhooks endpoints delete <id>
gymmaster webhooks endpoints rotate-secret <id>
rotate the signing secret (old one stays valid for a while)
gymmaster webhooks trigger <event>
send a sample event to an endpoint
| Flag | Meaning |
|---|---|
--endpoint <id> | target endpoint (default: first one subscribed) |
gymmaster webhooks deliveries
recent deliveries
| Flag | Meaning |
|---|---|
--status <s> | success | failed | pending |
--endpoint <id> | |
--limit <n> | · default 30 |
gymmaster webhooks retry <deliveryId>
retry a delivery
gymmaster webhooks verify
verify a webhook signature locally (no server call)
| Flag | Meaning |
|---|---|
--secret <secret> | |
--payload <file> | raw received body (- = stdin) |
-H, --header <K: V> | received header (repeatable) |
--signature <sig> | signature from the *-Signature-256 header |
--timestamp <ts> | timestamp from the *-Timestamp header |
gymmaster webhooks listen
receive real events on this machine and forward them locally
| Flag | Meaning |
|---|---|
--forward-to <url> | e.g. localhost:3000/hook |
--events <list> | events, comma separated (default: all) |
--print-secret | print the full signing secret |
--print-json | print event bodies |
gymmaster openapi
download the public OpenAPI spec
gymmaster openapi pull
| Flag | Meaning |
|---|---|
--module <m> | one module only |
-o, --out <file> | · default openapi.json |
gymmaster docs [topic]
open the docs (cli, quickstart, api-keys, oauth, mcp, ai-tools, webhooks, sdk, errors, rate-limit, sandbox, changelog, versioning, security)
gymmaster changelog
recent API changes
gymmaster mcp
connect the MCP server to other AI assistants
gymmaster mcp url
print the MCP server URL
gymmaster mcp install [clients...]
install into: chatgpt, claude, claude-desktop, codex, copilot, cursor, gemini, grok, vscode, windsurf
gymmaster mcp uninstall <client>
gymmaster mcp serve
serve MCP over stdio with the CLI's grant (for clients without OAuth)
| Flag | Meaning |
|---|---|
--stdio | use stdin/stdout (default) |
gymmaster ci
secretless CI login (OIDC)
gymmaster ci trust
CI repositories allowed to log in to this workspace
gymmaster ci trust list
gymmaster ci trust add
allow a repository to log in (tokens act as you, live 15 minutes)
| Flag | Meaning |
|---|---|
--repo <owner/repo> | |
--provider <p> | github | gitlab · default github |
--ref <ref> | branch or tag prefix, e.g. main · refs/tags/v* · default main |
--environment <name> | required GitHub environment (recommended for the main branch) |
--expires <dur> | lifetime: 90d, 1y |
--name <name> |
gymmaster ci trust revoke <id>
revoke (immediate)
gymmaster ci policy
pre-approval policies: let CI write within a ceiling
gymmaster ci policy list
gymmaster ci policy kinds
kinds a policy can cover
gymmaster ci policy show <id>
gymmaster ci policy request
ask to let a CI repository write (an API-key manager approves; with that permission it is active at once)
| Flag | Meaning |
|---|---|
--trust <id|owner/repo> | CI trust (see: ci trust list) |
--kinds <a,b> | kinds (see: ci policy kinds) |
--max <n> | record ceiling (1–1000) · default 50 |
--expires <dur> | lifetime, at most 30d · default 14d |
--note <text> | |
--approve | approve now (needs API-key manage permission) |
gymmaster ci policy revoke <id>
revoke (the next write goes back to a link)
gymmaster ci example
print a sample GitHub Actions workflow
| Flag | Meaning |
|---|---|
--repo <owner/repo> | |
--workspace <code> | |
--write | sample that writes (needs a policy: ci policy request) |
gymmaster doctor
check connectivity, clock, token, plan, version
gymmaster config
settings
gymmaster config list
gymmaster config get <key>
gymmaster config set <key> <value>
lang · mode · updateChannel · updateCheck · telemetry · color · defaultProfile
gymmaster completion <shell>
Tab completion for bash | zsh | fish | powershell
gymmaster update
upgrade to the latest version
| Flag | Meaning |
|---|---|
--channel <c> | latest | next |
gymmaster init
create GYMMASTER.md: instructions for this folder
Scripts and CI
-p prints the answer and exits; --json and --output-format stream-json are machine readable. Writes never run without a terminal.
GYMMASTER_API_KEY=… gymmaster tools call <tool> -a q=… --jsongymmaster -p "yesterday's revenue by branch" --json > report.json
gymmaster -p "…" --output-format stream-jsonEnvironment and config files
| Variable | Meaning |
|---|---|
GYMMASTER_API_KEY | API key (CI, read only) |
GYMMASTER_TOKEN | An existing access token |
GYMMASTER_PROFILE | Login profile |
GYMMASTER_ENV | prod | sandbox |
GYMMASTER_WORKSPACE | Workspace for this command |
GYMMASTER_LANG | vi | en |
GYMMASTER_DEBUG | Print request ids and timings (never tokens) |
GYMMASTER_NO_UPDATE_CHECK | Disable update notices |
GYMMASTER_NO_KEYCHAIN | Store tokens in a 0600 file instead of the keychain |
GYMMASTER_ID_TOKEN | CI OIDC token (GitLab) |
Settings live in ~/.config/gymmaster/config.toml (no tokens). A GYMMASTER.md in a folder holds instructions sent with every question.
Exit codes
| Code | Meaning |
|---|---|
0 | Success |
1 | General / server error |
2 | Invalid usage |
3 | Not logged in / session expired |
4 | Missing permission or plan |
5 | Out of AI turns / rate limited |
6 | Network error |
7 | Write proposal not confirmed |
8 | Not found |
130 | Cancelled (Ctrl+C) |