The Airweave CLI for developers and AI agents.
Project description
Airweave CLI
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:
AIRWEAVE_API_KEYenvironment variable~/.airweave/config.json(saved viaairweave 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> --top-k 5 --format json
| Flag | Short | Default | Description |
|---|---|---|---|
--collection |
-c |
$AIRWEAVE_COLLECTION |
Collection readable ID |
--top-k |
-k |
10 |
Number of results |
--format |
-f |
json |
Output format: json or text |
JSON output (default) writes pure JSON to stdout — nothing else. Pipe it:
airweave search "query" -c my-collection | jq '.results[0].md_content'
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].md_content'
# Get the AI-generated answer
airweave search "what is our refund policy" | jq -r '.completion'
# 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:
- CLI flag (e.g.
--collection) - Environment variable (e.g.
AIRWEAVE_COLLECTION) - Config file
- Default / error
Contributing
git clone https://github.com/airweave-ai/cli.git
cd cli
poetry install
poetry run airweave --help
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file airweave_cli-0.1.0.tar.gz.
File metadata
- Download URL: airweave_cli-0.1.0.tar.gz
- Upload date:
- Size: 8.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2fa557a3b638916a82495fbab9cdd39b254bb5ee04483cc43f0bbfb72455140e
|
|
| MD5 |
8641eb1a5b0dd8ecc4f56e35944a0f07
|
|
| BLAKE2b-256 |
5c93055a843deac1765aee06b7736085f9e4117a5f4183c6c4aad037283de41c
|
Provenance
The following attestation bundles were made for airweave_cli-0.1.0.tar.gz:
Publisher:
publish.yml on airweave-ai/cli
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
airweave_cli-0.1.0.tar.gz -
Subject digest:
2fa557a3b638916a82495fbab9cdd39b254bb5ee04483cc43f0bbfb72455140e - Sigstore transparency entry: 1092538559
- Sigstore integration time:
-
Permalink:
airweave-ai/cli@06a8ebf9c596471f734a4c58c4146d9809bc6a35 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/airweave-ai
-
Access:
internal
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@06a8ebf9c596471f734a4c58c4146d9809bc6a35 -
Trigger Event:
push
-
Statement type:
File details
Details for the file airweave_cli-0.1.0-py3-none-any.whl.
File metadata
- Download URL: airweave_cli-0.1.0-py3-none-any.whl
- Upload date:
- Size: 10.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3f3b4c8f9917c6dd0f0e58fc0d45724e3a56c3a3d02f63e28ed244a1655d1eb9
|
|
| MD5 |
ca06d7a336ce416a057cfcd423c1bf17
|
|
| BLAKE2b-256 |
0e537bc291a364fe3b2af046e268e7a93ecc60102a5b6606fed0caa304c95fd0
|
Provenance
The following attestation bundles were made for airweave_cli-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on airweave-ai/cli
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
airweave_cli-0.1.0-py3-none-any.whl -
Subject digest:
3f3b4c8f9917c6dd0f0e58fc0d45724e3a56c3a3d02f63e28ed244a1655d1eb9 - Sigstore transparency entry: 1092538563
- Sigstore integration time:
-
Permalink:
airweave-ai/cli@06a8ebf9c596471f734a4c58c4146d9809bc6a35 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/airweave-ai
-
Access:
internal
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@06a8ebf9c596471f734a4c58c4146d9809bc6a35 -
Trigger Event:
push
-
Statement type: