Manage deployment environments for Flash applications. Environments are isolated deployment contexts (like dev, staging, production) within a Flash app.
flash env <subcommand> [OPTIONS]
Subcommands
| Subcommand | Description |
|---|
list | Show all environments for an app |
create | Create a new environment |
get | Show details of an environment |
delete | Delete an environment and its resources |
env list
Show all available environments for an app.
Example
# List environments for current app
flash env list
# List environments for specific app
flash env list --app APP_NAME
Flash app name. Auto-detected from current directory if not specified.
โโโโโโโโโโโโโโณโโโโโโโโโโโโโโโโโโโโโโณโโโโโโโโโโโโโโโโโโโโณโโโโโโโโโโโโโโโโโโโ
โ Name โ ID โ Active Build โ Created At โ
โกโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฉ
โ dev โ env_abc123 โ build_xyz789 โ 2024-01-15 10:30 โ
โ staging โ env_def456 โ build_uvw456 โ 2024-01-16 14:20 โ
โ production โ env_ghi789 โ build_rst123 โ 2024-01-20 09:15 โ
โโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโ
env create
Create a new deployment environment.
flash env create <NAME> [OPTIONS]
Example
# Create staging environment
flash env create staging
# Create environment in specific app
flash env create production --app APP_NAME
Arguments
Name for the new environment (e.g., dev, staging, production).
Flash app name. Auto-detected from current directory if not specified.
- If the app doesnโt exist, itโs created automatically.
- Environment names must be unique within an app.
- Newly created environments have no active build until first deployment.
You donโt always need to create environments explicitly. Running flash deploy --env <name> creates the environment automatically if it doesnโt exist.
env get
Show detailed information about a deployment environment.
flash env get <NAME> [OPTIONS]
Example
# Get details for production environment
flash env get production
# Get details for specific app's environment
flash env get staging --app APP_NAME
Arguments
Name of the environment to inspect.
Flash app name. Auto-detected from current directory if not specified.
โญโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ
โ Environment: production โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ ID: env_ghi789 โ
โ State: DEPLOYED โ
โ Active Build: build_rst123 โ
โ Created: 2024-01-20 09:15:00 โ
โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
Associated Endpoints
โโโโโโโโโโโโโโโโโโณโโโโโโโโโโโโโโโโโโโโโ
โ Name โ ID โ
โกโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฉ
โ my-gpu โ ep_abc123 โ
โ my-cpu โ ep_def456 โ
โโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโ
Associated Network Volumes
โโโโโโโโโโโโโโโโโโณโโโโโโโโโโโโโโโโโโโโโ
โ Name โ ID โ
โกโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฉ
โ model-cache โ nv_xyz789 โ
โโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโ
env delete
Delete a deployment environment and all its associated resources.
flash env delete <NAME> [OPTIONS]
Examples
# Delete development environment
flash env delete dev
# Delete environment in specific app
flash env delete staging --app APP_NAME
Arguments
Name of the environment to delete.
Flash app name. Auto-detected from current directory if not specified.
Process
- Shows environment details and resources to be deleted.
- Prompts for confirmation (required).
- Undeploys all associated endpoints.
- Removes all associated network volumes.
- Deletes the environment from the app.
This operation is irreversible. All endpoints, volumes, and configuration associated with the environment will be permanently deleted.
Environment states
| State | Description |
|---|
| PENDING | Environment created but not deployed |
| DEPLOYING | Deployment in progress |
| DEPLOYED | Successfully deployed and running |
| FAILED | Deployment or health check failed |
| DELETING | Deletion in progress |
Common workflows
Three-tier deployment
# Create environments
flash env create dev
flash env create staging
flash env create production
# Deploy to each
flash deploy --env dev
flash deploy --env staging
flash deploy --env production
Feature branch testing
# Create feature environment
flash env create FEATURE_NAME
# Deploy feature branch
git checkout FEATURE_NAME
flash deploy --env FEATURE_NAME
# Clean up after merge
flash env delete FEATURE_NAME