CLI
The Shiro CLI helps you start a project and open Studio. It is developer tooling around the SDK — not a second runtime.
The published package name is @shiro-sdk/cli. The binary is still shiro. Do not install the
unrelated npm package named shiro.
pnpm dlx @shiro-sdk/cli --help
# or
pnpm add -D @shiro-sdk/cliWorkflows#
Start a new agent project#
Goal: Scaffold an app with OpenAI wiring and scripts instead of copying boilerplate.
pnpm dlx @shiro-sdk/cli init my-agent
cd my-agentUseful flags:
| Flag | Purpose |
|---|---|
--provider openai | Preselect provider (OpenAI) |
--model <name> | Default model string |
--language typescript|javascript | Project language |
--package-manager pnpm|npm|yarn | Installer |
-y, --yes | Defaults, no prompts |
--no-install | Skip dependency install |
After init, .env is written automatically. If OPENAI_API_KEY (or the provider’s key) is
already in your environment, Shiro detects it and skips the prompt. Otherwise you can paste a key,
skip, or configure later with shiro auth. Run the project’s dev script, or open Studio with
pnpm studio (runs shiro dev). If the key is missing, shiro dev will ask for it before
launching.
When you run init from this monorepo, generated dependencies use local file: paths so
pnpm install works before packages are published to npm.
Develop with Studio#
Goal: Validate the project, then open Studio to inspect sample runs and imported traces.
shiro dev
shiro dev --port 3001dev runs the same checks as doctor, then launches Studio from the CLI package
(Studio is a dependency of @shiro-sdk/cli, not of your app). It does not require installing
@shiro-sdk/studio in the project.
Configure credentials#
shiro auth
shiro auth --provider openaiDetects the project provider (from shiro.config.ts), prompts for an API key (or reuses an
existing environment / .env value in non-interactive mode), optionally verifies it, and updates
.env without disturbing unrelated variables.
Diagnose a broken setup#
shiro doctorInspect project metadata#
shiro infoList provider integration status#
shiro providersCurrently documents the OpenAI provider package (@shiro-sdk/openai).
List detected plugins#
shiro pluginsCommon mistakes#
- Installing the bare npm package
shiro(unrelated quiz engine) instead of@shiro-sdk/cli - Expecting
shiro runto orchestrate production agents — define agents in code; use Studio to inspect traces - Adding
@shiro-sdk/studioto the app — Studio ships with the CLI; useshiro dev - Skipping the API key prompt and then wondering why the agent cannot call the provider — set
the key in
.env, or letshiro devask again