npx skills add ...
npx skills add astronomer/agents --skill managing-astro-local-env
Manage local Airflow environment with Astro CLI (Docker and standalone modes). Use when the user wants to start, stop, or restart Airflow, view logs, query the Airflow API, troubleshoot, or fix environment issues. For project setup, see setting-up-astro-project.
npx skills add astronomer/agents --skill managing-astro-local-env
This skill helps you manage your local Airflow environment using the Astro CLI.
Two modes: Docker (default, uses containers) and Standalone (Docker-free, uses a local venv — requires Airflow 3 + uv).
To set up a new project, see the setting-up-astro-project skill. When Airflow is running, use MCP tools from authoring-dags and testing-dags skills.
Default credentials: admin / admin
Restart after modifying: requirements.txt, packages.txt, Dockerfile
Standalone mode? See the next section.
Docker-free local development. Runs Airflow directly on your machine in a .venv/ managed by uv.
Requirements: Airflow 3 (runtime 3.x), uv on PATH. Not supported on Windows.
Plain
astro dev initalready pins a runtime 3.x image, so no version flag is needed. See setting-up-astro-project for project initialization.
| Flag | Description |
|---|---|
--foreground / -f | Stream output in foreground |
--port / -p | Override webserver port (default: 8080) |
--no-proxy | Disable reverse proxy |
If you used
--standaloneon start instead of setting the config, pass--standaloneon every subsequent command too (stop, kill, restart, bash, run, logs, etc.).
State locations: venv in .venv/, database and logs in .astro/standalone/, DAGs from dags/.
Run multiple Airflow projects locally without port conflicts. Works in both Docker and standalone modes.
Each project gets a hostname like <project-name>.localhost:6563. Visit http://localhost:6563 to see all active projects.
| Config | Command |
|---|---|
| Change proxy port | astro config set proxy.port <port> |
| Disable per-start | astro dev start --no-proxy |
Default proxy port: 6563
Standalone: astro dev logs works the same but shows a unified log (no per-component filtering).
Standalone: Same commands work — bash opens a venv-activated shell, run executes in the venv.
Use astro api airflow to query a running local Airflow instance. Prefer operation IDs over URL paths.
Defaults: localhost:8080, admin/admin (auto-detected). Override with --api-url, --username, --password.
| Flag | Purpose |
|---|---|
-p key=value | Path parameters |
-F key=value | Body/query fields (auto-converts booleans/numbers) |
-q / --jq | jq filter on response |
--paginate | Fetch all pages |
-X / --method | Override HTTP method |
--generate | Output curl command instead of executing |
| Issue | Solution |
|---|---|
| Port 8080 in use | Stop other containers or edit .astro/config.yaml |
| Container won't start | astro dev kill then astro dev start |
| Package install failed | Check requirements.txt syntax |
| DAG not appearing | Run astro dev parse to check for import errors |
| Out of disk space | docker system prune |
| Standalone won't start | Ensure uv is on PATH and runtime is 3.x |
| Proxy port conflict | astro config set proxy.port <port> |
.venv corrupted | astro dev kill then astro dev start --standalone |
When things are broken:
Edit Dockerfile:
Restart: