Catalog PyPI
PACKAGE EXPLORERView in registry

afcli

PyPI

A command-line utility for interacting with Apache Airflow REST API

airflowclidata-engineeringrest-apiworkflow
Versions collected1
Direct dependencies9From release 0.1.12
Last observed20 Oct, 21:00 UTC

README

Version 0.1.12 documentation

Airflow CLI Wrapper

Test PyPI version Python versions Coverage

A command-line utility for interacting with the Airflow REST API. Compatible with both Airflow 2.9.x (basic auth) and 3.x (JWT auth).

Installation

uv tool install afcli

Or with pip:

pip install afcli

Configuration

Environment Variables

You can set authentication credentials using environment variables:

export AIRFLOW_HOST="airflow.example.com:8080"  # Default: localhost:8080
export AIRFLOW_USER="admin"
export AIRFLOW_PASSWORD="your-password"

Command Line Arguments

Command line arguments override environment variables:

afcli --host airflow.example.com:8080 --user admin --password secret list

Usage

Basic Usage

By default, the tool connects to localhost:8080:

# Using environment variables
afcli list

# Using command line arguments
afcli --user admin --password secret status my_dag

Available Commands

List DAGs

afcli list
afcli list --limit 10  # Show only 10 DAGs
afcli list --all       # Include inactive DAGs

View DAG Status

afcli status <dag_id>

Shows DAG configuration and recent runs with color-coded states.

Pause/Unpause DAG

afcli pause <dag_id>
afcli unpause <dag_id>

Trigger DAG

afcli trigger <dag_id>
afcli trigger <dag_id> --config '{"key": "value"}'

View Tasks and Their Status

afcli tasks <dag_id>
afcli tasks <dag_id> --run-id <specific_run_id>

Shows all tasks with color-coded states:

  • 🟢 Green: Success
  • 🔴 Red: Failed
  • 🟡 Yellow: Running/Retry
  • 🔵 Blue: Scheduled
  • 🟣 Purple: Skipped

View Task Logs

afcli logs <dag_id> <task_id>
afcli logs <dag_id> <task_id> --run-id <specific_run_id> --try-number 2

Clear Failed Tasks

# Clear all failed tasks in the latest run
afcli clear <dag_id>

# Clear a specific task
afcli clear <dag_id> --task-id <task_id>

# Skip confirmation prompt
afcli clear <dag_id> -y

Examples

# Set credentials via environment
export AIRFLOW_USER=admin
export AIRFLOW_PASSWORD=secret

# List all DAGs
afcli list

# Check status of example_dag
afcli status example_dag

# Trigger example_dag with configuration
afcli trigger example_dag --config '{"date": "2024-01-01"}'

# View all tasks in the latest run
afcli tasks example_dag

# View logs for a specific task
afcli logs example_dag process_data

# Clear all failed tasks
afcli clear example_dag

Authentication

The tool automatically detects and uses the appropriate authentication method:

  • Airflow 3.x: Uses JWT (JSON Web Token) authentication. The tool obtains a token from /auth/token and includes it in API requests.
  • Airflow 2.9.x: Falls back to basic authentication when JWT endpoint is not available.

Authentication happens transparently - simply provide your credentials and the tool will use the appropriate method.

Development

Installation for Development

# Install with test dependencies
uv pip install -e ".[test]"

Running Tests

# Run all tests
pytest

# Run with coverage
pytest --cov=afcli --cov-report=html

# Run specific test categories
pytest -m unit         # Unit tests only
pytest -m integration  # Integration tests only

# Use Makefile commands
make test              # All tests
make test-cov          # With coverage report
make test-unit         # Unit tests only

Downloads & popularity

