@cogny/cli
v0.3.0
Published
Cogny CLI — sign up, wire your coding agent to Cogny, run marketing skills on your own data
Maintainers
Readme
cogny-cli
Sign your coding agent up for Cogny Solo and invoke every Cogny MCP tool from the shell — no native MCP wiring or restart required.
Quick start (Solo / freemium)
# 1. Sign up. Uses `git config user.email` if --email is omitted.
npx @cogny/cli init --agent claude-code
# 2. Discover available tools (calls MCP tools/list, prints names + descriptions).
npx @cogny/cli tools list
# 3. Call any tool from Bash — same surface as native MCP, no restart.
npx @cogny/cli tools call list_integrations
npx @cogny/cli tools call execute_bigquery_sql --input '{"query":"select 1"}'
# Quick sanity check.
npx @cogny/cli statusFirst 15 calls per month are free.
Supported agents (pick the one you use):
claude-code, codex, cursor, gemini-cli, opencode, aider, other.
Automatic MCP config writes are currently supported for claude-code, codex,
cursor, and gemini-cli; other agents can use the printed JSON snippet.
Commands
cogny init
Creates (or recovers) a Cogny Solo workspace and persists the issued API key
to ~/.cogny/config.json.
cogny init [--email [email protected]] [--agent claude-code]
[--api-url https://app.cogny.com]--email— if omitted, derived fromgit config --get user.email.--agent— tag the signup so we can segment the funnel.- Re-running with the same email returns a fresh key for your existing workspace (no duplicates).
cogny tools
Invoke any Cogny MCP tool over JSON-RPC + Bearer auth, using the API key from
cogny init. No MCP wiring required.
cogny tools list [--json]
cogny tools call <tool-name> [--input '<json>' | --input-file path | --stdin] [--json]cogny tools listprintsname — descriptionper line. Pass--jsonfor the full tool definitions (including each tool's input schema) — read this once to know what's available.cogny tools call <name>passes--inputJSON as the tool'sarguments. Pipe stdin via--stdinfor large payloads. Addsprocess.exit(2)on tool errors so shell scripts can detect failure.cogny statusis a shortcut forcogny tools call cogny_status— prints subscription state, connected channels, and remaining credits.
cogny mcp-config
Optional: wire the Cogny MCP into your agent's native MCP config so the tools
appear in the agent's MCP UI (Claude Code's /mcp panel, Cursor's Tools tab,
etc.). Requires restarting the agent. Not needed if you're using cogny tools.
cogny mcp-config [--agent claude-code] [--write]- Without
--writeit prints the snippet — paste it into your agent's config wherever it lives. - With
--writeit merges acognyentry into the default config path for the chosen agent (e.g.~/.claude.jsonfor Claude Code). - If the existing config is malformed JSON, the CLI refuses to overwrite it.
- Note: some clients (including Claude Code as of this writing) prefer OAuth
over static
Authorizationheaders and may ignore the configured key, leaving the server "needs authentication". Usecogny tools call ...from Bash instead — same tools, no OAuth dance.
cogny install-skill
Clones the open-source marketing skills repo into the right local skills directory for your agent.
cogny install-skill [--agent claude-code] [--repo https://github.com/cognyai/claude-code-marketing-skills]Idempotent: re-running pulls latest changes.
Local ticket runner (advanced)
For customers running classic-tier Cogny warehouses with the local ticket runner workflow (separate from the Solo flow above):
The local ticket runner executes tickets from Cogny Cloud on your machine. It can clone repositories, run your local coding agent, commit changes, push a branch, and open a pull request. Use it only with trusted Cogny workspaces and repositories.
Requirements
- Node.js 20+
gitghauthenticated for the customer repo- Either
claudeorcodexinstalled and authenticated locally - A Cogny bearer token for the warehouse (
cogny_lite_...,mcp_..., orat_...)
Usage
cogny login --api-key mcp_xxx --api-url https://app.cogny.com
cogny run --provider claude --allow-local-runnerRun a single queued ticket and exit:
cogny run --provider codex --once --allow-local-runnerOverride the default model CLI command:
COGNY_AGENT_COMMAND='claude -p "$(cat "$COGNY_PROMPT_FILE")"' cogny run --allow-local-runnerFor Claude Code, cogny-cli prefers ~/.local/bin/claude when present before falling back to claude from PATH. This avoids non-interactive shell PATH differences from selecting a broken global install.
The runner leases tickets queued from Cogny Cloud, clones the configured GitHub repo locally, runs the selected model CLI, commits and pushes a branch, opens a PR with gh, then reports the PR back to Cogny so the ticket moves to review.
If you intentionally need a permission-bypass flag for a fully trusted runner
environment, set COGNY_AGENT_COMMAND explicitly after reviewing the risk.
