npm package: @scalepad/cli
Description: ScalePad command line interface for the Core, Lifecycle Manager, Quoter, and ControlMap APIs.
Latest version: 0.1.3

# @scalepad/cli

Command line interface for the public ScalePad Core, Lifecycle Manager, Quoter, and ControlMap APIs.

This is the primary supported developer interface for this repo. The `@scalepad/sdk-core`, `@scalepad/sdk-lm`, `@scalepad/sdk-quoter`, and `@scalepad/sdk-controlmap` packages are intentionally thinner helper packages used by the CLI.

## Install

```bash
npm install -g @scalepad/cli
```

## Quick start

```bash
npm install -g @scalepad/cli
scalepad auth login
scalepad auth whoami
scalepad core clients list --limit 5
scalepad lm action-items list --limit 5
scalepad quoter quotes list --json
scalepad controlmap health list --json
```

The CLI resolves credentials in this order:

1. `--api-key`
2. `SCALEPAD_API_KEY`
3. Stored profile credential

When keychain access is available, credentials are stored with `keytar`. Otherwise the CLI falls back to a local credential file with locked permissions.

## Commands

Top-level commands:

```bash
scalepad auth login
scalepad auth whoami
scalepad auth logout
```

Core command tree:

```text
core assets hardware list
core assets hardware get
core assets saas-users list
core assets saas-users get
core assets saas list
core assets saas get
core clients list
core clients get
core contacts get
core contacts create
core contracts list
core contracts get
core hardware-assets list
core hardware-assets get
core integrations configurations list
core integrations vendors list
core members get
core members create
core opportunities list
core opportunities get
core saas-assets list
core saas-assets get
core service contracts list
core service contracts get
core service tickets list
core service tickets get
core tickets list
core tickets get
```

Lifecycle Manager command tree:

```text
lm action-items list
lm action-items get
lm action-items create
lm action-items update
lm action-items delete
lm action-items completion-status update
lm assessment-templates list
lm assessment-templates get
lm assessment-templates create
lm assessment-templates update
lm assessment-templates delete
lm assessments list
lm assessments get
lm assessments create
lm assessments update
lm assessments delete
lm assessments completion-status update
lm assessments evaluate update
lm assessments internal-comment update
lm assets hardware lifecycles list
lm contracts list
lm contracts get
lm contracts create
lm contracts update
lm contracts delete
lm goals list
lm goals get
lm goals create
lm goals update
lm goals delete
lm goals initiatives list
lm goals initiatives update
lm goals initiatives delete
lm goals meetings list
lm goals meetings update
lm goals meetings delete
lm goals schedule update
lm goals status update
lm initiatives list
lm initiatives get
lm initiatives create
lm initiatives update
lm initiatives delete
lm initiatives action-items list
lm initiatives action-items update
lm initiatives action-items delete
lm initiatives budget update
lm initiatives goals list
lm initiatives goals update
lm initiatives goals delete
lm initiatives meetings list
lm initiatives meetings update
lm initiatives meetings delete
lm initiatives priority update
lm initiatives recurring update
lm initiatives schedule update
lm initiatives status update
lm meeting-types list
lm meeting-types create
lm meeting-types update
lm meeting-types delete
lm meetings list
lm meetings get
lm meetings create
lm meetings update
lm meetings delete
lm meetings action-items list
lm meetings action-items update
lm meetings action-items delete
lm meetings attendees contacts create
lm meetings attendees contacts delete
lm meetings attendees users create
lm meetings attendees users delete
lm meetings completion-status update
lm meetings goals list
lm meetings goals update
lm meetings goals delete
lm meetings initiatives list
lm meetings initiatives update
lm meetings initiatives delete
lm notes list
lm notes get
lm notes create
lm notes update
lm notes delete
lm notes archive-status update
```

Quoter command tree:

