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

macOS · Linux
curl -fsSL https://developers.gymmaster.vn/install.sh | sh
Windows (PowerShell)
irm https://developers.gymmaster.vn/install.ps1 | iex
Homebrew
brew install nextx-organization/nextx/gymmaster
npm (Node 20+)
npm install -g @gymmasterai/cli

npm and Homebrew installs keep tokens in the OS keychain. The script install needs no Node.

Quick start

Lệnh mẫu
gymmaster login
gymmaster
gymmaster -p "yesterday's revenue by branch"
gymmaster doctor

The 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

MethodCommandUse when
Browsergymmaster login --webThe machine has a browser (default)
QR codegymmaster login --qrSSH or headless servers — approve in the Gym Master app
Device codegymmaster login --deviceNo browser and no app: enter a code on another device
API keyGYMMASTER_API_KEY=… gymmaster …Scripts, read-only CI — an agent identity, no AI chat
CI OIDCgymmaster login --ciGitHub 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.

CommandMeaning
/helpCommands and shortcuts
/newNew conversation (keeps workspace, agent)
/resume [query]Resume an earlier conversation
/rename <name>Rename this conversation
/pinPin / unpin this conversation
/workspace [code]Switch workspace
/agent [code]Choose an Agent: general, sales, support…
/mode read|propose|autoPermission mode: read · propose · auto
/model [name]Switch model: Gym Master AI or your own
/attach <file>Attach an Excel / CSV / image / text file
/pendingWrites waiting for confirmation
/undo [id]Undo the last write
/journalJournal of what the AI wrote
/why [runId]Why the AI answered that way (steps, tools)
/memoryWhat the AI remembers — edit, lock, forget
/schedule "question" daily 08:00Schedule a question daily / weekly / monthly
/libraryImages, documents and files the AI produced
/export md|json [file]Export the conversation to Markdown / JSON
/toolsAI tools you can use (by your real permissions)
/usageAI turns this month
/feedback up|downRate the last answer
/support <problem>Hand over to a support agent (ticket)
/statusAccount, workspace, environment, version
/doctorCheck connectivity, clock, token, plan
/config [key value]Settings: language, color, update notices
/initCreate GYMMASTER.md: instructions for this folder
/mcpInstall the MCP server into another client
/logoutLog out this profile
/clearClear the screen (keeps the conversation)
/exitExit

Shortcuts

KeyMeaning
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+TabCycle permission mode
EscStop the running answer
Esc EscEdit the last message
↑ / ↓Input history
Ctrl+OExpand / collapse steps
Ctrl+LClear screen
Ctrl+C · Ctrl+DClear input (twice to exit) · exit

Permission modes and writes

ModeNormal writeLarge write (delete, bulk > 20, permissions)Finance
Read onlyNeverNeverNever
Propose (default)Change table + [y/N]Type the countConfirm in the app only
Auto-write normalWritten, undoableType the countConfirm in the app only
No terminal (-p, CI)Not written, prints how to confirmNot writtenNot 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

FlagMeaning
-v, --versionprint the version
-p, --print [question]non-interactive: print the answer and exit (reads stdin too)
-c, --continuecontinue 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
--sandboxuse 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
--jsonshorthand for --output-format json
--lang <lang>language
--no-colordisable colors
--quietprint results only
--verboseverbose output
--debugprint request ids and timings (never tokens)

gymmaster login

log in (browser or QR, chosen automatically)

FlagMeaning
--weblog in with the browser
--qrscan with the Gym Master app (SSH, headless machines)
--deviceenter a code on another device (RFC 8628)
--ciin GitHub Actions/GitLab CI: exchange the OIDC token for a short-lived token
--no-browserdo not open the browser, print the link only

gymmaster logout

log out this profile (revokes the server session)

FlagMeaning
--alllog 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

FlagMeaning
--othersevery 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)

FlagMeaning
--conversation <id>continue this conversation

gymmaster ai history

list conversations

FlagMeaning
--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

FlagMeaning
--offunpin

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

FlagMeaning
--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

FlagMeaning
--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

FlagMeaning
--offunlock

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

FlagMeaning
--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

FlagMeaning
--kind <kind>image | document | generated

gymmaster ai library get <n>

download item n

FlagMeaning
-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

FlagMeaning
--key-from-stdinread 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)

FlagMeaning
--no-browserdo not open the browser

gymmaster tools logout

revoke the CLI's AI tool access

gymmaster tools list

list tools

FlagMeaning
--module <m>filter by module (gym, crm, sales…)
--kind <k>filter by kind (read | proposal | export)
--publicpublic 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

FlagMeaning
--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)

FlagMeaning
-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)
--paginatefollow all pages (items/pageNumber results)
--select <path>print only part of the result, e.g. .items[0].name
-i, --includeprint 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)

FlagMeaning
--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

FlagMeaning
--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>

FlagMeaning
--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

FlagMeaning
--endpoint <id>target endpoint (default: first one subscribed)

gymmaster webhooks deliveries

recent deliveries

FlagMeaning
--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)

FlagMeaning
--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

FlagMeaning
--forward-to <url>e.g. localhost:3000/hook
--events <list>events, comma separated (default: all)
--print-secretprint the full signing secret
--print-jsonprint event bodies

gymmaster openapi

download the public OpenAPI spec

gymmaster openapi pull

FlagMeaning
--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)

FlagMeaning
--stdiouse 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)

FlagMeaning
--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)

FlagMeaning
--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>
--approveapprove 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

FlagMeaning
--repo <owner/repo>
--workspace <code>
--writesample 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

FlagMeaning
--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.

API key
GYMMASTER_API_KEY=… gymmaster tools call <tool> -a q=… --json
JSON for scripts
gymmaster -p "yesterday's revenue by branch" --json > report.json
gymmaster -p "…" --output-format stream-json

Environment and config files

VariableMeaning
GYMMASTER_API_KEYAPI key (CI, read only)
GYMMASTER_TOKENAn existing access token
GYMMASTER_PROFILELogin profile
GYMMASTER_ENVprod | sandbox
GYMMASTER_WORKSPACEWorkspace for this command
GYMMASTER_LANGvi | en
GYMMASTER_DEBUGPrint request ids and timings (never tokens)
GYMMASTER_NO_UPDATE_CHECKDisable update notices
GYMMASTER_NO_KEYCHAINStore tokens in a 0600 file instead of the keychain
GYMMASTER_ID_TOKENCI 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

CodeMeaning
0Success
1General / server error
2Invalid usage
3Not logged in / session expired
4Missing permission or plan
5Out of AI turns / rate limited
6Network error
7Write proposal not confirmed
8Not found
130Cancelled (Ctrl+C)