Skip to main content

The Airweave CLI for developers and AI agents.

Project description

Airweave CLI

pypi npm

A command-line interface for Airweave. Search across your connected sources from any terminal. Built for developers and AI agents.

Installation

pip install airweave-cli

This installs the airweave binary.

Quick Start

# Set your API key
export AIRWEAVE_API_KEY="your-api-key"

# Search a collection
airweave search "quarterly revenue figures" --collection finance-data

# List collections
airweave collections list

Authentication

The CLI resolves credentials in this order:

  1. AIRWEAVE_API_KEY environment variable
  2. ~/.airweave/config.json (saved via airweave auth login)

For interactive setup:

airweave auth login

This prompts for your API key, validates it, and saves it locally.

Self-hosted

Point the CLI at your own Airweave instance:

export AIRWEAVE_BASE_URL="https://airweave.internal.corp.com"

Or set it during airweave auth login.

Commands

Search

airweave search "<query>" --collection <id> --mode classic --top-k 5
Flag Short Default Description
--collection -c $AIRWEAVE_COLLECTION Collection readable ID
--mode -m classic Search mode: instant, classic, or agentic
--top-k -k 10 Number of results
--offset 0 Results to skip (instant/classic only)

Three search modes:

  • instant — Direct vector search. Fastest, best for simple lookups.
  • classic — AI-optimized search with LLM-generated search plans. (default)
  • agentic — Full agent loop that iteratively searches and reasons over your data.
airweave search "error logs" --mode instant
airweave search "how does auth work?"                  # classic (default)
airweave search "summarize Q4 decisions" --mode agentic

Pipe it:

airweave search "query" -c my-collection | jq '.results[0].textual_representation'

Auth

airweave auth login     # interactive setup
airweave auth status    # show current auth state
airweave auth logout    # clear saved credentials

Collections

airweave collections list                           # list all
airweave collections create --name "My Data"        # create
airweave collections get my-data-x7k9m              # get details

Sources

airweave sources list --collection my-data          # list source connections
airweave sources sync <source-connection-id>        # trigger sync
airweave sources sync <id> --force                  # full re-sync

Agent Usage

The CLI is designed for non-interactive use by AI agents. Every command:

  • Outputs clean JSON to stdout (default)
  • Sends all errors to stderr
  • Uses correct exit codes (0 = success, 1 = error)

Environment variables

export AIRWEAVE_API_KEY="sk-..."
export AIRWEAVE_COLLECTION="my-knowledge-base"
export AIRWEAVE_BASE_URL="https://api.airweave.ai"  # optional

Piping

# Get the top result's content
airweave search "how to reset password" | jq -r '.results[0].textual_representation'

# Get the top result's source URL
airweave search "what is our refund policy" | jq -r '.results[0].web_url'

# List collection IDs
airweave collections list | jq -r '.[].readable_id'

CI / Cloud Functions

# GitHub Actions example
- name: Search Airweave
  env:
    AIRWEAVE_API_KEY: ${{ secrets.AIRWEAVE_API_KEY }}
    AIRWEAVE_COLLECTION: docs
  run: |
    result=$(airweave search "deployment guide")
    echo "$result" | jq '.results[:3]'

No SDK imports, no MCP server, no config files — just an env var and a shell.

Configuration

Config file location: ~/.airweave/config.json

{
  "api_key": "sk-...",
  "base_url": "https://api.airweave.ai",
  "collection": "my-default-collection"
}

Resolution order for all settings:

  1. CLI flag (e.g. --collection)
  2. Environment variable (e.g. AIRWEAVE_COLLECTION)
  3. Config file
  4. Default / error

Contributing

git clone https://github.com/airweave-ai/cli.git
cd cli
poetry install
poetry run airweave --help

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

airweave_cli-0.1.13.tar.gz (16.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

airweave_cli-0.1.13-py3-none-any.whl (21.2 kB view details)

Uploaded Python 3

File details

Details for the file airweave_cli-0.1.13.tar.gz.

File metadata

  • Download URL: airweave_cli-0.1.13.tar.gz
  • Upload date:
  • Size: 16.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for airweave_cli-0.1.13.tar.gz
Algorithm Hash digest
SHA256 9a6ae1795c81a78272b7b7c890485e20b83154c471c11f3eed7b9b5329adb3f8
MD5 5390720cb9b91fe620b82138d928f462
BLAKE2b-256 c131bb7db5e60bf3f1f4fcd032f61297c0dfc6401d2169d747226832f2e5e78a

See more details on using hashes here.

Provenance

The following attestation bundles were made for airweave_cli-0.1.13.tar.gz:

Publisher: publish.yml on airweave-ai/cli

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file airweave_cli-0.1.13-py3-none-any.whl.

File metadata

  • Download URL: airweave_cli-0.1.13-py3-none-any.whl
  • Upload date:
  • Size: 21.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for airweave_cli-0.1.13-py3-none-any.whl
Algorithm Hash digest
SHA256 3a98dfc24151f52c1ed1b695363a0afb41b6a6c8e9cd2bfb91bb648674775e6f
MD5 f30ca37eef5924ea8dfdbfaad8bcf0d0
BLAKE2b-256 a6aef89621a75d6d82ffc59d0223909195166371c6393b23e0dbbdb4693dcf71

See more details on using hashes here.

Provenance

The following attestation bundles were made for airweave_cli-0.1.13-py3-none-any.whl:

Publisher: publish.yml on airweave-ai/cli

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page