CLI

Scaffold projects, diagnose setup, and launch Studio from the terminal.

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/cli

Workflows#

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-agent

Useful flags:

FlagPurpose
--provider openaiPreselect provider (OpenAI)
--model <name>Default model string
--language typescript|javascriptProject language
--package-manager pnpm|npm|yarnInstaller
-y, --yesDefaults, no prompts
--no-installSkip 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 3001

dev 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 openai

Detects 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 doctor

Inspect project metadata#

shiro info

List provider integration status#

shiro providers

Currently documents the OpenAI provider package (@shiro-sdk/openai).

List detected plugins#

shiro plugins

Common mistakes#

  • Installing the bare npm package shiro (unrelated quiz engine) instead of @shiro-sdk/cli
  • Expecting shiro run to orchestrate production agents — define agents in code; use Studio to inspect traces
  • Adding @shiro-sdk/studio to the app — Studio ships with the CLI; use shiro dev
  • Skipping the API key prompt and then wondering why the agent cannot call the provider — set the key in .env, or let shiro dev ask again