{"_id":"@andiai/cli","_rev":"5-35048682507ab5e9854eee1e4b69bda0","name":"@andiai/cli","dist-tags":{"latest":"0.1.6"},"versions":{"0.1.2":{"name":"@andiai/cli","version":"0.1.2","keywords":["andi","search","web-search","mcp","model-context-protocol","cli","ai-agent"],"license":"UNLICENSED","_id":"@andiai/cli@0.1.2","maintainers":[{"name":"jedwhite","email":"jed@andiai.com"}],"homepage":"https://api.andiai.com","bugs":{"url":"https://github.com/andisearch/andi-cli/issues"},"bin":{"andi":"dist/cli.js"},"dist":{"shasum":"da369e5c17d3096f4481a0c8138ae474d1a80364","tarball":"https://registry.npmjs.org/@andiai/cli/-/cli-0.1.2.tgz","fileCount":5,"integrity":"sha512-LctEDZkgpVh9j94JYt9RFo8Kldq2tQK3D2lvebDp0pMwNaDHCaa9BVsP6LES0SHh34S6oOKm7upi6vIs9CyAcA==","signatures":[{"sig":"MEUCIQDAyEiXmBOctsPd4KwLaabuuS6vkTbiQsyFkivF8nv4nQIgfUMctiBVoYcQVFqgsHSbd2ul/fiEQoUN2lZnunNqrlk=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":73417},"type":"module","engines":{"node":">=20"},"gitHead":"a4e99acd4c3df23de3877faa79726943df52b526","scripts":{"dev":"tsx src/cli.ts","test":"vitest run","build":"tsup","prepack":"npm run build","typecheck":"tsc --noEmit"},"_npmUser":{"name":"jedwhite","email":"jed@andiai.com"},"repository":{"url":"git+https://github.com/andisearch/andi-cli.git","type":"git"},"_npmVersion":"11.16.0","description":"Command-line interface for the Andi Search API — web search, page fetch, and a local MCP server for AI agents.","directories":{},"_nodeVersion":"24.14.1","dependencies":{"zod":"^3.25.76","@modelcontextprotocol/sdk":"^1.30.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.23.9","tsup":"^8.5.1","vitest":"^4.1.10","typescript":"^5.3.3","@types/node":"^24.13.3"},"_npmOperationalInternal":{"tmp":"tmp/cli_0.1.2_1786660112016_0.3421021749672364","host":"s3://npm-registry-packages-npm-production"}},"0.1.3":{"name":"@andiai/cli","version":"0.1.3","keywords":["andi","search","web-search","mcp","model-context-protocol","cli","ai-agent"],"author":{"url":"https://andiai.com","name":"Andi AI"},"license":"MIT","_id":"@andiai/cli@0.1.3","maintainers":[{"name":"jedwhite","email":"jed@andiai.com"}],"homepage":"https://andiai.com/api","bugs":{"url":"https://github.com/andisearch/andi-cli/issues"},"bin":{"andi":"dist/cli.js"},"dist":{"shasum":"42e70e21b551ec6880821642f205ea378f16811c","tarball":"https://registry.npmjs.org/@andiai/cli/-/cli-0.1.3.tgz","fileCount":6,"integrity":"sha512-JK8wspaDhv9tX8lGm/7dg7a14BAKoDH4OwaH2SYossKbOhG+gJi8G1JUV+EYWMizZbtAhoXUo99eHGQ/T/dFeg==","signatures":[{"sig":"MEQCIAnhUSZBJsdKzfPlPoIs6RHH02kziCUcNQ6bTzUrX40qAiBvU/zi2mk5edRtbfdztiv8qG2RMPCFXk1q0IbcmvwiHA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@andiai%2fcli@0.1.3","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":76185},"type":"module","engines":{"node":">=20"},"gitHead":"9e12c3ff8aa250c26cfcb76a5926934c235ecd68","scripts":{"dev":"tsx src/cli.ts","test":"vitest run","build":"tsup","prepack":"npm run build","typecheck":"tsc --noEmit"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:e5d449e1-4a77-4526-9bb5-b3beda03a36e"}},"repository":{"url":"git+https://github.com/andisearch/andi-cli.git","type":"git"},"_npmVersion":"11.16.0","description":"Command-line interface for the Andi Search API — web search, page fetch, and a local MCP server for AI agents.","directories":{},"_nodeVersion":"24.18.0","dependencies":{"zod":"^3.25.76","@modelcontextprotocol/sdk":"^1.30.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.23.9","tsup":"^8.5.1","vitest":"^4.1.10","typescript":"^5.3.3","@types/node":"^24.13.3"},"_npmOperationalInternal":{"tmp":"tmp/cli_0.1.3_1786661648634_0.2770275316160282","host":"s3://npm-registry-packages-npm-production"}},"0.1.4":{"name":"@andiai/cli","version":"0.1.4","keywords":["andi","search","web-search","mcp","model-context-protocol","cli","ai-agent"],"author":{"url":"https://andiai.com","name":"Andi AI"},"license":"MIT","_id":"@andiai/cli@0.1.4","maintainers":[{"name":"jedwhite","email":"jed@andiai.com"}],"homepage":"https://andiai.com/api","bugs":{"url":"https://github.com/andisearch/andi-cli/issues"},"bin":{"andi":"dist/cli.js"},"dist":{"shasum":"ab1b627706a5a8546eeee90798af5d7229ac081f","tarball":"https://registry.npmjs.org/@andiai/cli/-/cli-0.1.4.tgz","fileCount":6,"integrity":"sha512-71rzgrswxox7jeIP92ImB2Q7PQGLUiJsCbLt1NiJ+jk+AAIDOk/86HjjpN0Nb97ZEIE/1ArWOa5yZBhKbJRTfw==","signatures":[{"sig":"MEUCIQDK3sIk+KskSB4tnMx72ZblduKPM3e8QSPbDXTkBMhqoQIgRdtPwApPqfkPeSi16g6riQqpmAf1UPlZTTxxnt839r4=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@andiai%2fcli@0.1.4","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":79453},"type":"module","engines":{"node":">=20"},"gitHead":"46522b7aa47dffcea41af7d6b93242fc427ac70e","scripts":{"dev":"tsx src/cli.ts","test":"vitest run","build":"tsup","prepack":"npm run build","typecheck":"tsc --noEmit"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:e5d449e1-4a77-4526-9bb5-b3beda03a36e"}},"repository":{"url":"git+https://github.com/andisearch/andi-cli.git","type":"git"},"_npmVersion":"11.17.0","description":"Command-line interface for the Andi Search API — web search, page fetch, and a local MCP server for AI agents.","directories":{},"_nodeVersion":"24.19.0","dependencies":{"zod":"^3.25.76","@modelcontextprotocol/sdk":"^1.30.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.23.9","tsup":"^8.5.1","vitest":"^4.1.10","typescript":"^5.3.3","@types/node":"^24.13.3"},"_npmOperationalInternal":{"tmp":"tmp/cli_0.1.4_1786760526493_0.7534852221888622","host":"s3://npm-registry-packages-npm-production"}},"0.1.5":{"name":"@andiai/cli","version":"0.1.5","keywords":["andi","search","web-search","mcp","model-context-protocol","cli","ai-agent"],"author":{"url":"https://andiai.com","name":"Andi AI"},"license":"MIT","_id":"@andiai/cli@0.1.5","maintainers":[{"name":"jedwhite","email":"jed@andiai.com"}],"homepage":"https://andiai.com/api","bugs":{"url":"https://github.com/andisearch/andi-cli/issues"},"bin":{"andi":"dist/cli.js"},"dist":{"shasum":"29aa5505023c3c3e9bf231468b7ac762ab5d5d13","tarball":"https://registry.npmjs.org/@andiai/cli/-/cli-0.1.5.tgz","fileCount":6,"integrity":"sha512-HGgHQvWTRRFRaYsVvX361u0kYowxhiQFrPTR1g5YolXpRMWZdizndkLVj1jOz2MRx/PippiGXEx6AXLQpPa1/w==","signatures":[{"sig":"MEQCIEbUZlE8J4FSNKx0BngcDoRluMnQlbHFC0ffMFlA11FAAiA0hpwuarlbHW1i+cS5S2rL5FcxuHbjzzIsiKdmDpc2Fg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@andiai%2fcli@0.1.5","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":82176},"type":"module","engines":{"node":">=20"},"gitHead":"3a73f333af2a338b26eb8dd6a2e0cd2bf5548e26","scripts":{"dev":"tsx src/cli.ts","test":"vitest run","build":"tsup","prepack":"npm run build","typecheck":"tsc --noEmit"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:e5d449e1-4a77-4526-9bb5-b3beda03a36e"}},"repository":{"url":"git+https://github.com/andisearch/andi-cli.git","type":"git"},"_npmVersion":"11.17.0","description":"Command-line interface for the Andi Search API — web search, page fetch, and a local MCP server for AI agents.","directories":{},"_nodeVersion":"24.19.0","dependencies":{"zod":"^3.25.76","@modelcontextprotocol/sdk":"^1.30.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.23.9","tsup":"^8.5.1","vitest":"^4.1.10","typescript":"^5.3.3","@types/node":"^24.13.3"},"_npmOperationalInternal":{"tmp":"tmp/cli_0.1.5_1786765383817_0.9826304689161869","host":"s3://npm-registry-packages-npm-production"}},"0.1.6":{"name":"@andiai/cli","version":"0.1.6","description":"Command-line interface for the Andi Search API — web search, page fetch, and a local MCP server for AI agents.","type":"module","bin":{"andi":"dist/cli.js"},"engines":{"node":">=20"},"publishConfig":{"access":"public"},"license":"MIT","author":{"name":"Andi AI","url":"https://andiai.com"},"repository":{"type":"git","url":"git+https://github.com/andisearch/andi-cli.git"},"homepage":"https://andiai.com/api","bugs":{"url":"https://github.com/andisearch/andi-cli/issues"},"keywords":["andi","search","web-search","mcp","model-context-protocol","cli","ai-agent"],"scripts":{"build":"tsup","prepack":"npm run build","dev":"tsx src/cli.ts","test":"vitest run","typecheck":"tsc --noEmit"},"dependencies":{"@modelcontextprotocol/sdk":"^1.30.0","zod":"^3.25.76"},"devDependencies":{"@types/node":"^24.13.3","tsup":"^8.5.1","tsx":"^4.23.9","typescript":"^5.3.3","vitest":"^4.1.10"},"gitHead":"eada09e2073a5c04af40f044818e70b73b318b5d","_id":"@andiai/cli@0.1.6","_nodeVersion":"24.19.0","_npmVersion":"11.17.0","dist":{"integrity":"sha512-31gIGQnvZkX2cDIB3lqdusTmrMPLxdHV+tnbaR7M8P+Ua8c4wQ81u8Hw+8QKZSFUlZFX5zcq1RgqG08d5ELbqA==","shasum":"9cfb6db90ed4fa874c5b5089e2a23e38cfc317b9","tarball":"https://registry.npmjs.org/@andiai/cli/-/cli-0.1.6.tgz","fileCount":6,"unpackedSize":82302,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@andiai%2fcli@0.1.6","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIEt0KE8Rhu9KawGgU5NlXp+tEPArEP1Q7heQYmWghCbfAiBmFi7uAntzERmGpA7vmS5lNCcSojNsjrc+DXJZPsV4uQ=="}]},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:e5d449e1-4a77-4526-9bb5-b3beda03a36e"}},"directories":{},"maintainers":[{"name":"jedwhite","email":"jed@andiai.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/cli_0.1.6_1786775272429_0.2924794073494288"},"_hasShrinkwrap":false}},"time":{"created":"2026-08-13T22:28:31.866Z","modified":"2026-08-15T06:27:52.954Z","0.1.2":"2026-08-13T22:28:32.267Z","0.1.3":"2026-08-13T22:54:08.795Z","0.1.4":"2026-08-15T02:22:06.636Z","0.1.5":"2026-08-15T03:43:03.964Z","0.1.6":"2026-08-15T06:27:52.604Z"},"bugs":{"url":"https://github.com/andisearch/andi-cli/issues"},"author":{"name":"Andi AI","url":"https://andiai.com"},"license":"MIT","homepage":"https://andiai.com/api","keywords":["andi","search","web-search","mcp","model-context-protocol","cli","ai-agent"],"repository":{"type":"git","url":"git+https://github.com/andisearch/andi-cli.git"},"description":"Command-line interface for the Andi Search API — web search, page fetch, and a local MCP server for AI agents.","maintainers":[{"name":"jedwhite","email":"jed@andiai.com"}],"readme":"# @andiai/cli\n\nCommand-line interface for the [Andi Search API](https://api.andiai.com) — web search, page\nfetch, and a local MCP server, all hitting the live hosted API directly. No local search index,\nno local ranking: this is a thin client.\n\n## Quick Start\n\n```bash\nnpx -y @andiai/cli search \"andi search api\" --json\n```\n\nOr install it globally:\n\n```bash\nnpm install -g @andiai/cli\nandi search \"current weather in san francisco\"\n```\n\n## Auth\n\nGet a key: https://console.andiai.com/signup — full auth details: https://api.andiai.com/auth.md\n\nPrecedence: `--api-key <key>` flag > `ANDI_API_KEY` env var > `~/.andi/config.json` (`{\"apiKey\":\n\"...\"}`) > none. `andi --help` and `andi schema` work without a key.\n\n```bash\nexport ANDI_API_KEY=sk-...\nandi search \"typescript satisfies operator\"\n```\n\n## Commands\n\n### `andi search \"<query>\" [\"<query>\" ...] [flags]`\n\n```bash\nandi search \"who won the 2026 f1 championship\" --mode deep --limit 5\nandi search \"rust async runtime\" \"tokio vs async-std\" --limit 8   # one call, fused ranking\nandi search \"latest andi search api changes\" --effort high        # thoroughness dial, independent of --mode\n```\n\n- `--mode <mode>` — `auto` (default) `low-cost` `fast` `balanced` `deep` `exhaustive`\n- `--effort <level>` — `low` `medium` `high` `max`, thoroughness dial independent of `--mode`; omit for\n  adaptive default; an explicit `--mode` wins\n- `--limit <n>` — number of results (default 10)\n- `--offset <n>` — result offset for pagination (default 0)\n- `--country <iso2>` — ISO-2 country code for localization (e.g. `US`, `DE`)\n- `--language <code>` — ISO language code (e.g. `en`, `de`)\n- `--safe <level>` — `off` `moderate` `strict`\n- `--date-range <range>` — `24h` `7d` `30d` `90d` `1y`\n- `--include-domains <list>` / `--exclude-domains <list>` — comma-separated domains\n- `--content` — fetch full page content for top results instead of extracts (slower, costs more)\n- `--max-content-length <n>` — cap content characters per result when `--content` is set\n- `--metadata <level>` — `basic` `full`; context format (the default for agent/markdown output)\n  uses `full` by default — content_type, word_count, lang, publisher, and more per result\n- `--no-extracts` — disable query-relevant passage extracts on context-format output (on by default there)\n- `--format <format>`, `--json`, `--api-key <key>`\n\nUp to 5 queries may be given at once. They are answered in a single API call and fused into\none ranked result set.\n\n### `andi fetch <url> [flags]`\n\n```bash\nandi fetch https://example.com/article --json\nandi fetch https://example.com/pricing --query \"what does the team plan cost\"\nandi fetch https://example.com/article --effort max   # thoroughness dial for content retrieval\necho \"https://example.com/article\" | andi fetch\n```\n\n- `--query <text>` — question or topic to focus the extracts on\n- `--effort <level>` — `low` `medium` `high` `max`, thoroughness dial for content retrieval; omit for\n  adaptive default\n- `--max-content-length <n>` — cap returned content characters (default 100000, max 200000)\n- `--no-retry` — disable retrying on a 503 \"content warming\" response (fail immediately, as before)\n- `--retry-max <seconds>` — cumulative wait budget across retries of a 503 (default 30)\n- `--format <format>`, `--json`, `--api-key <key>`\n\nOn a 503 \"content warming\" response (the page is still being retrieved), `fetch` retries\nautomatically: up to 3 total attempts, waiting the API's `Retry-After` hint each time, capped so\nit never waits past 30 total seconds (or `--retry-max`). If retries are exhausted, the error is\nthe same one you'd have gotten without retrying — same message, exit code 7.\n\n### `andi mcp`\n\nRuns a local stdio MCP server exposing the same two tools as the hosted remote server\n(`andi_web_search`, `andi_fetch_url`) — useful for MCP clients that only speak stdio.\nFor HTTP-capable clients, prefer the hosted endpoint directly (no CLI install needed):\n\n```json\n{\n  \"mcpServers\": {\n    \"andi\": {\n      \"url\": \"https://api.andiai.com/mcp\",\n      \"headers\": { \"x-api-key\": \"YOUR_API_KEY\" }\n    }\n  }\n}\n```\n\nstdio via this CLI:\n\n```json\n{\n  \"mcpServers\": {\n    \"andi\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@andiai/cli\", \"mcp\"],\n      \"env\": { \"ANDI_API_KEY\": \"YOUR_API_KEY\" }\n    }\n  }\n}\n```\n\n### `andi schema`\n\nPrints machine-readable JSON describing every command, flag, enum, and exit code — for agents\nthat want to introspect the CLI instead of scraping `--help`.\n\n## Output format\n\n`--format auto|json|markdown` decides the shape. `auto` (the default) writes human-readable\nmarkdown (`format=context`) on an interactive terminal and the JSON envelope when stdout is\npiped or redirected. An explicit value always wins, so this writes real markdown to a file:\n\n```bash\nandi search \"postgres index types\" --format markdown > notes.md\n```\n\n- JSON: an envelope, never a bare array — `{\"ok\": true, \"data\": ..., \"error\": null, \"meta\": {...}}`.\n- Errors: `{\"code\", \"message\", \"hint\", \"retryable\", \"reason?\", \"retryAfterSeconds?\"}`, printed\n  to stderr in markdown mode or as `{\"ok\": false, \"error\": {...}}` on stdout in JSON mode.\n- `--json` is an alias for `--format json`.\n\n## Exit codes\n\n| Code | Name | Meaning |\n|---|---|---|\n| 0 | ok | success |\n| 1 | generic | unclassified failure |\n| 2 | invalid_args | bad arguments, or a 400 from the API |\n| 3 | auth | auth failure (401 / missing key) |\n| 4 | payment | payment required (402 / credits exhausted) |\n| 5 | rate_limit | rate limited (429) — `retryAfterSeconds` when the API sent one |\n| 6 | timeout | the request exceeded the client timeout |\n| 7 | service_unavailable | 503/408/504 — temporary, **retryable**; carries the API's `message` and `retryAfterSeconds` (a 503 on `fetch` usually means the page is still being retrieved) |\n| 8 | unprocessable | 422 from `fetch` — the page itself failed, **not retryable**; `reason` is `not_found`, `blocked`, or `unextractable` |\n\n## Environment variables\n\n- `ANDI_API_KEY` — API key\n- `ANDI_API_BASE` — override the API base URL (default `https://api.andiai.com`)\n- `NO_COLOR` — respected; ANSI stripped automatically when stdout is not a TTY\n\n## Links\n\n- API reference: https://docs.andiai.com\n- Agent install guide: https://api.andiai.com/install.md\n- Auth guide: https://api.andiai.com/auth.md\n- Machine-readable API description: https://api.andiai.com/llms.txt\n\n## Local development\n\n```bash\nnpm install\nnpm run dev -- search \"test query\" --json   # runs src/cli.ts directly via tsx\nnpm run typecheck\nnpm test\nnpm run build                               # emits dist/cli.js (ESM) + dist/cli.cjs (CJS)\n```\n\n## Releasing (maintainers)\n\nReleases publish to npm via **trusted publishing** (GitHub Actions OIDC with provenance) — no\nnpm token exists anywhere. The trusted publisher is registered on npmjs.com for this package\n(repo `andisearch/andi-cli`, workflow `release.yml`).\n\n1. Bump the version in **three files together**: `package.json` (`version`), `VERSION`, and\n   `src/version.ts` (`CLI_VERSION`). They are hand-synced; the release workflow fails the\n   publish if they disagree. Patch bumps (`0.1.N`) unless a minor/major is explicitly agreed.\n2. Add a `CHANGELOG.md` entry for the version.\n3. Commit and push to `main`.\n4. Trigger the release: GitHub → Actions → **Release** → Run workflow (or\n   `gh workflow run release.yml`). It never fires on push — publishing is always a deliberate,\n   manual trigger. The workflow checks version consistency, runs typecheck + tests, builds,\n   and runs `npm publish --provenance`.\n\nDo not run `npm publish` locally; a published version number can never be reused, and local\npublishes skip provenance.\n\n## License\n\nMIT © [Andi AI](https://andiai.com) — see [LICENSE](./LICENSE) (LazyWeb Inc DBA Andi).\n","readmeFilename":"README.md"}