Command-line interface for managing WoWSQL backend services. A comprehensive CLI tool similar to wowsql CLI for managing databases, storage, migrations, and more.
pip install wowsql-clicd cli
pip install -e .Note: The CLI package is named wowsql_cli internally to avoid conflicts with the SDK's wowsql package, but the command is still wowsql.
- Login:
wowsql login
# Or with email
wowsql login --email your@email.com- Initialize a project:
wowsql init
# Or link to existing project
wowsql link your-project-slug- List projects:
wowsql projects list- Set default project:
wowsql projects set-default your-project-slug- Query database:
wowsql db query "SELECT * FROM users LIMIT 10"wowsql login [--email] [--api-key] [--profile]- Login to WoWSQLwowsql logout [--profile]- Logout and clear credentialswowsql auth status- Show authentication status and current profilewowsql auth switch-profile <name>- Switch to a different profile
wowsql init [--project] [--template] [--force]- Initialize a new WoWSQL project in current directorywowsql projects list [--format]- List all projectswowsql projects get <slug>- Get detailed project informationwowsql projects create <name> [--description] [--region]- Create a new projectwowsql projects update <slug> [--name] [--description]- Update project settingswowsql projects delete <slug>- Delete a project (⚠️ Permanent)wowsql projects set-default <slug>- Set the default project for commandswowsql projects current- Show the current default projectwowsql link <project-slug>- Link current directory to a WoWSQL projectwowsql unlink- Unlink current directory from project
wowsql db tables list [--project] [--format]- List all tables in the databasewowsql db tables describe <table> [--project]- Get table schema and column information
wowsql db query "<sql>" [--file] [--project] [--format]- Execute a SQL querywowsql db insert <table> [--data] [--file] [--project]- Insert data into a tablewowsql db update <table> --where "<condition>" --data '{"key": "value"}' [--project]- Update data in a tablewowsql db delete <table> --where "<condition>" [--project]- Delete data from a table
wowsql db export <table> [--output] [--format] [--project]- Export table data to JSON or CSVwowsql db import <table> --file <path> [--format] [--project]- Import data from JSON or CSV file
wowsql db dump [--output] [--schema-only] [--data-only] [--tables] [--project]- Export entire database to SQL filewowsql db restore --file <path> [--confirm] [--project]- Restore database from SQL filewowsql db seed [--file] [--project]- Seed database with initial data from SQL or JSON filewowsql db diff [--project] [--format]- Compare local and remote database schemaswowsql db connect [--project]- Get database connection information
wowsql db schema dump [--output] [--project]- Export database schema only (no data)wowsql db schema diff [--project] [--format]- Show schema differences between local and remote
wowsql db explain "<sql>" [--project] [--format]- Explain query execution planwowsql db analyze <table> [--project]- Analyze table and update statisticswowsql db optimize <table> [--project]- Optimize table
wowsql views list [--project] [--format]- List all database viewswowsql views create <name> [--file] "<sql>" [--project]- Create a database viewwowsql views describe <name> [--project] [--format]- Describe view structure
wowsql procedures list [--project] [--format]- List all stored procedureswowsql procedures create <name> [--file] "<sql>" [--project]- Create a stored procedurewowsql procedures execute <name> [--params] [--project] [--format]- Execute a stored procedure
wowsql indexes list [<table>] [--project] [--format]- List indexes for a table or all tableswowsql indexes create <name> <table> <columns> [--unique] [--project]- Create an index on a tablewowsql indexes analyze <table> [--project] [--format]- Analyze index usage for a table
wowsql triggers list [<table>] [--project] [--format]- List triggers for a table or all tableswowsql triggers create <name> <table> <timing> <event> [--file] "<sql>" [--project]- Create a database triggerwowsql triggers delete <name> [--confirm] [--project]- Delete a trigger
wowsql migration new <name> [--project]- Create a new migration filewowsql migration list [--project]- List all migrationswowsql migration status [--project]- Show migration status (applied/pending)wowsql migration up [--count] [--project]- Apply pending migrationswowsql migration down [--count] [--project]- Rollback the last migration(s)
wowsql storage list [--prefix] [--project]- List files in storagewowsql storage upload <file> [--path] [--folder] [--project]- Upload a file to storagewowsql storage download <path> [--output] [--project]- Download a file from storagewowsql storage delete <path> [--project]- Delete a file from storagewowsql storage quota [--project]- Check storage quota and usage
wowsql secrets list [--project] [--format]- List all project secretswowsql secrets set <key> <value> [--public] [--project]- Set a secret valuewowsql secrets get <key> [--project]- Get a secret valuewowsql secrets unset <key> [--project]- Delete a secret
wowsql logs view [--follow] [--filter] [--limit] [--project] [--format]- View project logswowsql status [--project] [--format]- Show project status and health
wowsql backup create [--name] [--project]- Create a database backupwowsql backup list [--project] [--format]- List all backups for a projectwowsql backup restore <backup-id> [--confirm] [--project]- Restore database from backupwowsql backup download <backup-id> [--output] [--project]- Download backup file
wowsql config get <key> [--project]- Get a configuration valuewowsql config set <key> <value> [--project]- Set a configuration valuewowsql config list [--project] [--format]- List all configuration values
wowsql validate [--project]- Validate project configuration, database connection, schema, and migrations
wowsql gen typescript [--output] [--project]- Generate TypeScript types from database schema
wowsql local start- Start local development environment (Postgres, Redis, MinIO)wowsql local stop- Stop local development environmentwowsql local status- Check status of local serviceswowsql local reset- Reset local environment (⚠️ Deletes all data)wowsql local logs [--service] [--follow]- View logs from local services
Most commands support multiple output formats:
--output table(default) - Human-readable table format--output json- JSON format for scripting--output yaml- YAML format
Example:
wowsql projects list --output json | jq '.[0].slug'Configuration is stored in ~/.wowsql/config.yaml. You can manage multiple profiles for different environments.
api_url: https://api.wowsql.com
current_profile: default
profiles:
default:
api_url: https://api.wowsql.com
production:
api_url: https://api.wowsql.com# Use a specific profile
wowsql --profile production projects list
# Switch default profile
wowsql auth switch-profile productionWhen you run wowsql init or wowsql link, a .wowsql/config.yaml file is created in your project directory. This allows commands to automatically use the linked project without specifying --project every time.
# 1. Login
wowsql login
# 2. Initialize project
wowsql init --template basic
# 3. Create a migration
wowsql migration new create_users_table
# 4. Edit the migration file in migrations/
# Then apply it
wowsql migration up
# 5. Seed the database
wowsql db seed --file seed.sql
# 6. Query the database
wowsql db query "SELECT * FROM users"
# 7. Create a backup
wowsql backup create --name "pre-deployment"
# 8. Generate TypeScript types
wowsql gen typescript --output src/types/database.ts# Dump entire database
wowsql db dump --output backup.sql
# Dump schema only
wowsql db dump --schema-only --output schema.sql
# Restore from backup
wowsql db restore --file backup.sql --confirm
# Compare schemas
wowsql db diff# Set a secret
wowsql secrets set API_KEY "sk_live_12345"
# Set a public secret (can be exposed to client)
wowsql secrets set STRIPE_KEY "pk_live_..." --public
# List all secrets
wowsql secrets list
# Get a secret value
wowsql secrets get API_KEY# Explain a query
wowsql db explain "SELECT * FROM users WHERE email = 'test@example.com'"
# Analyze table statistics
wowsql db analyze users
# Optimize table
wowsql db optimize users
# Analyze indexes
wowsql indexes analyze users-
Set a Default Project: Use
wowsql projects set-default <slug>to avoid specifying--projectin every command -
Use JSON Output for Scripts: Pipe JSON output to
jqor other tools for automation -
Link Projects: Run
wowsql linkin your project directory to automatically use that project -
Use Profiles: Create separate profiles for development, staging, and production environments
-
Regular Backups: Create backups before major changes:
wowsql backup create --name "before-migration-$(date +%Y%m%d)" -
Validate Before Deploying: Always run
wowsql validatebefore deploying changes
# Check auth status
wowsql auth status
# Re-login if needed
wowsql logout
wowsql login# List all projects
wowsql projects list
# Set default project
wowsql projects set-default <slug>
# Or use --project flag
wowsql db query "SELECT 1" --project <slug># Reinstall CLI
pip install --upgrade wowsql-cli
# Or from source
cd cli && pip install -e .For complete documentation with detailed examples, see docs.wowsql.com/cli
- GitHub Issues: github.com/wowsql/cli/issues
- Documentation: docs.wowsql.com
- Email: support@wowsql.com