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> --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:
- 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
Metadata
Release files for airweave-cli 0.1.15
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| airweave_cli-0.1.15.tar.gz | 17.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| airweave_cli-0.1.15-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 38.8 kB
Release files / airweave_cli-0.1.15.tar.gz
| Download URL | airweave_cli-0.1.15.tar.gz |
|---|---|
| Size | 17.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ceac0361e94aa7becaa74ab35913b5110b969cd79717d5adbc183fb11bd5589b
|
|
BLAKE2b-256 checksum How to use checksums |
6ceb75e44c40583f70b7f351138624b1db683538065837992e149757445a9850
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Mar 24, 2026.
Transparency logRelease files / airweave_cli-0.1.15-py3-none-any.whl
| Download URL | airweave_cli-0.1.15-py3-none-any.whl |
|---|---|
| Size | 21.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2aa6029e8419647b9195a743a90c93257bbbc28ae037e8bf9e76925f8e19f941
|
|
BLAKE2b-256 checksum How to use checksums |
208d9007472e0a26840dcba98ffc3e368f81b9581cac151737c17fe262b23e4d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Mar 24, 2026.
Transparency log