{
  "markdown": "# RankGoat CLI\n\nThe official command-line interface for **[RankGoat](https://rankgoat.app)**, the SEO backlink exchange that writes and publishes done-for-you blog posts with real dofollow links between member sites.\n\nManage your content plan, generate posts, approve drafts, and read your backlink and SEO data straight from the terminal or a CI pipeline. Built on the public [RankGoat API](https://rankgoat.app/docs/api).\n\n[![npm](https://img.shields.io/npm/v/rankgoat.svg)](https://www.npmjs.com/package/rankgoat)\n[![license](https://img.shields.io/badge/license-MIT-blue.svg)](./LICENSE)\n\n## Install\n\n```bash\nnpm install -g rankgoat\n```\n\nOr run it without installing:\n\n```bash\nnpx rankgoat whoami\n```\n\nRequires Node.js 20 or newer. Zero runtime dependencies.\n\n## Authenticate\n\nCreate an API key at **[rankgoat.app/app/settings#api](https://rankgoat.app/app/settings#api)**, then:\n\n```bash\nrankgoat auth login rg_live_xxxxxxxx\n```\n\nThe key is stored in `~/.rankgoat/config.json` (owner-readable only). Alternatively set `RANKGOAT_API_KEY` in your environment, or pass `--api-key` on any command, handy for CI.\n\n```bash\nexport RANKGOAT_API_KEY=rg_live_xxxxxxxx\nrankgoat whoami\n```\n\n## Usage\n\n```text\nrankgoat <command> [args] [options]\n```\n\n### Account & sites\n\n```bash\nrankgoat whoami                     # member + sites with credit balances\nrankgoat sites                      # list your sites\nrankgoat sites get 123              # one site, full detail\nrankgoat sites credits 123          # credit balance by bucket\n```\n\n### Content plan\n\nThe monthly plan is a calendar of briefs the AI turns into posts.\n\n```bash\nrankgoat plan list 123 --month 2026-06\nrankgoat plan add 123 --auto                       # let AI plan a brief (async)\nrankgoat plan add 123 --title \"Notion vs Obsidian\" --keyword \"notion alternatives\" --type comparison --hub 5\nrankgoat plan edit 789 --title \"Notion vs Obsidian (2026)\" --type guide\nrankgoat plan schedule 789 2026-06-22\nrankgoat plan archive 789\nrankgoat plan restore 789\nrankgoat plan generate 789 --wait                  # write the post now (spends 1 credit)\n```\n\n### Posts\n\n```bash\nrankgoat posts list 123 --status draft\nrankgoat posts get 456 --html                      # print the post body\nrankgoat posts approve 456                          # approve a draft for publishing\n```\n\n### Backlinks & SEO\n\n```bash\nrankgoat backlinks 123                              # inbound + outbound link graph\nrankgoat mentions 123                               # brand mentions received + given\nrankgoat seo authority 123                          # Domain Rating over time\nrankgoat seo onpage 123\nrankgoat seo sitemap 123\nrankgoat seo gsc 123                                # Google Search Console performance\nrankgoat seo equity 123                             # link-equity points: balances + ledger\nrankgoat seo flywheel 123                           # unindexed-post fixes awaiting review\n```\n\n### Content hubs\n\nTopic clusters the monthly planner draws briefs from, weighted by priority.\n\n```bash\nrankgoat hubs list 123\nrankgoat hubs add 123 --name \"AI note-taking\" --keywords \"ai notes, ai note app\" --priority high\nrankgoat hubs edit 5 --priority low\nrankgoat hubs archive 5                             # the planner stops drawing from it\nrankgoat hubs restore 5\n```\n\n### Product features\n\nYour product's real capabilities. They ground content generation, so posts never invent features the product does not have.\n\n```bash\nrankgoat features list 123\nrankgoat features add 123 --name \"Offline sync\" --description \"Notes sync without a connection\"\nrankgoat features edit 7 --description \"Now with conflict resolution\"\nrankgoat features archive 7                         # new posts stop mentioning it\nrankgoat features restore 7\n```\n\n### Jobs\n\nSome actions (AI planning, post generation) run in the background and return a job handle. Poll it, or pass `--wait` on the original command:\n\n```bash\nrankgoat jobs plan-generate 789 --wait\n```\n\n## Options\n\n| Option | Description |\n| --- | --- |\n| `--api-key <key>` | Use this key (overrides env and saved config) |\n| `--api-url <url>` | Override the API base URL (defaults to `https://rankgoat.app/api/v1`) |\n| `--json` | Output raw JSON, ideal for scripting with `jq` |\n| `--wait` | Block until an async job finishes |\n| `-h, --help` | Show help |\n| `-v, --version` | Show the CLI version |\n\n## Scripting\n\nEvery command supports `--json` for machine-readable output:\n\n```bash\nrankgoat sites --json | jq '.sites[] | select(.status==\"active\") | .domain'\n```\n\nExit code is non-zero on any API or usage error, so it composes cleanly in CI.\n\n## For AI agents\n\nThe CLI is built to be driven by agents: structured JSON on every command, env-var auth, and non-zero exits on failure. Two ways to plug in:\n\n**MCP server.** `rankgoat mcp` runs a Model Context Protocol server on stdio exposing all 34 capabilities (plan, generate, approve, backlinks, mentions, DR, GSC, sitemap, hubs, features, link equity, flywheel) as typed tools:\n\n```bash\nclaude mcp add rankgoat -e RANKGOAT_API_KEY=rg_live_... -- npx -y rankgoat mcp\n```\n\nOr in any MCP client config:\n\n```json\n{\n  \"mcpServers\": {\n    \"rankgoat\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"rankgoat\", \"mcp\"],\n      \"env\": { \"RANKGOAT_API_KEY\": \"rg_live_...\" }\n    }\n  }\n}\n```\n\n**Shell + SKILL.md.** Agents that run shell commands can use the CLI directly; the bundled [SKILL.md](./SKILL.md) teaches them the workflows, including which calls spend credits and where to keep a human in the loop.\n\nMore at [rankgoat.app/agent](https://rankgoat.app/agent).\n\n## How RankGoat works\n\nRankGoat members pay for done-for-you blog posts that get published on their own sites with dofollow outbound links to other members. The link graph is non-reciprocal and niche/DR-matched, so it builds real authority without pattern-matching as a scheme. Learn more at **[rankgoat.app](https://rankgoat.app)** or read the [API reference](https://rankgoat.app/docs/api).\n\n## License\n\n[MIT](./LICENSE) © [RedStudio](https://rankgoat.app)\n",
  "bytes": 6043,
  "sha": "cd49eb1cdb85ed61cb596f718ce8987a4b145920b8bfb5579dad736ffe65992c",
  "repo_slug": "madrzak/rankgoat-cli",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_madrzak_rankgoat_64ba4ee0/readme"
}