{"_id":"@carverauto/serviceradar-cli","_rev":"6-6420fbf998eec9f2d5762b8e51e1c27b","name":"@carverauto/serviceradar-cli","dist-tags":{"latest":"0.1.5"},"versions":{"0.1.0":{"name":"@carverauto/serviceradar-cli","version":"0.1.0","license":"UNLICENSED","_id":"@carverauto/serviceradar-cli@0.1.0","maintainers":[{"name":"mfreeman451","email":"mfreeman@carverauto.dev"}],"bin":{"serviceradar-cli":"bin/serviceradar-cli.js","serviceradar-dashboard":"bin/serviceradar-dashboard.js"},"dist":{"shasum":"8889615fd1be7f91354601f415b6d8d90b14bd60","tarball":"https://registry.npmjs.org/@carverauto/serviceradar-cli/-/serviceradar-cli-0.1.0.tgz","fileCount":71,"integrity":"sha512-1jjxCMeJfzqJ0Aq7F0eJdQvHO1vCZjmqRP2RXiQaWZbiS/tUx7i+37qT3OMmYoiWRRbbPXVE63Jt24oGFCdpCA==","signatures":[{"sig":"MEUCIF7Siz2oz5P0pbaV74zmxg6ejBoxfljbHXFO4ADbACMUAiEAv2ewSMyVs7WYgL4RC6/WuwD/CzEEvIAfUX10VgsK34A=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":238946},"type":"module","engines":{"node":">=20"},"gitHead":"6b8bde468b8ba1ef355722691d66fe9cab4c8dd0","scripts":{"ci":"npm run typecheck && npm run build && node --test tests/*.test.mjs && npm run pack:check","test":"npm run build && node --test tests/*.test.mjs","build":"tsc -p tsconfig.build.json","typecheck":"tsc --noEmit","pack:check":"npm pack --dry-run .","prepublishOnly":"npm run build"},"_npmUser":{"name":"mfreeman451","email":"mfreeman@carverauto.dev"},"repository":{"url":"git+ssh://git@code.carverauto.dev/carverauto/serviceradar.git","type":"git","directory":"js/cli"},"_npmVersion":"10.8.2","description":"ServiceRadar developer CLI: dashboard authoring loop, auth, and tooling. Companion to @carverauto/serviceradar-dashboard-sdk.","directories":{},"_nodeVersion":"20.20.2","dependencies":{"ajv":"^8.17.1","vite":"^7.1.12","@vitejs/plugin-react":"^5.0.4"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.4.0","@types/node":"^22.0.0"},"_npmOperationalInternal":{"tmp":"tmp/serviceradar-cli_0.1.0_1777910984268_0.05164358104791544","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@carverauto/serviceradar-cli","version":"0.1.1","license":"UNLICENSED","_id":"@carverauto/serviceradar-cli@0.1.1","maintainers":[{"name":"mfreeman451","email":"mfreeman@carverauto.dev"}],"bin":{"serviceradar-cli":"bin/serviceradar-cli.js","serviceradar-dashboard":"bin/serviceradar-dashboard.js"},"dist":{"shasum":"e9993480900ee14b1e04e94261c2b585a2bd99e0","tarball":"https://registry.npmjs.org/@carverauto/serviceradar-cli/-/serviceradar-cli-0.1.1.tgz","fileCount":71,"integrity":"sha512-D7aGnVznNOFqeNMrDoF1dCHlAyHTzEfnf55Y8WUz6XQMi/UPObF33ZB/cp4aZ8ULA/ItJOo3/Kik7D1Lbw6wKA==","signatures":[{"sig":"MEQCICg6xyAcaCj00SGVeZmpNR/sfj0yDJglhUm/KVfo9AioAiBjz9pr3D8/u4escpUZ1SMLJu2Upg6Wra/5g98OxdxL4Q==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":249088},"type":"module","engines":{"node":">=20"},"gitHead":"61a0f3deb624d91d1275f5a6a813fa27c893752e","scripts":{"ci":"npm run typecheck && npm run build && node --test tests/*.test.mjs && npm run pack:check","test":"npm run build && node --test tests/*.test.mjs","build":"tsc -p tsconfig.build.json","typecheck":"tsc --noEmit","pack:check":"npm pack --dry-run .","prepublishOnly":"npm run build"},"_npmUser":{"name":"mfreeman451","email":"mfreeman@carverauto.dev"},"repository":{"url":"git+ssh://git@code.carverauto.dev/carverauto/serviceradar.git","type":"git","directory":"js/cli"},"_npmVersion":"10.8.2","description":"ServiceRadar developer CLI: dashboard authoring loop, auth, and tooling. Companion to @carverauto/serviceradar-dashboard-sdk.","directories":{},"_nodeVersion":"20.20.2","dependencies":{"ajv":"^8.17.1","vite":"^7.1.12","@vitejs/plugin-react":"^5.0.4"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.4.0","@types/node":"^22.0.0"},"_npmOperationalInternal":{"tmp":"tmp/serviceradar-cli_0.1.1_1777954874545_0.3619780704981139","host":"s3://npm-registry-packages-npm-production"}},"0.1.2":{"name":"@carverauto/serviceradar-cli","version":"0.1.2","license":"UNLICENSED","_id":"@carverauto/serviceradar-cli@0.1.2","maintainers":[{"name":"mfreeman451","email":"mfreeman@carverauto.dev"}],"bin":{"serviceradar-cli":"bin/serviceradar-cli.js","serviceradar-dashboard":"bin/serviceradar-dashboard.js"},"dist":{"shasum":"1977b6014a6a737ae479576205ab920429f3901f","tarball":"https://registry.npmjs.org/@carverauto/serviceradar-cli/-/serviceradar-cli-0.1.2.tgz","fileCount":71,"integrity":"sha512-nzd7Ig75mFrlfsYz5AIO2OS/HQj+J+OMNVtpkIlgSdzwjjCPIg8uSnI960Vtaudh2Ihmy3FZprVPws6LOClozQ==","signatures":[{"sig":"MEYCIQCw3omv4jBMnuT5VhgIF2ay+d/bxL6m5jkMBl6BaLrFNwIhAIqoKVVqGhlWf0DqldpuA7yfW1BmZb7Nq9etZsc9sXIP","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":250347},"type":"module","engines":{"node":">=20"},"gitHead":"c983f9ca08f84310fd73b20344fca61f85c0ca6e","scripts":{"ci":"npm run typecheck && npm run build && node --test tests/*.test.mjs && npm run pack:check","test":"npm run build && node --test tests/*.test.mjs","build":"tsc -p tsconfig.build.json","typecheck":"tsc --noEmit","pack:check":"npm pack --dry-run .","prepublishOnly":"npm run build"},"_npmUser":{"name":"mfreeman451","email":"mfreeman@carverauto.dev"},"repository":{"url":"git+ssh://git@code.carverauto.dev/carverauto/serviceradar.git","type":"git","directory":"js/cli"},"_npmVersion":"10.8.2","description":"ServiceRadar developer CLI: dashboard authoring loop, auth, and tooling. Companion to @carverauto/serviceradar-dashboard-sdk.","directories":{},"_nodeVersion":"20.20.2","dependencies":{"ajv":"^8.17.1","vite":"^7.1.12","@vitejs/plugin-react":"^5.0.4"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.4.0","@types/node":"^22.0.0"},"_npmOperationalInternal":{"tmp":"tmp/serviceradar-cli_0.1.2_1778019086678_0.13472693755222998","host":"s3://npm-registry-packages-npm-production"}},"0.1.3":{"name":"@carverauto/serviceradar-cli","version":"0.1.3","license":"UNLICENSED","_id":"@carverauto/serviceradar-cli@0.1.3","maintainers":[{"name":"mfreeman451","email":"mfreeman@carverauto.dev"}],"bin":{"serviceradar-cli":"bin/serviceradar-cli.js","serviceradar-dashboard":"bin/serviceradar-dashboard.js"},"dist":{"shasum":"9b8d7d5ee3b3b2820d6f2005f3c9c033eeec05a1","tarball":"https://registry.npmjs.org/@carverauto/serviceradar-cli/-/serviceradar-cli-0.1.3.tgz","fileCount":71,"integrity":"sha512-sRBtxHuqLpR/Boon4JG7rCCJMAREc2c3ItIq4yYRhfPQXrHq2DuERuGfomd3Hzg24gGl47oExDdt+mg+rAPZ9g==","signatures":[{"sig":"MEQCICN45gmeOtzWZoS2MlD7Y4gR/L15FkT3x10wAMlDCmL2AiATPPbyQ1hiaicuDsohuectS60ilj+Bd8FcFR8YSmE4xA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":251546},"type":"module","engines":{"node":">=20"},"gitHead":"a004d0f3cb16cf46375b5fc2d105fc98147bc2f6","scripts":{"ci":"npm run typecheck && npm run build && node --test tests/*.test.mjs && npm run pack:check","test":"npm run build && node --test tests/*.test.mjs","build":"tsc -p tsconfig.build.json","typecheck":"tsc --noEmit","pack:check":"npm pack --dry-run .","prepublishOnly":"npm run build"},"_npmUser":{"name":"mfreeman451","email":"mfreeman@carverauto.dev"},"repository":{"url":"git+ssh://git@code.carverauto.dev/carverauto/serviceradar.git","type":"git","directory":"js/cli"},"_npmVersion":"10.8.2","description":"ServiceRadar developer CLI: dashboard authoring loop, auth, and tooling. Companion to @carverauto/serviceradar-dashboard-sdk.","directories":{},"_nodeVersion":"20.20.2","dependencies":{"ajv":"^8.17.1","vite":"^7.1.12","@vitejs/plugin-react":"^5.0.4"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.4.0","@types/node":"^22.0.0"},"_npmOperationalInternal":{"tmp":"tmp/serviceradar-cli_0.1.3_1778020753393_0.7047554258438202","host":"s3://npm-registry-packages-npm-production"}},"0.1.4":{"name":"@carverauto/serviceradar-cli","version":"0.1.4","license":"UNLICENSED","_id":"@carverauto/serviceradar-cli@0.1.4","maintainers":[{"name":"mfreeman451","email":"mfreeman@carverauto.dev"}],"bin":{"serviceradar-cli":"bin/serviceradar-cli.js","serviceradar-dashboard":"bin/serviceradar-dashboard.js"},"dist":{"shasum":"2f4be0f7de948509adbea1c03b387dfa7d64c4db","tarball":"https://registry.npmjs.org/@carverauto/serviceradar-cli/-/serviceradar-cli-0.1.4.tgz","fileCount":71,"integrity":"sha512-7AyaurCe1uCbq6wHoH1ScWVQAaCQyIqRVWR3KH/9wyvilSwEiuRZVOXQ9VOajC6VeLpJUTKLOuKKviix3393Dg==","signatures":[{"sig":"MEUCIQDe6TCy80P+lJBqvVIDczq5gEbCroUGv1KTxVi0m/84cAIgW3ZTA2s2/dlaFeOeLNYnCJiOAonD3koIeWO8WcOvbyg=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":255297},"type":"module","engines":{"node":">=20"},"gitHead":"f253acc063946883ee5ec2aba46cf38b7b3c39d2","scripts":{"ci":"npm run typecheck && npm run build && node --test tests/*.test.mjs && npm run pack:check","test":"npm run build && node --test tests/*.test.mjs","build":"tsc -p tsconfig.build.json","typecheck":"tsc --noEmit","pack:check":"npm pack --dry-run .","prepublishOnly":"npm run build"},"_npmUser":{"name":"mfreeman451","email":"mfreeman@carverauto.dev"},"repository":{"url":"git+ssh://git@code.carverauto.dev/carverauto/serviceradar.git","type":"git","directory":"js/cli"},"_npmVersion":"10.8.2","description":"ServiceRadar developer CLI: dashboard authoring loop, auth, and tooling. Companion to @carverauto/serviceradar-dashboard-sdk.","directories":{},"_nodeVersion":"20.20.2","dependencies":{"ajv":"^8.17.1","vite":"^7.1.12","mapbox-gl":"^3.10.0","@deck.gl/layers":"^9.3.2","@deck.gl/mapbox":"^9.3.2","@vitejs/plugin-react":"^5.0.4"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.4.0","@types/node":"^22.0.0"},"_npmOperationalInternal":{"tmp":"tmp/serviceradar-cli_0.1.4_1778022960044_0.1537226084594312","host":"s3://npm-registry-packages-npm-production"}},"0.1.5":{"name":"@carverauto/serviceradar-cli","version":"0.1.5","description":"ServiceRadar developer CLI: dashboard authoring loop, auth, and tooling. Companion to @carverauto/serviceradar-dashboard-sdk.","type":"module","license":"UNLICENSED","repository":{"type":"git","url":"git+ssh://git@code.carverauto.dev/carverauto/serviceradar.git","directory":"js/cli"},"publishConfig":{"access":"public"},"bin":{"serviceradar-cli":"bin/serviceradar-cli.js","serviceradar-dashboard":"bin/serviceradar-dashboard.js"},"scripts":{"build":"tsc -p tsconfig.build.json","test":"npm run build && node --test tests/*.test.mjs","typecheck":"tsc --noEmit","pack:check":"npm pack --dry-run .","prepublishOnly":"npm run build","ci":"npm run typecheck && npm run build && node --test tests/*.test.mjs && npm run pack:check"},"engines":{"node":">=20"},"dependencies":{"@deck.gl/layers":"^9.3.2","@deck.gl/mapbox":"^9.3.2","@vitejs/plugin-react":"^5.0.4","ajv":"^8.17.1","mapbox-gl":"^3.10.0","vite":"^7.1.12"},"devDependencies":{"@types/node":"^22.0.0","typescript":"^5.4.0"},"_id":"@carverauto/serviceradar-cli@0.1.5","gitHead":"02c2fa165fe85f29e2a2a5b434519d161ea102f4","_nodeVersion":"22.13.0","_npmVersion":"11.4.0","dist":{"integrity":"sha512-v2rcVVapyxcVjxJR2pfAiTPUHfufHjpHhnbeu9KcPNNMsgIX6YDgEii/R2+tDRDusGbm6EEqAW48p3lCWAGxyw==","shasum":"39fbff0fa5802c869143a461135722e3cff16387","tarball":"https://registry.npmjs.org/@carverauto/serviceradar-cli/-/serviceradar-cli-0.1.5.tgz","fileCount":71,"unpackedSize":255291,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIDxhMUSapC2OWoWAeZNRsmJydzFg5Dw65I3mOFJFNbbCAiB6W9VuHqHFKqeQ33nlJ67b59pxsV+JqPSQu8C71HvUcw=="}]},"_npmUser":{"name":"mfreeman451","email":"mfreeman@carverauto.dev"},"directories":{},"maintainers":[{"name":"mfreeman451","email":"mfreeman@carverauto.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/serviceradar-cli_0.1.5_1787177435053_0.01637787270887414"},"_hasShrinkwrap":false}},"time":{"created":"2026-05-04T16:09:44.146Z","modified":"2026-08-19T22:10:35.451Z","0.1.0":"2026-05-04T16:09:44.481Z","0.1.1":"2026-05-05T04:21:14.708Z","0.1.2":"2026-05-05T22:11:26.836Z","0.1.3":"2026-05-05T22:39:13.564Z","0.1.4":"2026-05-05T23:16:00.220Z","0.1.5":"2026-08-19T22:10:35.202Z"},"license":"UNLICENSED","repository":{"type":"git","url":"git+ssh://git@code.carverauto.dev/carverauto/serviceradar.git","directory":"js/cli"},"description":"ServiceRadar developer CLI: dashboard authoring loop, auth, and tooling. Companion to @carverauto/serviceradar-dashboard-sdk.","maintainers":[{"name":"mfreeman451","email":"mfreeman@carverauto.dev"}],"readme":"# `@carverauto/serviceradar-cli`\n\nThe ServiceRadar developer CLI. Lives inside the ServiceRadar monorepo at\n`~/src/serviceradar/js/cli/` and ships independently to npm as\n`@carverauto/serviceradar-cli`. Companion to `@carverauto/serviceradar-dashboard-sdk` (the runtime\nReact/JS surface customer dashboards depend on).\n\n## Subcommand groups\n\n```text\nserviceradar-cli auth      <login|status|logout>\nserviceradar-cli dashboard <init|build|dev|validate|manifest|publish|import>\n```\n\nHelp for either group:\n\n```bash\nserviceradar-cli help\nserviceradar-cli auth help\nserviceradar-cli dashboard --help     # delegates through to the dashboard subgroup\n```\n\n## Single install for developers\n\n`@carverauto/serviceradar-dashboard-sdk` declares `@carverauto/serviceradar-cli` in its\n`dependencies`, so a customer building a dashboard runs only:\n\n```bash\nnpm install @carverauto/serviceradar-dashboard-sdk\n```\n\n…and the CLI bin lands in `./node_modules/.bin/serviceradar-cli`. Project npm\nscripts (`\"dev\": \"serviceradar-cli dashboard dev\"`) resolve it from the local\n`.bin/`. For ad-hoc invocation: `npx serviceradar-cli ...`.\n\nThe legacy `serviceradar-dashboard` bin name is preserved as a transitional\nalias that prints a deprecation notice and delegates to\n`serviceradar-cli dashboard *`. Removal scheduled for the release after.\n\n## Authoring loop\n\n```bash\nnpm create @carverauto/dashboard my-dashboard\ncd my-dashboard\nnpm run dev          # SDK harness with HMR\nnpm run validate     # static check\nnpm run build        # write dist/ for publish\nserviceradar-cli auth login --instance https://serviceradar.example.com\nserviceradar-cli dashboard publish --instance https://serviceradar.example.com --route my-dashboard\n```\n\n## Auth\n\n`serviceradar-cli auth login --instance <url>` runs the OAuth 2.0 Device\nAuthorization Grant flow (RFC 8628) against `/api/v1/cli/auth/device` and\n`/api/v1/cli/auth/token`. Until those endpoints land on the ServiceRadar\nside, the CLI falls back to manual token paste. Tokens persist to\n`~/.config/serviceradar/credentials.json` (mode 0600), keyed by instance URL.\n\n`auth status` prints the resolved identity without leaking the token.\n`auth logout` removes a credential entry.\n\n## Publish\n\n`serviceradar-cli dashboard publish --instance <url> [--route <slug>] [--enable] [--yes]`\nposts the built manifest + renderer to `/api/v1/dashboard-packages` as a\nmultipart upload. The bearer JWT must carry the `dashboard.publish` scope\n(minted by `auth login`) and the user must hold the `cli.dashboard.publish`\nRBAC permission.\n\nBehavior worth knowing about:\n\n- **Idempotent re-publish.** Pushing the same `manifest.id@version` whose\n  renderer SHA256 matches the persisted `content_hash` is a no-op: the CLI\n  prints `✓ Re-published … (already at this content_hash; nothing\n  changed)` and the server returns `result: \"idempotent_noop\"`. Safe to\n  retry.\n- **Version overwrite is rejected.** Pushing the same `id@version` with\n  different bytes against an enabled or verified package returns 409\n  `version_already_published`. Bump `manifest.version`, or run\n  `dashboard disable` first.\n- **Slug ownership.** A `--route <slug>` belongs to one `dashboard_id` while\n  enabled. Trying to bind a slug that's already enabled for a different\n  dashboard returns 409 `slug_in_use` with the conflicting `owner_dashboard_id`.\n  Pick a different `--route` or have an admin disable the existing dashboard\n  first.\n- **Slug regex.** Slugs must match `^[a-z0-9][a-z0-9-]{1,62}$`; anything\n  else returns 400 `invalid_route`.\n- **Per-token rate limit.** 10 publishes/minute/JWT (429 + `Retry-After`),\n  30/min for enable/disable.\n- **Disable is symmetric.** `serviceradar-cli` does not ship `dashboard\n  disable` directly today; use the API at\n  `POST /api/v1/dashboard-packages/:id/disable` or the Settings UI.\n\nThe CLI surfaces structured server errors with actionable hints for each\nof these cases — the raw HTTP status and `error` code are also included so\nthey can be parsed by automation.\n\n## Repository structure\n\n```text\njs/cli/\n├── bin/\n│   ├── serviceradar-cli.js          # 5-line shim → ../dist/cli.js\n│   └── serviceradar-dashboard.js    # transitional alias → serviceradar-cli\n├── src/                             # CLI implementation (TypeScript, 18 modules)\n│   ├── cli.ts, args.ts, config.ts, manifest.ts, validation.ts,\n│   │   doctor.ts, paths.ts, utils.ts\n│   ├── auth/                        # auth/{credentials,login,status,logout,index}.ts\n│   └── dashboard/                   # dashboard/{init,build,manifest,validate,\n│                                    #            dev,publish,import,index}.ts\n├── dist/                            # generated by `npm run build` (compiled JS + sourcemaps)\n├── harness/                         # browser-side dev harness\n│   ├── index.html                   # legacy form-field harness (preserved at /?advanced)\n│   ├── harness.js\n│   ├── dev.js                       # HMR runtime\n│   └── dev.css\n├── schemas/\n│   └── dashboard-config.schema.json # ajv-validated dashboard config schema\n├── templates/                       # scaffolder templates\n│   ├── react-map/\n│   ├── react-table/\n│   └── react-blank/\n├── tests/\n├── tsconfig.json                    # tsc --noEmit (`npm run typecheck`)\n├── tsconfig.build.json              # tsc emit to dist/ (`npm run build`)\n└── package.json\n```\n\n## Build flow\n\nThe CLI source ships in `src/` as TypeScript; the published tarball\nships compiled JS + sourcemaps in `dist/`. The bins under `bin/` are\n5-line shims that import from `dist/`. The split is deliberate:\n\n- Source is the only thing kept in git, so diffs and reviews stay\n  readable.\n- The published tarball is what consumers actually run; shipping\n  compiled JS + sourcemaps from `dist/` keeps the install path\n  toolchain-free.\n- `prepublishOnly` runs `npm run build`, so `npm publish` always emits\n  fresh `dist/` from the current `src/` — no chance of drift between\n  the two.\n\n`npm run typecheck` runs `tsc --noEmit` against `src/**/*.ts`.\n`npm run build` compiles `src/` to `dist/` via `tsconfig.build.json`\n(`outDir: dist`, `sourceMap: true`). `npm test` rebuilds first so\ntests always exercise the shipped code path. `npm run ci` runs\ntypecheck → build → test → pack dry-run, mirroring CI.\n\n## Development\n\nThe CLI is a leaf package — no `@carverauto/*` runtime deps. To work on\nit, `cd js/cli && npm install` then `npm run ci` (typecheck → build →\ntest → pack dry-run). The bazel target `//js/cli:ci` runs the same\npipeline opt-in.\n\n## Documentation\n\nThe canonical Dashboard SDK + CLI reference lives on the developer portal:\n[`developer.serviceradar.cloud/docs/v2/dashboard-sdk`](https://developer.serviceradar.cloud/docs/v2/dashboard-sdk).\n","readmeFilename":"README.md"}