{
  "markdown": "# Anomalia CLI — Social Media AI Automation CLI, MCP Server & Agent Skill\n\n**Automate your social media from the terminal.** [Anomalia](https://anomalia.so) is the social\nmedia AI autopilot that plans, writes, designs and publishes posts, blog articles and SEO/GEO\naudits on autopilot. This repository is its command-line client, [MCP server](docs/mcp.md)\n(Model Context Protocol — `stdio` + HTTP) and agent skill: everything you need to run social\nmedia automation, content generation and approval workflows from a terminal or an AI agent.\n\nThis repository ships **three ways** to drive the same product (same OAuth, same API, **no static tokens**):\n\n| | What | Who it’s for |\n|---|------|----------------|\n| **CLI** | `anomalia` terminal commands | Humans & scripts |\n| **MCP** | Model Context Protocol server (`stdio` + HTTP) | Cursor, Claude, other MCP hosts |\n| **Skill** | Agent Skill (`skills/anomalia/`) | Coding agents / skills.sh / `npx skills` |\n\n> **You need an Anomalia account.** This is a client, not a standalone tool: every call talks to\n> the Anomalia API over HTTPS. Without an account there is nothing to drive.\n\nWith the Anomalia CLI you can automate social media posting, approve AI-generated content in one\ntap, edit a carousel slide by slide, turn a post into a video, run SEO and GEO audits, and manage\nyour blog — from the terminal **or** from an AI agent like Cursor or Claude.\n\n```text\n┌─────────────┐   ┌─────────────┐   ┌──────────────────┐\n│  anomalia   │   │  MCP host   │   │  Agent + Skill   │\n│    CLI      │   │ (Cursor…)   │   │  (npx skills)    │\n└──────┬──────┘   └──────┬──────┘   └────────┬─────────┘\n       │                 │                   │\n       │    lib/api.ts + OAuth session       │\n       └─────────────────┼───────────────────┘\n                         ▼\n                 Anomalia /api/v1/*\n```\n\n---\n\n## 1. CLI\n\n### Install\n\nPick one:\n\n| Method | Command | Notes |\n|--------|---------|--------|\n| **npm** | `npm install -g anomalia-cli` | Needs Node.js ≥ 20 |\n| **Homebrew** | see below | macOS / Linux, standalone binary |\n| **Installer** | see below | curl script → binary on PATH |\n| **From source** | see below | Needs [Bun](https://bun.sh) |\n\n**npm**\n\n```bash\nnpm install -g anomalia-cli\n# or:  pnpm add -g anomalia-cli   /   bun add -g anomalia-cli\nanomalia login\n```\n\n**Homebrew**\n\n```bash\nbrew tap andreabuttarelli/anomalia-cli https://github.com/andreabuttarelli/anomalia-cli\nbrew install anomalia\nanomalia login\n```\n\n**Installer (standalone binary)** — macOS arm64/x64 and Linux arm64/x64, no Node/Bun required:\n\n```bash\ncurl -sSL https://raw.githubusercontent.com/andreabuttarelli/anomalia-cli/main/scripts/install.sh | bash\nanomalia login\n```\n\nUpdate later with `anomalia update`, or `npm install -g anomalia-cli@latest` / `brew upgrade anomalia` depending on how you installed. More detail: [`docs/distribute.md`](docs/distribute.md).\n\n### Quick start\n\n```bash\nanomalia brands\nanomalia dashboard my-brand\nanomalia content my-brand --status pending_user\nanomalia approve my-brand --all\nanomalia seo my-brand\nanomalia web my-brand generate --topic \"...\"\nanomalia ads my-brand --remix\nanomalia ai my-brand --message \"...\" --pipe\n```\n\nEvery command takes the brand slug as its first argument. `anomalia --help` lists them all;\n`anomalia <command> --help` details one. Short id prefixes from tables are accepted; ambiguous\nprefixes error instead of guessing.\n\n| Area | Commands |\n|------|----------|\n| Posts | `content`, `approve`, `post <id> [show\\|edit\\|regenerate\\|slide\\|reorder\\|video\\|publish]` |\n| Planning | `plan`, `weekly-plan`, `calendar`, `gtm` |\n| Brand | `studio`, `voice`, `people`, `products` |\n| Web | `seo`, `geo`, `keywords`, `web` |\n| Ads | `ads` — campaigns, spend, boost proposals, remix, duplicate/delete (`--sync`, `--propose`, `--remix`, `--create`, `--approve`, `--pause`, `--resume`, `--duplicate`, `--delete`, `--reject`, `--ad` per singola creatività) |\n| Insight | `dashboard`, `status`, `analytics` |\n| AI | `ai --message \"...\"` — natural language, full read/write access |\n\nFull command dump: [`llms.txt`](llms.txt) · more docs: [`docs/`](docs/)\n\n### From source\n\nRequires [Bun](https://bun.sh).\n\n```bash\ngit clone https://github.com/andreabuttarelli/anomalia-cli.git\ncd anomalia-cli\nbun install\nbun run cli.ts --help\n```\n\n---\n\n## 2. MCP server\n\nSame tools and OAuth as the CLI. Docs: **[`docs/mcp.md`](docs/mcp.md)**.\n\n```bash\nbun run mcp          # stdio (local hosts)\nbun run mcp:http     # http://localhost:8787/mcp\n```\n\nRemote: `https://mcp.anomalia.so/mcp` (Bearer JWT required). Health: `GET /health`.\n\n**Cursor — stdio**\n\n```json\n{\n  \"mcpServers\": {\n    \"anomalia\": {\n      \"command\": \"bun\",\n      \"args\": [\"run\", \"/ABS/PATH/to/anomalia-cli/mcp/stdio.ts\"]\n    }\n  }\n}\n```\n\n**Cursor — HTTP**\n\n```json\n{\n  \"mcpServers\": {\n    \"anomalia\": { \"url\": \"https://mcp.anomalia.so/mcp\" }\n  }\n}\n```\n\nIf Connect fails with `Not an https or loopback URI: cursor://…`, your Cursor build is still\nusing the custom-scheme OAuth callback — use **stdio** above, update Cursor (loopback\n`http://localhost:8787/callback`), or see [`docs/mcp.md`](docs/mcp.md#cursor--remote-http-oauth).\n\n- Local stdio: `login` tool or existing `anomalia login` → `~/.config/anomalia/session.json`\n- Remote HTTP: `Authorization: Bearer <access_token>` (401 without it is expected)\n\n---\n\n## 3. Agent Skill & plugins\n\nPublishable [Agent Skill](https://agentskills.io) for Cursor, Claude, skills.sh, and friends:\n\n```bash\nnpx skills add andreabuttarelli/anomalia-cli --skill anomalia\n# or\nbash scripts/install-skill.sh --project\n```\n\nPackage: [`skills/anomalia/`](skills/anomalia/) → [`plugins/anomalia/skills/anomalia/`](plugins/anomalia/) (`SKILL.md` + `references/` for MCP setup, tool map, CLI).\n\nWhen the skill is active, agents prefer **MCP tools** if connected, otherwise the **CLI**.\n\n### Claude Code / Codex marketplace plugin\n\nSame skill + remote MCP, packaged for plugin install and directory submit:\n\n```bash\n# Claude Code\n/plugin marketplace add andreabuttarelli/anomalia-cli\n/plugin install anomalia@anomalia\n\n# Codex\ncodex plugin marketplace add andreabuttarelli/anomalia-cli\n```\n\nSubmit checklist (Claude community directory + OpenAI Plugins Directory): **[`docs/plugins.md`](docs/plugins.md)**.\n\n---\n\n## Configuration\n\nZero config by default → `https://anomalia.so`, with automatic fallback to\n`http://localhost:5173` when a local app is answering.\n\n| Variable | Purpose |\n|----------|---------|\n| `PUBLIC_APP_URL` | Point CLI/MCP at another Anomalia instance |\n| `SENTRY_DSN` | (MCP HTTP / Vercel) Errors → Sentry |\n| `SUPABASE_SERVICE_ROLE_KEY` | (MCP HTTP / Vercel) Rows in `mcp_logs` |\n| `MCP_PUBLIC_URL` | Public MCP base URL for OAuth metadata |\n\nSession: `~/.config/anomalia/session.json`. `anomalia logout` clears it. No secrets are embedded\nin this repo or the binary.\n\n---\n\n## Architecture\n\nThin HTTPS client — no DB access, no coupling to the Anomalia server codebase:\n\n```\nCLI  ──┐\nMCP  ──┼── HTTPS ──►  /api/v1/*  ──►  Anomalia\nSkill ─┘   (guides agents to CLI or MCP)\n```\n\n- CLI commands: `commands/` + `cli.ts`\n- HTTP client: `lib/api.ts` only\n- MCP: `mcp/` (reuses `lib/api.ts`, registers tools)\n- Skill / plugins: `skills/anomalia/` → `plugins/anomalia/` (Claude + Codex marketplace manifests)\n\n---\n\n## Development\n\n```bash\nbun install\nbun run cli.ts --help\nbun run mcp\nbun run mcp:http\nbun run typecheck\nbun test\nbun run build             # binary → dist/\nbun run build:all         # all four targets\nbun run vercel-build      # MCP bundles under mcp/api/\n```\n\nReleases: push a `v*` tag → CI typechecks, tests, cross-compiles binaries + `.tar.gz` +\n`SHA256SUMS.txt` on the GitHub Release, bumps [`Formula/anomalia.rb`](Formula/anomalia.rb),\nand publishes `anomalia-cli` to npm when `NPM_TOKEN` is set. Details: [`docs/distribute.md`](docs/distribute.md).\n\n---\n\n## License\n\nCopyright © 2026 Andrea Buttarelli.\n\nLicensed under the [GNU Affero General Public License v3.0 or later](LICENSE). You may use, modify\nand redistribute it, but derivative works must stay open source under the same license, must keep\nthe copyright notice, and must state their changes — including when offered to users over a\nnetwork.\n",
  "bytes": 8204,
  "sha": "516fb18fe445046571edfa2b1a8a10c9d5e71444d34d68a4ed2577a3c803d5ea",
  "repo_slug": "andreabuttarelli/anomalia-cli",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_andreabuttarelli_anomalia_a8fb820a/readme"
}