3downloads
1-day window · source-reported counts20 Oct 2026
24120
2026-07-23: 2 · observed 2026-10-21T16:10:05.1141493Z · period 2026-07-23–2026-07-232026-07-24: 1 · observed 2026-10-21T16:10:05.1141493Z · period 2026-07-24–2026-07-242026-07-27: 2 · observed 2026-10-21T16:10:05.1141493Z · period 2026-07-27–2026-07-272026-08-01: 1 · observed 2026-10-21T16:10:05.1141493Z · period 2026-08-01–2026-08-012026-08-02: 1 · observed 2026-10-21T16:10:05.1141493Z · period 2026-08-02–2026-08-022026-08-03: 6 · observed 2026-10-21T16:10:05.1141493Z · period 2026-08-03–2026-08-032026-08-05: 1 · observed 2026-10-21T16:10:05.1141493Z · period 2026-08-05–2026-08-052026-08-06: 1 · observed 2026-10-21T16:10:05.1141493Z · period 2026-08-06–2026-08-062026-08-09: 9 · observed 2026-10-21T16:10:05.1141493Z · period 2026-08-09–2026-08-092026-08-13: 2 · observed 2026-10-21T16:10:05.1141493Z · period 2026-08-13–2026-08-132026-08-14: 4 · observed 2026-10-21T16:10:05.1141493Z · period 2026-08-14–2026-08-142026-08-17: 2 · observed 2026-10-21T16:10:05.1141493Z · period 2026-08-17–2026-08-172026-08-20: 1 · observed 2026-10-21T16:10:05.1141493Z · period 2026-08-20–2026-08-202026-08-23: 4 · observed 2026-10-21T16:10:05.1141493Z · period 2026-08-23–2026-08-232026-08-24: 6 · observed 2026-10-21T16:10:05.1141493Z · period 2026-08-24–2026-08-242026-08-27: 2 · observed 2026-10-21T16:10:05.1141493Z · period 2026-08-27–2026-08-272026-08-28: 1 · observed 2026-10-21T16:10:05.1141493Z · period 2026-08-28–2026-08-282026-08-31: 2 · observed 2026-10-21T16:10:05.1141493Z · period 2026-08-31–2026-08-312026-09-01: 1 · observed 2026-10-21T16:10:05.1141493Z · period 2026-09-01–2026-09-012026-09-04: 2 · observed 2026-10-21T16:10:05.1141493Z · period 2026-09-04–2026-09-042026-09-05: 4 · observed 2026-10-21T16:10:05.1141493Z · period 2026-09-05–2026-09-052026-09-06: 2 · observed 2026-10-21T16:10:05.1141493Z · period 2026-09-06–2026-09-062026-09-07: 1 · observed 2026-10-21T16:10:05.1141493Z · period 2026-09-07–2026-09-072026-09-08: 3 · observed 2026-10-21T16:10:05.1141493Z · period 2026-09-08–2026-09-082026-09-09: 1 · observed 2026-10-21T16:10:05.1141493Z · period 2026-09-09–2026-09-092026-09-12: 1 · observed 2026-10-21T16:10:05.1141493Z · period 2026-09-12–2026-09-122026-09-14: 6 · observed 2026-10-21T16:10:05.1141493Z · period 2026-09-14–2026-09-142026-09-15: 24 · observed 2026-10-21T16:10:05.1141493Z · period 2026-09-15–2026-09-152026-09-17: 13 · observed 2026-10-21T16:10:05.1141493Z · period 2026-09-17–2026-09-172026-09-18: 5 · observed 2026-10-21T16:10:05.1141493Z · period 2026-09-18–2026-09-182026-09-19: 2 · observed 2026-10-21T16:10:05.1141493Z · period 2026-09-19–2026-09-192026-09-20: 1 · observed 2026-10-21T16:10:05.1141493Z · period 2026-09-20–2026-09-202026-09-21: 3 · observed 2026-10-21T16:10:05.1141493Z · period 2026-09-21–2026-09-212026-09-22: 2 · observed 2026-10-21T16:10:05.1141493Z · period 2026-09-22–2026-09-222026-09-23: 2 · observed 2026-10-21T16:10:05.1141493Z · period 2026-09-23–2026-09-232026-09-24: 5 · observed 2026-10-21T16:10:05.1141493Z · period 2026-09-24–2026-09-242026-09-25: 4 · observed 2026-10-21T16:10:05.1141493Z · period 2026-09-25–2026-09-252026-09-26: 5 · observed 2026-10-21T16:10:05.1141493Z · period 2026-09-26–2026-09-262026-09-27: 4 · observed 2026-10-21T16:10:05.1141493Z · period 2026-09-27–2026-09-272026-09-28: 5 · observed 2026-10-21T16:10:05.1141493Z · period 2026-09-28–2026-09-282026-09-29: 10 · observed 2026-10-21T16:10:05.1141493Z · period 2026-09-29–2026-09-292026-09-30: 6 · observed 2026-10-21T16:10:05.1141493Z · period 2026-09-30–2026-09-302026-10-01: 15 · observed 2026-10-21T16:10:05.1141493Z · period 2026-10-01–2026-10-012026-10-02: 11 · observed 2026-10-21T16:10:05.1141493Z · period 2026-10-02–2026-10-022026-10-03: 1 · observed 2026-10-21T16:10:05.1141493Z · period 2026-10-03–2026-10-032026-10-06: 1 · observed 2026-10-21T16:10:05.1141493Z · period 2026-10-06–2026-10-062026-10-07: 7 · observed 2026-10-21T16:10:05.1141493Z · period 2026-10-07–2026-10-072026-10-08: 9 · observed 2026-10-21T16:10:05.1141493Z · period 2026-10-08–2026-10-082026-10-09: 13 · observed 2026-10-21T16:10:05.1141493Z · period 2026-10-09–2026-10-092026-10-10: 9 · observed 2026-10-21T16:10:05.1141493Z · period 2026-10-10–2026-10-102026-10-11: 6 · observed 2026-10-21T16:10:05.1141493Z · period 2026-10-11–2026-10-112026-10-13: 3 · observed 2026-10-21T16:10:05.1141493Z · period 2026-10-13–2026-10-132026-10-14: 7 · observed 2026-10-21T16:10:05.1141493Z · period 2026-10-14–2026-10-142026-10-15: 7 · observed 2026-10-21T16:10:05.1141493Z · period 2026-10-15–2026-10-152026-10-16: 2 · observed 2026-10-21T16:10:05.1141493Z · period 2026-10-16–2026-10-162026-10-17: 2 · observed 2026-10-21T16:10:05.1141493Z · period 2026-10-17–2026-10-172026-10-20: 3 · observed 2026-10-21T16:10:05.1141493Z · period 2026-10-20–2026-10-20
23 Jul20 Oct

