Install and configure Anysite CLI
The fastest way to install (macOS / Linux). Bootstraps [uv](https://docs.astral.sh/uv/) if it
isn't already present, so no pre-existing Python install is required:
```bash
curl -fsSL https://raw.githubusercontent.com/anysiteio/anysite-cli/main/install.sh | bash
```
This installs all extras by default (datasets, LLM, PostgreSQL, ClickHouse) and offers an
interactive setup step for your API key and an LLM provider. Options:
```bash
# Only dataset pipelines (DuckDB + PyArrow)
curl -fsSL https://raw.githubusercontent.com/anysiteio/anysite-cli/main/install.sh | bash -s -- --extras data
# Minimal install (no optional dependencies)
curl -fsSL https://raw.githubusercontent.com/anysiteio/anysite-cli/main/install.sh | bash -s -- --extras none
# Skip the interactive API key / LLM setup prompt
curl -fsSL https://raw.githubusercontent.com/anysiteio/anysite-cli/main/install.sh | bash -s -- --no-setup
# Install a specific version
curl -fsSL https://raw.githubusercontent.com/anysiteio/anysite-cli/main/install.sh | bash -s -- --version 0.3.23
# Upgrade an existing installation
curl -fsSL https://raw.githubusercontent.com/anysiteio/anysite-cli/main/install.sh | bash -s -- --upgrade
# Uninstall (config in ~/.anysite/ is kept)
curl -fsSL https://raw.githubusercontent.com/anysiteio/anysite-cli/main/install.sh | bash -s -- --uninstall
```
`--extras` accepts `all` (default), `data`, `llm`, `db`, or `none`.
```bash
brew tap anysiteio/cli https://github.com/anysiteio/anysite-cli
brew install anysite
```
```bash
pip install anysite-cli
```
Requires **Python 3.11** or higher.
```bash
git clone https://github.com/anysiteio/anysite-cli.git
cd anysite-cli
python -m venv .venv
source .venv/bin/activate
pip install -e .
```
Install additional capabilities based on your needs:
| Package | Command | What It Adds |
|---|---|---|
| Data | pip install "anysite-cli[data]" |
DuckDB + PyArrow for dataset pipelines and SQL querying |
| LLM | pip install "anysite-cli[llm]" |
LLM analysis with OpenAI and Anthropic models |
| PostgreSQL | pip install "anysite-cli[postgres]" |
PostgreSQL database adapter |
| ClickHouse | pip install "anysite-cli[clickhouse]" |
ClickHouse database adapter |
| All | pip install "anysite-cli[all]" |
Every optional dependency above |
anysite-cli[mysql] and anysite-cli[db] also exist as pip extras (they install MySQL client
libraries), but this CLI version has no MySQL database adapter — see
Database Connections for the working set.
anysite --version
```bash
anysite auth login
```
Opens your browser for OAuth2 authorization. On approval, the CLI stores an access token valid
for 30 days. Check status or sign out with:
```bash
anysite auth status
anysite auth logout
```
Get your API key from [app.anysite.io](https://app.anysite.io/billing) and set it:
```bash
anysite config set api_key YOUR_API_KEY
```
> ACTION FOR THE HUMAN: copy your API key at https://app.anysite.io/billing — an agent cannot obtain it.
Or via environment variable:
```bash
export ANYSITE_API_KEY=YOUR_API_KEY
```
> ACTION FOR THE HUMAN: copy your API key at https://app.anysite.io/billing — an agent cannot obtain it.
Key resolution order: --api-key flag, then ANYSITE_API_KEY, then the OAuth token from
anysite auth login, then api_key in the config file.
The schema cache enables endpoint discovery (anysite describe) and automatic parameter type
conversion for anysite api:
anysite schema update
Settings live in ~/.anysite/config.yaml (override the directory with ANYSITE_CONFIG_DIR):
# View all settings
anysite config list
# Get a specific setting
anysite config get api_key
# Set a value (dotted keys nest under a YAML map, e.g. defaults.format)
anysite config set defaults.format table
# Show config file path
anysite config path
# Reset to defaults (asks for confirmation unless --force)
anysite config reset --force
Settings are resolved in this order (highest priority first):
--format csv on the command you runANYSITE_API_KEY, ANYSITE_BASE_URL, ANYSITE_CONFIG_DIR~/.anysite/config.yamlbase_url (https://api.anysite.io) and timeout (300s)Use environment variables for CI/CD environments and the config file for local development.
The one-line installer installs a Claude Code skill automatically (into
~/.claude/skills/anysite-cli/) so Claude Code already has command reference and pipeline
configuration knowledge after curl ... | bash. To add or update it manually — for example on a
pip/Homebrew install — use the Claude Code plugin marketplace:
```bash
/plugin marketplace add https://github.com/anysiteio/agent-skills
```
```bash
/plugin install anysite-cli@anysite-skills
```
See Agent Skills for how AnySite skills work in Claude Code generally.
These options are recognized on the top-level anysite command, before any subcommand:
anysite [OPTIONS] COMMAND
| Option | Description |
|---|---|
--api-key TEXT |
API key (or set ANYSITE_API_KEY) |
--base-url TEXT |
API base URL (or set ANYSITE_BASE_URL) |
--debug |
Enable debug output |
--no-color |
Disable colored output |
--human |
Force human-readable output (override auto-JSON in pipes) |
--non-interactive |
Disable interactive prompts (auto-enabled when stdin is not a TTY) |
--version, -v |
Show version and exit |
--help |
Show help |
--json is not a global flag — it is defined on individual subcommands (describe --json,
config list --json, db discover --json, and so on). anysite api itself has no --json
flag: use --format json (the default) instead. See Agent Protocol
for which commands return a structured JSON envelope and which return raw formatted data.
Make sure the install directory is in your `PATH`. The one-line installer adds
`~/.local/bin` to your shell profile automatically — restart your terminal, or run:
```bash
export PATH="$HOME/.local/bin:$PATH"
```
If you installed in a virtual environment, activate it first:
```bash
source .venv/bin/activate
```
Anysite CLI requires Python 3.11+. Check your version:
```bash
python3 --version
```
Consider using [pyenv](https://github.com/pyenv/pyenv) to manage multiple Python versions, or
use the one-line installer, which bootstraps its own Python via `uv`.
If `anysite schema update` fails, check your API key and network connection:
```bash
anysite auth status
curl -s https://api.anysite.io/openapi.json | head -c 100
```
Use a virtual environment or the `--user` flag:
```bash
python -m venv .venv && source .venv/bin/activate
pip install anysite-cli
```
Start extracting data with single API requests, and discover endpoints
Structured errors, exit codes, and scripting the CLI from another program