CLI Reference
Complete reference for all Shuttle CLI commands and options for Python projects.
Overview
The Shuttle CLI for Python is your primary interface for developing, deploying, and managing applications on the Shuttle platform. This reference provides comprehensive documentation for all commands and options.
Installation
It is recommended to use uv for dependency management and running the Shuttle CLI.
uv venv
source .venv/bin/activate
uv add shuttle-cobraOnce installed, you can invoke the Shuttle CLI using uv run -m shuttle. If your virtual environment is activated, you can also run commands directly using shuttle. For example:
uv run -m shuttle deploy
# OR
shuttle deployGlobal Options
These options are common to many command-line interfaces and may be supported by the underlying Python click framework, but are not explicitly defined or handled by the shuttle Python application's __main__.py for all cases.
--debug
Turn on tracing output for Shuttle libraries (WARNING: can print sensitive data)
Commands Reference
Project Management
Deployment
shuttle deploy
Provision, build, and deploy the application.
Arguments:
[PATH]- The path to your Shuttle project's root directory (defaults to current directory).
Examples:
shuttle destroy
Destroy the deployed stack and all associated resources for a project.
Arguments:
[PATH]- The path to your Shuttle project's root directory (defaults to current directory).
Examples:
Local Development
shuttle run
Run your Shuttle project locally.
Arguments:
[PATH]- The path to your Shuttle project's root directory (defaults to current directory).
Examples:
Logs
shuttle logs
Show logs from the deployed application.
Arguments:
[PATH]- The path to your Shuttle project's root directory (defaults to current directory).
Examples:
Environment Variables
The Shuttle Cobra CLI primarily relies on AWS authentication configured in your environment.
AWS_ACCESS_KEY_ID
Your AWS access key ID. Used for programmatic access to AWS.
AWS_SECRET_ACCESS_KEY
Your AWS secret access key. Used in conjunction with AWS_ACCESS_KEY_ID.
AWS_SESSION_TOKEN
(Optional) The session token for temporary AWS credentials.
AWS_PROFILE
The name of the AWS profile to use from your AWS credentials file (~/.aws/credentials).
LOCALSTACK_AUTH_TOKEN
Used for testing with LocalStack; typically not needed for standard deployments.
You can configure your AWS credentials using aws configure or aws configure sso via the AWS CLI.
Configuration Files
pyproject.toml (and project structure)
pyproject.toml (and project structure)Shuttle Cobra projects are standard Python projects, typically managed with pyproject.toml. Your application code, including @shuttle_task.cron decorated functions, resides within your project's Python source files (e.g., main.py or src/my_project/task.py).
Common Workflows
First Deployment
Development Cycle
Project Management
Debugging
Troubleshooting
Common Issues
AWS Authentication issues:
Ensure your AWS credentials are correctly configured via environment variables or
~/.aws/credentials.Use
aws configureoraws configure sso.
Local development issues:
Ensure you are in the correct virtual environment (
source .venv/bin/activate).Verify that your project path is correct (e.g.,
.for the current directory).Check for
FileNotFoundErrorifmain.pyor__main__.pyis missing in your project root.
Deployment issues:
Check
uv run -m shuttle logsfor build or deployment errors.Ensure all Python dependencies are specified in
pyproject.tomland installed (uv add shuttleoruv syncas appropriate).
Getting Help
For additional support:
Last updated