Spica CLI
Install @spica/cli to run Spica locally with Docker, manage resources as code, and automate deployments from CI.
@spica/cli is the command-line tool for working with Spica. It does three jobs:
| Job | Commands |
|---|---|
| Run Spica on your machine | spica project start, ls, upgrade, remove |
| Keep buckets, functions, policies, env vars and secrets in files | spica fetch, plan, apply, dev, env, secret, guard |
| Connect to instances and generate code | spica context, bucket orm, function orm, asset, project sync |
Install
Terminal
npm install -g @spica/cli
spica --versionRequirements:
- Node.js 20 or newer.
- Docker, for
spica projectcommands.
Use the CLI version that matches your Spica instances, for example npm install -g @spica/cli@0.22.1.
Getting help
Terminal
spica --help
spica help project startGlobal options:
| Option | Effect |
|---|---|
-h, --help | Show help. |
-V, --version | Show the version. |
-v, --verbose | Also print debug messages. |
--quiet | Only print warnings and errors. |
--silent | Print nothing. Use the exit code. |
--no-color | Disable colors. |
A typical workflow
Terminal
# 1. Run a local instance
spica project start dev
# 2. Point the CLI at it
spica context set --name local --url http://localhost:4500/api --apikey <key>
spica context switch local
# 3. Export its resources into your repository
spica fetch
# 4. Edit files with live sync
spica dev
# 5. Review and deploy to another instance
spica context switch production
spica plan
spica apply