| name | managing-astro-local-env |
| description | 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. |
Astro Local Environment
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.
Start / Stop / Restart (Docker)
astro dev start
astro dev stop
astro dev kill
astro dev restart
astro dev restart --scheduler
astro dev restart --webserver
Default credentials: admin / admin
Restart after modifying: requirements.txt, packages.txt, Dockerfile
Standalone mode? See the next section.
Standalone Mode
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 init already pins a runtime 3.x image, so no version flag is needed. See setting-up-astro-project for project initialization.
Start
astro config set dev.mode standalone
astro dev start --standalone
| Flag | Description |
|---|
--foreground / -f | Stream output in foreground |
--port / -p | Override webserver port (default: 8080) |
--no-proxy | Disable reverse proxy |
Stop / Kill / Restart
astro dev stop
astro dev kill
astro dev restart
If you used --standalone on start instead of setting the config, pass --standalone on 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/.
Reverse Proxy
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.
astro dev proxy status
astro dev proxy stop
| Config | Command |
|---|
| Change proxy port | astro config set proxy.port <port> |
| Disable per-start | astro dev start --no-proxy |
Default proxy port: 6563
Check Status
astro dev ps
View Logs
astro dev logs
astro dev logs --scheduler
astro dev logs --webserver
astro dev logs -f
Standalone: astro dev logs works the same but shows a unified log (no per-component filtering).
Run Airflow CLI Commands
astro dev bash
astro dev run airflow info
astro dev run airflow dags list
Standalone: Same commands work — bash opens a venv-activated shell, run executes in the venv.
Querying the Airflow API
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.
Discovery
astro api airflow ls
astro api airflow ls dags
astro api airflow ls task
astro api airflow describe get_dag
Key Flags
| 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 |
DAGs
astro api airflow get_dags
astro api airflow get_dags -F dag_id_pattern=%etl%
astro api airflow get_dag -p dag_id=my_dag
astro api airflow get_dag_details -p dag_id=my_dag
astro api airflow patch_dag -p dag_id=my_dag -F is_paused=true
astro api airflow patch_dag -p dag_id=my_dag -F is_paused=false
astro api airflow get_dag_source -p dag_id=my_dag
astro api airflow get_import_errors
DAG Runs
astro api airflow get_dag_runs -p dag_id=my_dag
astro api airflow trigger_dag_run -p dag_id=my_dag
astro api airflow trigger_dag_run -p dag_id=my_dag -F conf[key]=value
astro api airflow get_dag_run -p dag_id=my_dag -p dag_run_id=manual__2026-04-07
astro api airflow clear_dag_run -p dag_id=my_dag -p dag_run_id=manual__2026-04-07 -F dry_run=false
Task Instances
astro api airflow get_task_instances -p dag_id=my_dag -p dag_run_id=manual__2026-04-07
astro api airflow get_task_instances -p dag_id=my_dag -p dag_run_id=~
astro api airflow get_task_instance -p dag_id=my_dag -p dag_run_id=manual__2026-04-07 -p task_id=extract
astro api airflow post_clear_task_instances -p dag_id=my_dag \
-F dag_run_id=manual__2026-04-07 -F only_failed=true -F dry_run=false
astro api airflow get_log -p dag_id=my_dag -p dag_run_id=manual__2026-04-07 \
-p task_id=extract -p try_number=1
Config & Connections
astro api airflow get_connections
astro api airflow get_variables
astro api airflow get_config
Filtering with jq
astro api airflow get_dags -q '.dags[].dag_id'
astro api airflow get_task_instances -p dag_id=my_dag -p dag_run_id=~ \
-q '[.task_instances[] | select(.state=="failed") | .task_id]'
Troubleshooting
| 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 |
Reset Environment
When things are broken:
astro dev kill
astro dev start
Upgrade Airflow
Test compatibility first
astro dev upgrade-test
Change version
-
Edit Dockerfile:
FROM quay.io/astronomer/astro-runtime:13.0.0
-
Restart:
astro dev kill && astro dev start
Related Skills
- setting-up-astro-project: Initialize projects and configure dependencies
- authoring-dags: Write DAGs (uses MCP tools, requires running Airflow)
- testing-dags: Test DAGs (uses MCP tools, requires running Airflow)
- deploying-airflow: Deploy DAGs to production (Astro, Docker Compose, Kubernetes)