```text
quoter categories list
quoter categories get
quoter categories create
quoter categories update
quoter categories delete
quoter datafeeds supplier-items list
quoter datafeeds suppliers list
quoter item-group-item-assignments list
quoter item-group-item-assignments get
quoter item-group-item-assignments create
quoter item-group-item-assignments delete
quoter item-groups list
quoter item-groups get
quoter item-groups create
quoter item-groups update
quoter item-groups delete
quoter item-option-values list
quoter item-option-values get
quoter item-option-values create
quoter item-option-values update
quoter item-option-values delete
quoter item-options list
quoter item-options get
quoter item-options create
quoter item-options update
quoter item-options delete
quoter item-tiers list
quoter item-tiers get
quoter item-tiers create
quoter item-tiers update
quoter item-tiers delete
quoter items list
quoter items get
quoter items create
quoter items update
quoter items delete
quoter line-items create
quoter manufacturers list
quoter manufacturers get
quoter manufacturers create
quoter manufacturers update
quoter manufacturers delete
quoter quote-templates list
quoter quotes list
quoter suppliers list
quoter suppliers get
quoter suppliers create
quoter suppliers update
quoter suppliers delete
```

ControlMap command tree:

```text
controlmap action-items list
controlmap action-items get
controlmap action-items summary list
controlmap documents get
controlmap documents delete
controlmap evidence-mappings refresh create
controlmap evidence-requests update
controlmap evidence-requests delete
controlmap evidence-requests archive create
controlmap evidence-requests documents create
controlmap evidence-requests documents signed-url create
controlmap evidence-requests links create
controlmap evidences list
controlmap evidences create
controlmap evidences update
controlmap evidences delete
controlmap evidences documents create
controlmap evidences documents signed-url create
controlmap evidences schedule delete
controlmap evidences summary list
controlmap health list
controlmap health get
controlmap risks list
controlmap risks get
controlmap risks summary list
```

Run `scalepad core --help`, `scalepad lm --help`, `scalepad quoter --help`, `scalepad controlmap --help`, or any leaf command with `--help` to inspect the full generated command tree.

## Option reference

Auth commands:

- `--profile <name>`: select the credential profile to read or update
- `--api-key <key>`: override the stored credential for this invocation

Common read options:

- `--json`, `--jsonl`, `--csv`, `--table`: choose the output format
- `--fields <a,b,c>`: project specific response fields
- `--query <name=value>`: pass raw query parameters through to the API

List command options:

- `--limit <count>`, `--cursor <cursor>`, `--all`: pagination controls for list endpoints
- `--filter <field=expr>`: repeatable filter expression
- `--sort <field>` and `--desc`: sorting for list endpoints

Mutation command options:

- `--body <json-or-@file>`: inline JSON or `@path/to/file.json`
- `--body-file <path>`: read a JSON body from disk
- `--form <name=value-or-@file>`: send multipart fields or files for upload-style endpoints
- `--yes`: skip the interactive confirmation prompt for non-GET requests

## Examples

```bash
scalepad auth login --profile work
scalepad auth whoami --profile work

scalepad core clients list \
  --profile work \
  --all \
  --csv \
  --fields id,name,num_contacts,num_hardware_assets

scalepad core hardware-assets list \
  --profile work \
  --filter "type=eq:WORKSTATION" \
  --sort name \
  --table

scalepad lm action-items list \
  --profile work \
  --all \
  --jsonl

scalepad lm action-items update 12345 \
  --profile work \
  --body @./payloads/action-item-update.json \
  --yes \
  --json

scalepad quoter items list \
  --profile work \
  --query page=1 \
  --json

scalepad controlmap health list \
  --profile work \
  --json

scalepad controlmap evidence-requests documents create client-123 request-456 \
  --profile work \
  --form file=@./artifacts/policy.pdf \
  --yes \
  --json

scalepad core clients list \
  --profile work \
  --query page_size=50 \
  --query include_inactive=true \
  --json
```

## Development

From the monorepo root:

```bash
pnpm install
pnpm fetch:specs
pnpm generate:sdk
pnpm build
node packages/cli/dist/index.js --help
```