Using Stelvio CLI
The Stelvio CLI (stlv
) manages your AWS infrastructure deployments.
Global Options
--verbose, -v
- Show INFO level logs-vv
- Show DEBUG level logs--help
- Show command help
Commands
stlv init
Initializes a new Stelvio project in the current directory.
Options:
--profile YOUR_PROFILE_NAME
- AWS profile name--region YOUR_REGION
- AWS region (e.g., us-east-1, eu-west-1)
Creates stlv_app.py
with your project configuration. If you don't specify options, you'll be prompted for AWS profile and region.
stlv diff [ENVIRONMENT]
Shows what changes will happen when you deploy. Uses your personal environment if none specified.
stlv deploy [ENVIRONMENT]
Deploys your infrastructure to AWS. Uses your personal environment if none specified.
Options:
--yes, -y
- Skip confirmation prompts
Warning
Shared environments ask for confirmation unless you use --yes
.
stlv refresh [ENVIRONMENT]
Syncs your local state with what's actually running in AWS. Uses your personal environment if none specified.
Use this when someone else changed your infrastructure outside of Stelvio. It detects "drift" - differences between your code and what's actually deployed. If drift is found, you can either update your code to match reality or deploy to revert the changes.
stlv destroy [ENVIRONMENT]
Destroys all infrastructure in an environment. Uses your personal environment if none specified.
Options:
--yes, -y
- Skip confirmation prompts
Danger
This deletes everything. Always asks for confirmation unless you use --yes
.
stlv unlock [ENVIRONMENT]
Unlocks your Stelvio project when deployment state becomes locked. Uses your personal environment if none specified.
Use this when: - A previous deployment was interrupted (Ctrl+C, network issue, etc.) - You see "Stack is currently being updated" errors - Pulumi state is locked and preventing new deployments
Warning
Only run this if you're sure no other deployment is actually running. Running unlock
while another deployment is active can cause state corruption.
stlv version
Shows your Stelvio version.
Environments
Stelvio uses environments to keep your deployments separate.
Personal Environments
By default, commands use your username as the environment:
- You get your own sandbox to develop in
- No conflicts with teammates
- Safe to experiment without affecting others
Shared Environments
Use explicit names for shared environments, e.g.:
staging
- For testing before productionprod
- Your live applicationdemo
- For client demonstrations
Examples
# Personal development
stlv deploy # deploys to "john" environment
stlv diff # checks "john" environment
# Team environments
stlv deploy staging # deploys to shared staging
stlv deploy prod # deploys to production
Common Workflows
Starting a new project
mkdir my-api && cd my-api
stlv init
# Edit stlv_app.py to define your infrastructure
stlv diff
stlv deploy
Daily development
Releasing to production
Cleaning up
Need Help?
- Use
stlv COMMAND --help
for command details - Use
-v
or-vv
flags for more detailed error information