Skip to content
Developer docs Install and sign in

Command line

The commentgate command works through what is waiting, hides and replies, changes guidance and protections, and pulls reports, from a terminal or a script. It runs on Node.js 20 or later.

Updated September 26, 2026

Install

Install
npm install -g commentgate
Or run it without installing
npx commentgate --help

Sign in

commentgate login

login asks for an API key from Settings, then API keys, checks it, and saves it in your config folder where only you can read it. With several brands, save one profile each (commentgate login --profile <name>) and switch with --profile or commentgate profiles use <name>.

In CI or a container, skip login and set COMMENTGATE_API_KEY, or pipe the key into commentgate login.

First commands

commentgate status
commentgate needs-you
commentgate comments list --platform tiktok --status hidden --since 24h
commentgate protections on links
commentgate reports --month 2026-08

In a terminal, needs-you walks through each waiting comment: h hides it, k keeps it, r replies. Every answer teaches the autopilot.

In scripts

Every command takes --json and prints the API's JSON shape, and exit codes tell a script what happened without reading the output:

# Every hidden comment from the last week, one JSON object per line
commentgate comments list --status hidden --since 7d --pages 20 --json | jq -c '.data[]'

The full list of commands, options and exit codes is in the command reference.

In the help center