@slurry/cli
v0.11.0
Published
Slurry from the command line: simulations, request checks and test suites for coding agents and CI
Maintainers
Readme
slurry CLI
Slurry from the command line: create simulations of real vendor APIs, check the calls your system made, and run test suites in CI. Built for coding agents first: every command takes --json, exit codes are stable, and slurry guide prints a skill file an agent can load.
Node 20 or later. One file, no runtime dependencies.
npm install -g @slurry/cli # then: slurry help
npx @slurry/cli help # or without installingSign in
slurry login # approve a code in the browser; the key is saved for this machine
export SLURRY_KEY=slurry_acct_... # or, in CI, an account key from slurry.io/app/keysA saved key is only ever sent to the API that issued it. SLURRY_API points the CLI at another engine (https, or http on localhost).
The loop
slurry sims create --from jira --name "Acme Jira" --wait --write-env .env
slurry requests verify acme-jira --method POST --path /rest/api/3/issue --times 1
slurry test billing --speed 60 --junit slurry-results.xml--write-env appends ACME_JIRA_BASE_URL and ACME_JIRA_API_KEY to the file instead of printing the key, so it never lands in a log. requests verify exits 1 with the near misses (the filter each one failed). test exits 0 only if the run passed, and aborts the run at --timeout (default 30m).
In CI
- name: Slurry tests
env:
SLURRY_KEY: ${{ secrets.SLURRY_ACCOUNT_KEY }}
run: npx @slurry/cli test billing --speed 60 --junit slurry-results.xmlRuns started with the CI variable set are tagged ci.
Commands
slurry help lists them all; slurry <command> --help shows options. Groups: login, whoami, library, sims, records, requests, state, eval, snapshots, forks, scenarios, actions, rules, webhooks, keys, suites, cases, test, runs, api (any endpoint), guide, agent (puts Slurry into Claude Code and Cursor).
Exit codes: 0 ok, 1 a check failed, 2 usage, 3 not signed in or not allowed, 4 not found, 5 API or network.
Developing
From the repo: pnpm --filter @slurry/cli slurry <args> runs the source; pnpm --filter @slurry/cli build writes dist/slurry.mjs; pnpm --filter @slurry/cli test.
