CLI commands
Every command with its options and examples: the same text commentgate <command> --help prints, taken from the tool's own definitions.
Updated September 26, 2026
Account
commentgate login
Save an API key for this computer. Create one in CommentGate under Settings, API keys. The key is checked before it is saved, and stored in your config folder where only you can read it. Working for several brands? Save one key per brand with --profile and pick it with --profile on any command. Without a terminal, the key is read from standard input.
commentgate login [--profile <name>] | Option | Does |
|---|---|
--default | Also make this profile the default |
$ commentgate login
$ commentgate login --profile wildermere --default
# In CI or a script, pipe the key in
$ echo "$COMMENTGATE_API_KEY" | commentgate login --profile ci commentgate logout
Remove a saved key from this computer. The key keeps working elsewhere until you revoke it in Settings, API keys.
commentgate logout [--profile <name>] [--all] | Option | Does |
|---|---|
--all | Forget every saved profile |
$ commentgate logout
$ commentgate logout --profile wildermere
$ commentgate logout --all commentgate whoami
Show the workspace and key in use
commentgate whoami $ commentgate whoami
$ commentgate whoami --profile wildermere --json commentgate profiles
Agencies keep one saved key per brand. `profiles` lists them, `profiles use <name>` makes one the default.
commentgate profiles [list | use <name>] $ commentgate profiles
$ commentgate profiles use wildermere Autopilot
| Command | Does |
|---|---|
| status | How the autopilot is doing |
| needs-you | Answer the comments the autopilot is unsure about |
| guidance | Read or change the autopilot guidance |
| protections | List protections, or turn one on or off |
commentgate status
How the autopilot is doing this week and last: what it handled on its own, what it asked you, how often it agreed with your corrections, which areas it now handles alone, and what is waiting for you.
commentgate status $ commentgate status
$ commentgate status --profile wildermere
$ commentgate status --json commentgate needs-you
Walk through the comments the autopilot wants you to decide, newest first. Each shows why it asks and which way it leans. Press h to hide, k to keep, r to reply, s to skip, q to quit. Every answer teaches the autopilot, exactly like answering in the app. When the output is not a terminal (or with --list or --json) it prints the list instead. `needs-you answer` answers one comment, for scripts.
commentgate needs-you [--limit <n>] | needs-you answer <id> hide|keep|reply ["text"] | Option | Does |
|---|---|
--limit <n> | At most this many comments, 1 to 100 (default 50) |
--cursor <cursor> | Continue from a previous page |
--list | Print the list even in a terminal |
$ commentgate needs-you
$ commentgate needs-you --list
$ commentgate needs-you --json | jq -r '.data[].id'
$ commentgate needs-you answer 2a8d5bac-3084-472a-92d9-700577412c23 keep
$ commentgate needs-you answer 2a8d5bac-3084-472a-92d9-700577412c23 reply "Yes, it ships to Canada in 3 to 5 days." commentgate guidance
Guidance is the plain-language note the autopilot follows, like "Never hide questions about sizing, even rude ones." `get` prints it, `set` replaces it ("-" reads standard input), `edit` opens it in $VISUAL or $EDITOR, `clear` removes it. Up to 2,000 characters.
commentgate guidance [get | set "text" | edit | clear] $ commentgate guidance
$ commentgate guidance set "Never hide questions about sizing or shipping, even rude ones."
$ commentgate guidance edit
$ EDITOR="code --wait" commentgate guidance edit
$ cat guidance.txt | commentgate guidance set - commentgate protections
Protections are the switches on Setup: scams, spam, hate, competitors, profanity, links, contact (phone numbers and emails), media (images, GIFs and stickers) and negative. `answers` sets how questions get answered: off, draft (you approve each reply) or send. Changes apply to new comments; nothing already decided changes.
commentgate protections [list | on <name> | off <name> | answers off|draft|send] $ commentgate protections
$ commentgate protections on profanity
$ commentgate protections off competitors
$ commentgate protections answers draft
$ commentgate protections --json commentgate comments list
List comments, newest first. Every filter can be combined. Times take 24h, 7d, 2w, a date (2026-09-01, your local midnight) or a full ISO time.
commentgate comments list [filters] | Option | Does |
|---|---|
--status <status> | One of: visible, hidden, deleted, review, pending |
--platform <platform> | One of: facebook, instagram, tiktok, youtube, threads |
--surface <surface> | organic (posts) or ad |
--account <id> | A connected account id |
--ad <id> | The platform ad id |
--post <id> | The platform post id |
--external-id <id> | The platform comment id |
--since <time> | Received at or after (24h, 7d, a date) |
--until <time> | Received before |
--limit <n> | Comments per page, 1 to 100 (default 50) |
--cursor <cursor> | Continue from a previous page |
--pages <n> | Fetch up to this many pages in one go (default 1, at most 20) |
$ commentgate comments list
$ commentgate comments list --status review
$ commentgate comments list --platform tiktok --surface ad --since 24h
$ commentgate comments list --status hidden --since 2026-09-01 --until 2026-09-08
$ commentgate comments list --external-id 918273645501928_484690767
# Every hidden comment from the last week, as JSON lines for jq
$ commentgate comments list --status hidden --since 7d --pages 20 --json | jq -c '.data[]' commentgate comments get
Show one comment in full: text, author, where it was posted, and why it was decided the way it was.
commentgate comments get <id> $ commentgate comments get 2a8d5bac-3084-472a-92d9-700577412c23
$ commentgate comments get 2a8d5bac-3084-472a-92d9-700577412c23 --json commentgate comments hide
Hide comments on the platform. Pass one or more comment ids, or "-" to read ids from standard input (one per line). Platform changes are queued and happen within seconds. Each id is reported on its own line; the exit code is non-zero if any failed.
commentgate comments hide <id...> $ commentgate comments hide 2a8d5bac-3084-472a-92d9-700577412c23
$ commentgate comments hide 2a8d5bac-3084-472a-92d9-700577412c23 7f0c7a2e-5a1e-4a0c-9d6e-0f7c2b1e9a11
# Hide everything waiting for review on TikTok ads
$ commentgate comments list --status review --platform tiktok --surface ad --json | jq -r '.data[].id' | commentgate comments hide - commentgate comments unhide
Make hidden comments visible again. Pass one or more comment ids, or "-" to read ids from standard input (one per line). Platform changes are queued and happen within seconds. Each id is reported on its own line; the exit code is non-zero if any failed.
commentgate comments unhide <id...> $ commentgate comments unhide 2a8d5bac-3084-472a-92d9-700577412c23
$ commentgate comments unhide 2a8d5bac-3084-472a-92d9-700577412c23 7f0c7a2e-5a1e-4a0c-9d6e-0f7c2b1e9a11 commentgate comments allow
Mark comments as fine (unhides them if hidden). Pass one or more comment ids, or "-" to read ids from standard input (one per line). Platform changes are queued and happen within seconds. Each id is reported on its own line; the exit code is non-zero if any failed.
commentgate comments allow <id...> $ commentgate comments allow 2a8d5bac-3084-472a-92d9-700577412c23
$ commentgate comments allow 2a8d5bac-3084-472a-92d9-700577412c23 7f0c7a2e-5a1e-4a0c-9d6e-0f7c2b1e9a11 commentgate comments archive
Move comments out of the inbox (nothing changes on the platform). Pass one or more comment ids, or "-" to read ids from standard input (one per line). Platform changes are queued and happen within seconds. Each id is reported on its own line; the exit code is non-zero if any failed.
commentgate comments archive <id...> $ commentgate comments archive 2a8d5bac-3084-472a-92d9-700577412c23
$ commentgate comments archive 2a8d5bac-3084-472a-92d9-700577412c23 7f0c7a2e-5a1e-4a0c-9d6e-0f7c2b1e9a11 commentgate comments unarchive
Bring archived comments back to the inbox. Pass one or more comment ids, or "-" to read ids from standard input (one per line). Platform changes are queued and happen within seconds. Each id is reported on its own line; the exit code is non-zero if any failed.
commentgate comments unarchive <id...> $ commentgate comments unarchive 2a8d5bac-3084-472a-92d9-700577412c23
$ commentgate comments unarchive 2a8d5bac-3084-472a-92d9-700577412c23 7f0c7a2e-5a1e-4a0c-9d6e-0f7c2b1e9a11 commentgate comments restore
Bring comments back from the Bin. Pass one or more comment ids, or "-" to read ids from standard input (one per line). Platform changes are queued and happen within seconds. Each id is reported on its own line; the exit code is non-zero if any failed.
commentgate comments restore <id...> $ commentgate comments restore 2a8d5bac-3084-472a-92d9-700577412c23
$ commentgate comments restore 2a8d5bac-3084-472a-92d9-700577412c23 7f0c7a2e-5a1e-4a0c-9d6e-0f7c2b1e9a11 commentgate comments delete
Delete comments on the platform (not TikTok). Pass one or more comment ids, or "-" to read ids from standard input (one per line). TikTok only lets you hide other people’s comments, so deleting there is refused. Platform changes are queued and happen within seconds. Each id is reported on its own line; the exit code is non-zero if any failed.
commentgate comments delete <id...> $ commentgate comments delete 2a8d5bac-3084-472a-92d9-700577412c23
$ commentgate comments delete 2a8d5bac-3084-472a-92d9-700577412c23 7f0c7a2e-5a1e-4a0c-9d6e-0f7c2b1e9a11 commentgate comments like
Like comments as your Page or account (Facebook and Instagram). Pass one or more comment ids, or "-" to read ids from standard input (one per line). Platform changes are queued and happen within seconds. Each id is reported on its own line; the exit code is non-zero if any failed.
commentgate comments like <id...> $ commentgate comments like 2a8d5bac-3084-472a-92d9-700577412c23
$ commentgate comments like 2a8d5bac-3084-472a-92d9-700577412c23 7f0c7a2e-5a1e-4a0c-9d6e-0f7c2b1e9a11 commentgate comments block
Block the authors (Facebook only). Pass one or more comment ids, or "-" to read ids from standard input (one per line). Only Facebook lets a Page block people. Other platforms refuse with a message. Platform changes are queued and happen within seconds. Each id is reported on its own line; the exit code is non-zero if any failed.
commentgate comments block <id...> $ commentgate comments block 2a8d5bac-3084-472a-92d9-700577412c23
$ commentgate comments block 2a8d5bac-3084-472a-92d9-700577412c23 7f0c7a2e-5a1e-4a0c-9d6e-0f7c2b1e9a11 commentgate comments unblock
Unblock the authors (Facebook only). Pass one or more comment ids, or "-" to read ids from standard input (one per line). Platform changes are queued and happen within seconds. Each id is reported on its own line; the exit code is non-zero if any failed.
commentgate comments unblock <id...> $ commentgate comments unblock 2a8d5bac-3084-472a-92d9-700577412c23
$ commentgate comments unblock 2a8d5bac-3084-472a-92d9-700577412c23 7f0c7a2e-5a1e-4a0c-9d6e-0f7c2b1e9a11 commentgate comments reply
Post a public reply as your Page or account (up to 2,000 characters). Pass "-" as the text to read it from standard input. Platform limits apply: TikTok cuts replies at 150 characters, Instagram only takes replies to top-level comments that are not hidden.
commentgate comments reply <id> "text" $ commentgate comments reply 2a8d5bac-3084-472a-92d9-700577412c23 "Thanks, Maya! Wide sizes ship in October."
$ cat answer.txt | commentgate comments reply 2a8d5bac-3084-472a-92d9-700577412c23 - Reports and sales
| Command | Does |
|---|---|
| reports | Totals for a period: received, hidden, replies, response times |
| sales record | Record a sale from a tracked link |
commentgate reports
Report totals for a period, counted by the day each comment arrived in your workspace time zone. Without a period flag you get the last 30 days.
commentgate reports [period] [filters] | Option | Does |
|---|---|
--last <n>d | The last n days, including today (7d, 30d, 4w) |
--month <yyyy-mm> | One calendar month |
--today | Today only |
--from <yyyy-mm-dd> | First day (inclusive) |
--to <yyyy-mm-dd> | Last day (inclusive, default today) |
--platform <platform> | One of: facebook, instagram, tiktok, youtube, threads |
--surface <surface> | organic (posts) or ad |
--account <id> | A connected account id |
$ commentgate reports
$ commentgate reports --last 7d
$ commentgate reports --month 2026-08 --surface ad
$ commentgate reports --from 2026-09-01 --to 2026-09-15 --platform instagram
$ commentgate reports --today --json commentgate sales record
Tell CommentGate about a sale from a tracked link, so the revenue shows next to the comment and campaign that led to it. The click id is the cg_click value added to your store link. Recording the same click again replaces its value, so it is safe to retry.
commentgate sales record --click <id> --value <amount> [--currency USD] [--at <time>] | Option | Does |
|---|---|
--click <id> | The cg_click value from the order (required) |
--value <amount> | Order value in dollars, not cents (required) |
--currency <code> | ISO 4217 code (default USD) |
--at <time> | When the sale happened (default now) |
$ commentgate sales record --click k7Qm2x.a1b2c3d4 --value 129.50
$ commentgate sales record --click k7Qm2x.a1b2c3d4 --value 89 --currency CAD --at 2026-09-22T15:04:00-04:00 Integrations
| Command | Does |
|---|---|
| hooks list | List REST hook subscriptions |
| hooks delete | Unsubscribe REST hooks |
| mcp | Run a local MCP server for assistants (Claude Desktop, Cursor) |
commentgate hooks list
List the REST hooks integrations created in this workspace (Zapier, Make and your own code), newest first. Webhooks added by hand in Settings, Alerts are managed there.
commentgate hooks list $ commentgate hooks list
$ commentgate hooks list --json commentgate hooks delete
Stop deliveries to one or more hooks at once.
commentgate hooks delete <id...> $ commentgate hooks delete 8f1bee66-640e-4cbd-bc3f-f58ba092a457 commentgate mcp
Run a local MCP server over stdio that connects your assistant to CommentGate with your saved key. Use it with assistants that only run local servers. Add it to the assistant's config as { "command": "npx", "args": ["-y", "commentgate", "mcp"] } Log in first with `npx commentgate login`, or pass COMMENTGATE_API_KEY in the server's env.
commentgate mcp $ npx -y commentgate mcp
$ npx -y commentgate mcp --profile wildermere Global options
Every command takes these.
| Option | Does |
|---|---|
-p, --profile <name> | Use the key saved under this profile (one per brand) |
--json | Print JSON for scripts |
--no-color | Turn off colour (NO_COLOR works too) |
-h, --help | Show help for this command |
COMMENTGATE_API_KEY uses that key instead of a saved one, COMMENTGATE_PROFILE picks
the profile when --profile is not given, and NO_COLOR turns off colour.
Exit codes
| Code | Meaning |
|---|---|
0 | Done |
1 | Something went wrong on the way (network or server) |
2 | The command line itself is wrong |
3 | Sign-in needed: no key, a revoked key, or a key that cannot do this |
4 | No such comment, hook or item |
5 | Refused: a permission or a platform limit (TikTok cannot delete, already removed) |
In the help center
- Use CommentGate from Claude, ChatGPT or a terminal
Connect an AI assistant to work through what is waiting for you, hide and reply, and pull your numbers in a chat, or use the command line tool.
Comments