@gtm2/cli
v0.14.1
Published
GTM² in your terminal. Talk to your go-to-market system.
Readme
GTM² CLI
GTM² in your terminal. A branded terminal head on the GTM² platform: talk to your go-to-market system in plain English, or run direct commands, and watch it work against your real workspace.
It is a thin client. The tools it can call live on the GTM² MCP server
(/api/mcp); the model that drives the agent loop is configurable (Claude
today, Codex or Gemini once the brain moves server-side). The same prospect
approval gates that protect the web app apply here.
Quick start
Install (once published)
npm i -g @gtm2/cli # or: curl -fsSL https://gtm2.ai/install | sh
gtm2 login # connect your workspace (token now; browser flow soon)
gtm2 # opens the interactive terminalUpdate anytime with gtm2 upgrade. The CLI also notifies you on launch when a
newer version is available.
Develop from source
npm install
npm run build
npm link # puts `gtm2` on your PATH, pointing at this checkout
gtm2 login
gtm2Before publish, others can install straight from GitHub:
npm i -g github:craig-higherops/gtm2-cli.
gtm2 config shows the saved settings (secrets masked); gtm2 logout clears the
token. Distribution + the in-app install link are detailed in
docs/DISTRIBUTION.md; the browser login flow in
docs/CLI_AUTH_DEVICE_FLOW.md.
Modes
- Interactive (
gtm2): a REPL with the GTM² brand, slash commands, and agent requests. - One-shot (
gtm2 ask "who is heating up this week?"): run a single request. - Direct (
gtm2 tools, or/heating,/moments,/countsinside the REPL): call tools without the model. Works with just a token.
Config
Env vars (or ~/.config/gtm2/config.json):
| Var | Purpose |
|---|---|
| GTM2_MCP_URL | MCP endpoint, default https://gtm2.ai/api/mcp |
| GTM2_TOKEN | per-workspace token, acts with your role |
| GTM2_PROVIDER | agent brain: codex or anthropic |
| ANTHROPIC_API_KEY | model key for the anthropic provider |
| GTM2_MODEL | model id for the anthropic provider |
Agent brain (provider)
Two ways to run the agent loop:
codex(default when no Anthropic key is set): drives the Codex CLI (codex exec) on your ChatGPT subscription, so it is $0, no API key. Codex connects to the GTM² MCP server itself and calls the tools. Requires the Codex CLI installed and logged in (codex login).anthropic: runs the loop in-process with the AI SDK; needsANTHROPIC_API_KEY(billed per token), streams token by token.
Switch live with /provider codex or /provider anthropic, or set GTM2_PROVIDER.
Prospect-reaching tools stay approval-gated server-side regardless of provider.
Status
v0.1, first iteration. The live MCP server is read-only today, so the CLI reads and reasons. Action tools (draft and send outreach, update CRM) light up automatically once the GTM² MCP surface is bridged to the full action catalog.
The roadmap: move the agent loop server-side so the CLI becomes a pure thin client and the workspace owns model choice across Claude, Codex, and Gemini.
