SAYGM CLI

Say gm from your terminal.

Set up your agents, manage keys and balance, and chat with models from one command line.

Set up one tool

Use npx to connect a tool to SayGM.

npx saygm install claude-code

or

Install the CLI

For everyday use with saygm ask, chat, keys and deploy.

npm install -g saygm

Then run saygm --help.

Explore the CLI

01 · Setup

Set up your tools.

Each tool gets its own key, and saygm uninstall <tool> restores its files and revokes its key.

Claude Code

Connect Claude Code to SayGM's Claude models.

saygm install claude-code
Open Claude Code guide

Codex

Set up Codex CLI with SayGM as its model provider.

saygm install codex
Open Codex guide

Hermes

Configure Hermes Agent for Claude and other SayGM models.

saygm install hermes
Open Hermes guide

OpenClaw

Connect OpenClaw to SayGM and restart its gateway.

saygm install openclaw
Open OpenClaw guide

02 · Deploy

Run an agent on a server.

Run Hermes or OpenClaw on a Phala confidential VM, your own server, EC2 or local Docker.

saygm deploy hermes --to phala
saygm deploy openclaw --to ssh://[email protected]
saygm deploy hermes --to aws://us-east-1
saygm deploy openclaw --to local

Manage a deployment

saygm deployments status <id>
saygm deployments logs <id>
saygm deployments destroy <id>

03 · Terminal chat

Ask or chat with any model.

Send shell output to saygm ask, or open an interactive session with saygm chat.

git diff | saygm ask "Write a commit message"
git log --since=yesterday --oneline | saygm ask "Write my standup update"
cat contract.txt | saygm ask -m glm-5.3-flash-tee "List the termination clauses" > clauses.md
saygm chat

-m picks a model, and saygm models default <id> sets your default.

04 · Automation

For scripts and agents.

Use JSON output, exit codes and environment keys in CI or on a server.

saygm login --key-only --key "$SAYGM_KEY"
saygm models --json
saygm deploy hermes --to aws://us-east-1 --key-env SAYGM_KEY --yes

Use --json for structured output. Chat returns one JSON line per turn; followed logs return one per log line. The example stores an API key with --key-only --key for CI. Use --key-env to pass an environment key to deploys. Add --yes to confirm a scripted deploy.

Exit codes

  • 0 Success
  • 1 Error
  • 2 Usage error
  • 3 Sign-in required or key rejected
  • 4 Insufficient balance
  • 5 Network or service unavailable

05 · FAQ

A few useful details.

Credentials, setup and platform support.

How do I get npm and npx?

npm and npx come with Node.js. Install Node.js 22 or later from https://nodejs.org/en/download.

Where does saygm store credentials?

In ${XDG_CONFIG_HOME:-~/.config}/saygm/credentials.json, an owner-only file with mode 0600 under your XDG config directory.

What does install change, and how do I undo it?

Install connects the selected tool to SayGM with its own key. Run saygm uninstall <tool> to restore the original files and revoke its key.

Which platforms can I use?

Use SayGM CLI on macOS and Linux, or on Windows 10 or later, with Node.js 22 or later.

Is saygm open source?

The saygm npm package is licensed under Apache-2.0.

SAYGM CLI

One command to get started.

npx saygm install <tool>