Turso CLI
$ turso Official Med RiskTurso CLI manages remote libSQL/SQLite databases, replication groups, auth tokens, and local turso dev development instances. Built in Go as a single binary with scriptable subcommands, though most listing commands emit plain text rather than JSON.
brew install tursodatabase/tap/turso turso CLI excels at provisioning databases, creating scoped read-only tokens, and running turso dev locally without MCP overhead.
Agent-Readiness Checklist
Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.
FCRS-1.0 6-Dimension Breakdown
Clean Go subcommands and TURSO_API_TOKEN support, but lacks a universal --json output flag across listing commands.
- Supports non-interactive subcommands and
TURSO_API_TOKEN; outputs tabular text
Supports short-lived and --read-only database tokens; turso db destroy prompts unless --yes is passed.
turso db tokens create --read-only --expirationlimits blast radius
Single Go binary via Homebrew or curl installer on macOS and Linux (WSL on Windows).
- Static Go binary via
tursodatabase/tap/turso
Streamlines edge SQLite provisioning, schema dumps, and local turso dev emulation.
- Combines cloud DB management, token minting, and local
turso dev
Official tursodatabase/turso-cli maintained by Turso under MIT license.
- Official
tursodatabase/turso-clirepository
Comprehensive CLI documentation with clear command examples.
- Official docs at docs.turso.tech/cli/introduction
Security, Auth & Guardrails
Auth token saved in ~/.config/turso/settings.json or supplied via TURSO_API_TOKEN.
CLI is MIT open-source; Turso cloud includes a starter free tier with paid plans for higher volume.
# Turso CLI Agent Rules - Prefer `turso db tokens create --read-only` when granting query access. - Do not invoke `turso db shell` without piping SQL or passing a statement. - NEVER run `turso db destroy` without explicit human approval.
Agent-Ready Command Recipes
Safe Read-Only Queries
turso db list
Prints existing database names, groups, and libSQL URLs.
turso db show <db-name>
Displays regions, locations, and connection URL for a single database.
Controlled Writes & Previews
turso db tokens create <db-name> --read-only --expiration 1h
Issues a short-lived read-only JWT for safe downstream agent queries.
Strengths for Agents
- + Built-in
--read-onlyand--expirationflags ondb tokens createsupport least-privilege workflows. - +
turso devprovides fast local libSQL parity before deploying to edge. - + Single binary installs cleanly without language runtime dependencies.
Caveats & Pitfalls
- ! Most commands lack
--jsonoutput, requiring table text parsing. - !
turso db shellopens an interactive prompt if no SQL argument or stdin is provided.