pypistats · 57 observations shown. Missing days are unknown. Source category: overall: without mirrors.

View observed values
Date / source periodValueObserved at
2026-10-20 – 2026-10-2032026-10-21T16:10:05.1141493Z
2026-10-17 – 2026-10-1722026-10-21T16:10:05.1141493Z
2026-10-16 – 2026-10-1622026-10-21T16:10:05.1141493Z
2026-10-15 – 2026-10-1572026-10-21T16:10:05.1141493Z
2026-10-14 – 2026-10-1472026-10-21T16:10:05.1141493Z
2026-10-13 – 2026-10-1332026-10-21T16:10:05.1141493Z
2026-10-11 – 2026-10-1162026-10-21T16:10:05.1141493Z
2026-10-10 – 2026-10-1092026-10-21T16:10:05.1141493Z
2026-10-09 – 2026-10-09132026-10-21T16:10:05.1141493Z
2026-10-08 – 2026-10-0892026-10-21T16:10:05.1141493Z
2026-10-07 – 2026-10-0772026-10-21T16:10:05.1141493Z
2026-10-06 – 2026-10-0612026-10-21T16:10:05.1141493Z
2026-10-03 – 2026-10-0312026-10-21T16:10:05.1141493Z
2026-10-02 – 2026-10-02112026-10-21T16:10:05.1141493Z
2026-10-01 – 2026-10-01152026-10-21T16:10:05.1141493Z
2026-09-30 – 2026-09-3062026-10-21T16:10:05.1141493Z
2026-09-29 – 2026-09-29102026-10-21T16:10:05.1141493Z
2026-09-28 – 2026-09-2852026-10-21T16:10:05.1141493Z
2026-09-27 – 2026-09-2742026-10-21T16:10:05.1141493Z
2026-09-26 – 2026-09-2652026-10-21T16:10:05.1141493Z
2026-09-25 – 2026-09-2542026-10-21T16:10:05.1141493Z
2026-09-24 – 2026-09-2452026-10-21T16:10:05.1141493Z
2026-09-23 – 2026-09-2322026-10-21T16:10:05.1141493Z
2026-09-22 – 2026-09-2222026-10-21T16:10:05.1141493Z
2026-09-21 – 2026-09-2132026-10-21T16:10:05.1141493Z
2026-09-20 – 2026-09-2012026-10-21T16:10:05.1141493Z
2026-09-19 – 2026-09-1922026-10-21T16:10:05.1141493Z
2026-09-18 – 2026-09-1852026-10-21T16:10:05.1141493Z
2026-09-17 – 2026-09-17132026-10-21T16:10:05.1141493Z
2026-09-15 – 2026-09-15242026-10-21T16:10:05.1141493Z
2026-09-14 – 2026-09-1462026-10-21T16:10:05.1141493Z
2026-09-12 – 2026-09-1212026-10-21T16:10:05.1141493Z
2026-09-09 – 2026-09-0912026-10-21T16:10:05.1141493Z
2026-09-08 – 2026-09-0832026-10-21T16:10:05.1141493Z
2026-09-07 – 2026-09-0712026-10-21T16:10:05.1141493Z
2026-09-06 – 2026-09-0622026-10-21T16:10:05.1141493Z
2026-09-05 – 2026-09-0542026-10-21T16:10:05.1141493Z
2026-09-04 – 2026-09-0422026-10-21T16:10:05.1141493Z
2026-09-01 – 2026-09-0112026-10-21T16:10:05.1141493Z
2026-08-31 – 2026-08-3122026-10-21T16:10:05.1141493Z
2026-08-28 – 2026-08-2812026-10-21T16:10:05.1141493Z
2026-08-27 – 2026-08-2722026-10-21T16:10:05.1141493Z
2026-08-24 – 2026-08-2462026-10-21T16:10:05.1141493Z
2026-08-23 – 2026-08-2342026-10-21T16:10:05.1141493Z
2026-08-20 – 2026-08-2012026-10-21T16:10:05.1141493Z
2026-08-17 – 2026-08-1722026-10-21T16:10:05.1141493Z
2026-08-14 – 2026-08-1442026-10-21T16:10:05.1141493Z
2026-08-13 – 2026-08-1322026-10-21T16:10:05.1141493Z
2026-08-09 – 2026-08-0992026-10-21T16:10:05.1141493Z
2026-08-06 – 2026-08-0612026-10-21T16:10:05.1141493Z
2026-08-05 – 2026-08-0512026-10-21T16:10:05.1141493Z
2026-08-03 – 2026-08-0362026-10-21T16:10:05.1141493Z
2026-08-02 – 2026-08-0212026-10-21T16:10:05.1141493Z
2026-08-01 – 2026-08-0112026-10-21T16:10:05.1141493Z
2026-07-27 – 2026-07-2722026-10-21T16:10:05.1141493Z
2026-07-24 – 2026-07-2412026-10-21T16:10:05.1141493Z
2026-07-23 – 2026-07-2322026-10-21T16:10:05.1141493Z

Versions 1

Collected releases
VersionPublishedDirect dependenciesOpen version
0.1.1224 Jun 20259

Package advisories

0
No matching advisories collected

This describes our collected data; it is not a security assessment.

Repository

PENDING
ouachitalabs/af

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 21:00 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package:2af0a08e25292f3344ffeae317a40db3090e6a869575de4382ec586b1cf0659a