{"_id":"@apidex/cli","_rev":"4-e3ad94b9510d9fe8b09e846b01631bdb","name":"@apidex/cli","dist-tags":{"latest":"0.2.0"},"versions":{"0.1.0":{"name":"@apidex/cli","version":"0.1.0","keywords":["apidex","openapi","api","documentation","cli"],"author":{"name":"Apidex Team"},"license":"MIT","_id":"@apidex/cli@0.1.0","maintainers":[{"name":"mmunjako","email":"mmunjako@gmail.com"}],"bin":{"apidex":"bin/apidex.js"},"dist":{"shasum":"87409ebb9d26ce2283b0f9a10846f5d171049663","tarball":"https://registry.npmjs.org/@apidex/cli/-/cli-0.1.0.tgz","fileCount":7,"integrity":"sha512-TZctU4d3heYgB1V5K0Or9C12DTEKCq0gQD7ZA4q9EDZG54bx8u5QT0rdKMGwopkcSja/rNagTHalho2cHzwb0A==","signatures":[{"sig":"MEQCIFXVBy1jkgQMt75wwiyRneWvAbXydddKTgim49b9htiyAiBBs6pHBKPt3uE2IQH5oHxUGDSj3WLnj4gsfsUXIcuxdQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":12415},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=18.0.0"},"gitHead":"c138e3132820c36a09a14660611248e5fabced26","scripts":{"dev":"tsc --watch","test":"jest","build":"tsc","prepublishOnly":"npm run build"},"_npmUser":{"name":"mmunjako","email":"mmunjako@gmail.com"},"_npmVersion":"10.9.3","description":"CLI tool for uploading OpenAPI specifications to Apidex","directories":{},"_nodeVersion":"22.20.0","dependencies":{"ora":"^7.0.1","yaml":"^2.3.4","chalk":"^5.3.0","commander":"^11.1.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","typescript":"^5.3.3","@types/jest":"^29.5.11","@types/node":"^20.10.5"},"_npmOperationalInternal":{"tmp":"tmp/cli_0.1.0_1765820418323_0.634345377316686","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@apidex/cli","version":"0.1.1","keywords":["apidex","openapi","api","documentation","cli"],"author":{"name":"Apidex Team"},"license":"MIT","_id":"@apidex/cli@0.1.1","maintainers":[{"name":"mmunjako","email":"mmunjako@gmail.com"}],"bin":{"apidex":"bin/apidex.js"},"dist":{"shasum":"3782ccebd03dd66ca519bcab89fe3ca322d8a077","tarball":"https://registry.npmjs.org/@apidex/cli/-/cli-0.1.1.tgz","fileCount":7,"integrity":"sha512-QnDyX0buB6HfkuLjWwqMzh1+Gq/EkbdaBXBkaeQghz0wM4DfRsWVxg4TAPMdwx9XTOg64PUpP+Z+rvIO2IpljA==","signatures":[{"sig":"MEUCIFVUuC2bL7ae3eFPBF5pFYYQe6ycx5zKW1VKy/LqT7DEAiEA4Lnl2gaG1blhgdH1pLigu/YY48wgbxTjYpoFFlMk/Qw=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":12427},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=18.0.0"},"gitHead":"f2fa4ebd2ef1517b144c06778a0f825a0e44eb2a","scripts":{"dev":"tsc --watch","test":"jest","build":"tsc","prepublishOnly":"npm run build"},"_npmUser":{"name":"mmunjako","email":"mmunjako@gmail.com"},"_npmVersion":"10.9.3","description":"CLI tool for uploading OpenAPI specifications to Apidex","directories":{},"_nodeVersion":"22.20.0","dependencies":{"ora":"^5.4.1","yaml":"^2.3.4","chalk":"^4.1.2","commander":"^11.1.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","typescript":"^5.3.3","@types/jest":"^29.5.11","@types/node":"^20.10.5"},"_npmOperationalInternal":{"tmp":"tmp/cli_0.1.1_1765918731558_0.23617936537490403","host":"s3://npm-registry-packages-npm-production"}},"0.1.2":{"name":"@apidex/cli","version":"0.1.2","keywords":["apidex","openapi","api","documentation","cli"],"author":{"name":"Apidex Team"},"license":"MIT","_id":"@apidex/cli@0.1.2","maintainers":[{"name":"mmunjako","email":"mmunjako@gmail.com"}],"bin":{"apidex":"bin/apidex.js"},"dist":{"shasum":"05122b5592906ba842790ff1e00bca3c2cb74565","tarball":"https://registry.npmjs.org/@apidex/cli/-/cli-0.1.2.tgz","fileCount":7,"integrity":"sha512-sO6D/Ky+3sbhL95Yg+2+w5Vt/wufxniQvMuUYHGdIoBBXi8gHH6i3m0GBU8af1vXeuA8GxFeqnezSXc6EZo8vg==","signatures":[{"sig":"MEUCIQCdk/L1gg+aoBg7WS2xmaSKKXh4oiWO+GVTRalZ6hTwZwIgMBb/S0SWCrCMRWwweiIq4wxwKAA2S0nRi86nqtSnOhU=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":15405},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=18.0.0"},"gitHead":"695412f3626909953c79ac48b073a8bf5c9a2a08","scripts":{"dev":"tsc --watch","test":"jest","build":"tsc","prepublishOnly":"npm run build"},"_npmUser":{"name":"mmunjako","email":"mmunjako@gmail.com"},"_npmVersion":"10.9.3","description":"CLI tool for uploading OpenAPI specifications to Apidex","directories":{},"_nodeVersion":"22.20.0","dependencies":{"ora":"^5.4.1","yaml":"^2.3.4","chalk":"^4.1.2","commander":"^11.1.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","typescript":"^5.3.3","@types/jest":"^29.5.11","@types/node":"^20.10.5"},"_npmOperationalInternal":{"tmp":"tmp/cli_0.1.2_1765921075078_0.21776466922126136","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@apidex/cli","version":"0.2.0","description":"Official apidex.dev CLI tool for uploading API spec files","main":"dist/index.js","types":"dist/index.d.ts","bin":{"apidex":"bin/apidex.js"},"scripts":{"build":"tsc","dev":"tsc --watch","prepublishOnly":"npm run build","test":"npm run build && node scripts/cli-selftest.mjs","check-cooldown":"node scripts/check-cooldown.mjs"},"keywords":["apidex","openapi","api","documentation","cli"],"author":{"name":"Apidex Team"},"license":"MIT","engines":{"node":">=18.0.0"},"dependencies":{"commander":"11.1.0","yaml":"2.8.2","chalk":"4.1.2","ora":"5.4.1"},"devDependencies":{"@types/node":"20.19.27","typescript":"5.9.3","jest":"29.7.0","@types/jest":"29.5.14"},"gitHead":"ba30ceece833d36829042de6d661f5f79fba679d","_id":"@apidex/cli@0.2.0","_nodeVersion":"22.20.0","_npmVersion":"11.12.1","dist":{"integrity":"sha512-tSKnDAWUMCVAKKppbBa03+0xDq6HDrN14rOZU3wfAKSN6tnsnD/hVlSQ3qGoNzZYQAmlqt3s4fZNfgzD/BmQbA==","shasum":"6f33d329fdf001792f205de0e42119726575ab4c","tarball":"https://registry.npmjs.org/@apidex/cli/-/cli-0.2.0.tgz","fileCount":11,"unpackedSize":42438,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIAkqC7ademiECnZuFGrUhddrMST/BqKus0qFC4+lpxgPAiA6yB9hFm+HRH0JJLWUvffdIwfltbSRGtrryR36GpVK9g=="}]},"_npmUser":{"name":"mmunjako","email":"mmunjako@gmail.com"},"directories":{},"maintainers":[{"name":"mmunjako","email":"mmunjako@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/cli_0.2.0_1781943777416_0.5656471512390764"},"_hasShrinkwrap":false}},"time":{"created":"2025-12-15T17:40:18.249Z","modified":"2026-06-20T08:22:57.676Z","0.1.0":"2025-12-15T17:40:18.531Z","0.1.1":"2025-12-16T20:58:51.704Z","0.1.2":"2025-12-16T21:37:55.282Z","0.2.0":"2026-06-20T08:22:57.556Z"},"author":{"name":"Apidex Team"},"license":"MIT","keywords":["apidex","openapi","api","documentation","cli"],"description":"Official apidex.dev CLI tool for uploading API spec files","maintainers":[{"name":"mmunjako","email":"mmunjako@gmail.com"}],"readme":"# @apidex/cli\n\nAgent-native CLI for [apidex.dev](https://apidex.dev). Manage projects and API\nspecs from your terminal, CI, or an AI agent — no dashboard, no prompts.\n\n## Install\n\n```bash\nnpm install -g @apidex/cli\n# or run ad-hoc:\nnpx @apidex/cli --help\n```\n\n## Auth\n\nEvery command needs an API token (create one under **CLI** in the dashboard).\nProvide it with `--token` or the `APIDEX_TOKEN` environment variable.\n\n```bash\nexport APIDEX_TOKEN=apx_your_token_here\n```\n\nThe API base URL defaults to `https://api.apidex.dev`; override with `--api-url`\nor `APIDEX_API_URL`.\n\n## Global options\n\n| Option | Description |\n| --- | --- |\n| `-t, --token <token>` | API token (or set `APIDEX_TOKEN`) |\n| `--api-url <url>` | API base URL (or set `APIDEX_API_URL`) |\n| `--json` | Print the raw API response as JSON (for scripting/agents) |\n\n`--json` emits only the API response on stdout; in human mode you get a spinner\nand a short summary. Any failure exits non-zero with the error on stderr. There\nare no interactive prompts — missing required input is an error, not a question.\n\n## Commands\n\n### project\n\n```bash\napidex project create --name <name> [--theme <id>] [--description <text>]\napidex project list\napidex project remove <projectId>\n```\n\n`--theme` accepts any public-page theme id (e.g. `rose-pine`, `catppuccin`,\n`tokyo-night`, `nord`, `ayu`).\n\n### subdomain\n\n```bash\napidex subdomain set    <projectId> --subdomain <s>   # claim/change the {x}.apidex.dev address\napidex subdomain remove <projectId>                   # release it (reverts to a generated id)\n```\n\nThe subdomain is the project's public address segment. Use 3–32 lowercase\nletters, digits, or hyphens (no leading/trailing hyphen); a handful of words\n(`www`, `api`, `app`, …) are reserved. Changing it mutates the project's\ncanonical URL.\n\n### spec\n\n```bash\napidex spec sync   <projectId> --file <path> [--slug <s>] [--title <s>] [--public]\napidex spec remove <projectId> --slug <s>\n```\n\n`spec sync` is an **upsert**: with `--slug` it updates that spec (creating it if\nthe slug doesn't exist yet); without `--slug` it creates a new spec. Running the\nsame `--slug` command repeatedly is idempotent — ideal for CI.\n\n### guide\n\n```bash\napidex guide sync   <projectId> --file <path.md> [--slug <s>] [--title <s>]\napidex guide remove <projectId> --slug <s>\n```\n\n### changelog\n\n```bash\napidex changelog sync   <projectId> --file <path.md> [--slug <s>] [--title <s>]\napidex changelog remove <projectId> --slug <s>\n```\n\n`guide`/`changelog sync` read a markdown file and upsert exactly like `spec sync`.\nThe title comes from `--title`, else a YAML front-matter `title:`, else the first\n`# Heading` in the file. `--slug` (or a front-matter `slug:`) makes it an\nidempotent upsert; a front-matter `published_on:` sets a changelog entry's date.\n\n## Examples\n\nCreate a project and sync a spec into it, capturing JSON for an agent:\n\n```bash\nexport APIDEX_TOKEN=apx_...\nPROJECT=$(apidex project create --name \"My API\" --json | jq -r .public_id)\napidex spec sync \"$PROJECT\" --file ./openapi.json --slug my-api --public --json\n```\n\nGitHub Actions:\n\n```yaml\n- name: Sync API Docs\n  env:\n    APIDEX_TOKEN: ${{ secrets.APIDEX_TOKEN }}\n  run: |\n    npx @apidex/cli spec sync ${{ vars.APIDEX_PROJECT_ID }} \\\n      --file ./openapi.json --slug my-api --public\n```\n\n## Development\n\n```bash\nnpm install\nnpm run build   # tsc -> dist/\nnpm test        # builds, then runs scripts/cli-selftest.mjs (no network)\n```\n","readmeFilename":"README.md"}