abpdev environments
Use this skill for env, envapp, and process environment switching.
Covered commands
| Command | Purpose |
|---|---|
abpdev env |
Explain virtual environment usage |
abpdev env config |
Open environment configuration |
abpdev envapp |
Show environment app help/context |
abpdev envapp config |
Open environment-app command configuration |
abpdev envapp start |
Start infra tools such as SQL Server, Redis, RabbitMQ |
abpdev envapp stop |
Stop one or all configured infra tools |
abpdev switch-to-env |
Open a terminal with a selected environment applied |
abpdev run --env <name> |
Run apps with a virtual environment |
Config file locations
Global configs are under:
%AppData%\abpdev
Main files in this area:
EnvironmentConfiguration.ymlviaabpdev env configenvironment-tools.ymlviaabpdev envapp configtools-configuration.ymlfor terminal/open command overrides
Virtual environments
abpdev env config manages named sets of environment variables, mainly for connection strings.
Default environment names include:
SqlServerMongoDbPostgreSqlMySql
Example shape:
SqlServer:
variables:
ConnectionStrings__Default: Server=localhost;Database={AppName}_{Today};User ID=SA;Password=12345678Aa;TrustServerCertificate=True
MongoDb:
variables:
ConnectionStrings__Default: mongodb://localhost:27017/{AppName}_{Today}
Tokens like {AppName} and {Today} are intended for templated environment values.
Using an environment
Apply it directly while running:
abpdev run --env SqlServer
abpdev run --env PostgreSql -p MyApp.HttpApi.Host
Or open a new terminal with that environment applied:
abpdev switch-to-env SqlServer
On Windows this uses the configured terminal command, which defaults to wt.
Environment apps
abpdev envapp start and abpdev envapp stop manage external infrastructure, usually through Docker commands stored in config.
Default app keys include:
sqlserversqlserver-edgepostgresqlmysqlmongodbredisrabbitmq
Examples:
abpdev envapp start sqlserver
abpdev envapp start redis rabbitmq
abpdev envapp start sqlserver -p MyStrongPassword123! -v
abpdev envapp stop sqlserver
abpdev envapp stop all
Notes:
envapp startcan take multiple app names.-p,--passwordreplaces the placeholderPassw0rdinside configured start commands.-v,--verboseshows Docker command output.envapp stopcurrently expects Docker-based stop commands.
Configuration format
abpdev envapp config opens a YAML dictionary keyed by app name.
Preferred schema:
sqlserver:
start-cmds:
- docker start tmp-sqlserver
- docker run --name tmp-sqlserver --restart unless-stopped -e "ACCEPT_EULA=Y" -e "SA_PASSWORD=Passw0rd" -p 1433:1433 -d mcr.microsoft.com/mssql/server:2017-CU8-ubuntu
stop-cmds:
- docker kill tmp-sqlserver
- docker rm tmp-sqlserver
Legacy single-string keys are still supported, but arrays are preferred.
Guidance for agents
- Use
abpdev run --env <name>when the user wants an environment only for that run. - Use
abpdev switch-to-env <name>when the user explicitly wants a shell/session switched. - Use
abpdev envapp startonly for the infra tools the project actually needs. - If the user is onboarding a project,
abpdev preparemay be a better entry point because it can infer and start required env apps automatically.
Troubleshooting
App name is not recognized
- Run
abpdev envapp configand verify the key name.
Wrong terminal opens for switch-to-env
- Check
abpdev tools configand update theterminaltool path.
Docker command needs customization
- Edit
environment-tools.ymlviaabpdev envapp config.
Source: enisn/AbpDevTools — distributed by TomeVault.