| name | turso-cli |
| description | Use the Turso CLI to create and manage SQLite edge databases, manage groups, replicate to regions, and query data. Use this instead of the Turso MCP server. |
Turso CLI
Official CLI for Turso. Manage libSQL/SQLite databases at the edge with global replication.
Authentication
turso auth login
turso auth token
turso auth whoami
Common Commands
Databases
turso db create my-db
turso db create my-db --group default
turso db list
turso db show my-db
turso db destroy my-db
turso db shell my-db
turso db shell my-db "SELECT * FROM users LIMIT 10"
Tokens
turso db tokens create my-db
turso db tokens create my-db --expiration 7d
turso db tokens invalidate my-db
Groups
turso group create my-group
turso group list
turso group locations add my-group lax
turso group locations list my-group
Replication
turso db replicate my-db lax
turso db show my-db --instance-urls
Agent Best Practices
- Use
turso db shell for quick queries and debugging
- Create database tokens with expiration for application use
- Use groups to manage replication strategy for multiple databases
- Use
turso db show to get the connection URL for application config
- Use
--json flag where available for machine-readable output
- Prefer creating databases in groups for consistent replication
Example Workflows
Create database and get connection info
turso db create my-app-db
turso db show my-app-db
turso db tokens create my-app-db
Run a migration
turso db shell my-db < migrations/001_create_tables.sql