CLI
The gtm-tools CLI is a Commander.js binary that fronts every tool through a single bearer token. Install once, set GTM_TOOLS_API_KEY, and call any tool from the terminal.
Installation
Install with one command — no Node, no dependencies (just curl). It downloads
a standalone binary into ~/.gtm-tools/bin:
Then sign in — opens your browser, you log in via WorkOS, the success page closes itself, and you’re done:
Credentials are saved to ~/.gtm-tools/config.json (chmod 600) so every
subsequent call — and the browser extension via
the native helper — picks them up automatically. No export needed, no code
to copy. Run gtm-tools admin logout to clear them.
Headless / CI? Use the email + 6-digit code flow:
gtm-tools admin auth you@yourcompany.com then … --code 123456.
Prefer npm? npm install -g gtm-tools also works (requires Node). To update
the standalone binary, just re-run the curl … | bash command.
Command pattern
Global flags: --json (raw JSON output), --api-key <key> (override env var), --url <url> (override https://api.gtm-tools.sh).
admin
Auth, billing, and key management.
Key management
Every admin login mints a fresh API key and (for safety) revokes any prior
CLI-named keys for the workspace. Inspect or revoke other keys explicitly:
The revoke endpoint includes a belongs-to check — a key can only revoke keys
in its own workspace. Use this to clean up old MCP Access Key entries that
get_api_key accumulates (it doesn’t auto-revoke, since those keys are often
embedded in MCP configs / CI / webhooks).
Headless / CI auth (legacy)
For boxes that can’t open a browser, the email + 6-digit code flow still works:
socials
LinkedIn automation. All commands either use a positional argument or named flags depending on the underlying tool.
Lookups
Posts and jobs
Employees
Outreach
Account management
The LinkedIn session is shared via the browser extension — install it, press Connect, and stay logged into LinkedIn in that browser.
Reddit automation — read threads, post + comment, vote, DM via Reddit Chat. All write tools (and reddit post, which Reddit gates from cloud IPs) run on a pooled session from the browser extension.
Discovery
Evaluate
Follow up
Organize
Pair this with the Results Ranking Optimization guide — it covers the should-I-reply gate, anti-AI-spam style rules, and the engagement-queue pattern.
SMTP-verified email finding.
signals
Buying-intent detection.
mcp
Patch the GTM Tools MCP server into a client config.
Without --with-api-key, the client opens a browser to authenticate via OAuth on first use.
extension
Install or update the browser extension (required by
get_email and the LinkedIn write/personal tools). It writes to a stable folder,
~/GTM Tools/extension, so you Load-unpacked once and every update reuses the
same path.
Re-run gtm-tools extension install to update, then reload the extension in
chrome://extensions. (This is the same download as the standalone
extension/install.sh installer.)
To update: npm install -g gtm-tools@latest, re-run gtm-tools extension install,
then click the reload icon on the extension in chrome://extensions.
update
The CLI updates itself in place — no need to re-run the curl installer when a new version ships.
Every command also kicks off a background version check (cached 6 hours, 1.5s timeout); if the server’s version is newer than your binary you’ll see a one- line notice on stderr after the command finishes:
The update mechanism only swaps the standalone binary (the curl-installed one
in ~/.gtm-tools/bin/). If you installed via npm, use npm install -g gtm-tools@latest.
Using with jq
The CLI defaults to JSON, so it pipes cleanly into jq: