> ## Documentation Index
> Fetch the complete documentation index at: https://docs.anysite.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Installation

> Install and configure Anysite CLI

## Installation

<Tabs>
  <Tab title="One-Line Installer">
    The fastest way to install — no Python or Homebrew required (macOS / Linux):

    ```bash theme={null}
    curl -fsSL https://raw.githubusercontent.com/anysiteio/anysite-cli/main/install.sh | bash
    ```

    This installs all extras by default (datasets, LLM, PostgreSQL, ClickHouse). Options:

    ```bash theme={null}
    # Minimal install (no optional dependencies)
    curl -fsSL https://raw.githubusercontent.com/anysiteio/anysite-cli/main/install.sh | bash -s -- --extras none

    # Upgrade existing installation
    curl -fsSL https://raw.githubusercontent.com/anysiteio/anysite-cli/main/install.sh | bash -s -- --upgrade

    # Uninstall
    curl -fsSL https://raw.githubusercontent.com/anysiteio/anysite-cli/main/install.sh | bash -s -- --uninstall
    ```
  </Tab>

  <Tab title="Homebrew">
    ```bash theme={null}
    brew tap anysiteio/cli https://github.com/anysiteio/anysite-cli
    brew install anysite
    ```
  </Tab>

  <Tab title="pip">
    ```bash theme={null}
    pip install anysite-cli
    ```

    <Note>
      Requires **Python 3.11** or higher.
    </Note>
  </Tab>

  <Tab title="From Source">
    ```bash theme={null}
    git clone https://github.com/anysiteio/anysite-cli.git
    cd anysite-cli
    python -m venv .venv
    source .venv/bin/activate
    pip install -e .
    ```
  </Tab>
</Tabs>

### Optional Extras

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]"`        | All optional dependencies                               |

### Verify Installation

```bash theme={null}
anysite --version
```

## Configuration

### Set Your API Key

Get your API key from [app.anysite.io](https://app.anysite.io) and configure it:

```bash theme={null}
anysite config set api_key YOUR_API_KEY
```

### Update Schema Cache

The schema cache enables endpoint discovery and automatic type conversion:

```bash theme={null}
anysite schema update
```

### Configuration Management

```bash theme={null}
# View all settings
anysite config list

# Get a specific setting
anysite config get api_key

# Set a value
anysite config set api_key sk-xxxxx

# Show config file path
anysite config path

# Reset to defaults
anysite config reset
```

### Configuration Priority

Settings are resolved in this order (highest priority first):

1. **CLI flags** — `--format csv`, `--parallel 5`
2. **Environment variables** — `ANYSITE_API_KEY`
3. **Config file** — `~/.anysite/config.yaml`
4. **Defaults** — built-in default values

<Tip>
  Use environment variables for CI/CD environments and the config file for local development.
</Tip>

## Claude Code Skill

Install the anysite-cli skill for [Claude Code](/mcp-server/claude-code-tool/installation) to get AI-assisted data collection directly in your terminal:

<Steps>
  <Step title="Add the skills marketplace">
    ```bash theme={null}
    /plugin marketplace add https://github.com/anysiteio/agent-skills
    ```
  </Step>

  <Step title="Install the skill">
    ```bash theme={null}
    /plugin install anysite-cli@anysite-skills
    ```
  </Step>
</Steps>

The skill gives Claude Code full knowledge of all anysite commands, dataset pipeline configuration, database operations, and LLM analysis — so you can describe what data you need in natural language and let the agent build and run the pipeline for you.

## Global Options

These options are available for all commands:

```bash theme={null}
anysite [OPTIONS] COMMAND

Options:
  --api-key TEXT       API key (or set ANYSITE_API_KEY)
  --base-url TEXT      API base URL
  --debug              Enable debug output
  --no-color           Disable colored output
  --json               Force JSON output (even in terminal)
  --human              Force human-readable output (even in pipes)
  --non-interactive    Disable interactive prompts
  --version, -v        Show version
  --help               Show help
```

<Tip>
  The `--json` and `--human` flags control [Agent Protocol](/cli/agent-protocol) output mode. By default, the CLI auto-detects: JSON in pipes, human-readable in terminals.
</Tip>

## Troubleshooting

<AccordionGroup>
  <Accordion title="Command not found: anysite">
    Make sure the Python scripts directory is in your `PATH`. If you installed in a virtual environment, activate it first:

    ```bash theme={null}
    source .venv/bin/activate
    ```

    Or install globally:

    ```bash theme={null}
    pip install --user anysite-cli
    ```
  </Accordion>

  <Accordion title="Python version error">
    Anysite CLI requires Python 3.11+. Check your version:

    ```bash theme={null}
    python3 --version
    ```

    Consider using [pyenv](https://github.com/pyenv/pyenv) to manage multiple Python versions.
  </Accordion>

  <Accordion title="Schema update fails">
    If `anysite schema update` fails, check your API key and network connection:

    ```bash theme={null}
    anysite config get api_key
    curl -s https://api.anysite.io/openapi.json | head -c 100
    ```
  </Accordion>

  <Accordion title="Permission denied on install">
    Use a virtual environment or the `--user` flag:

    ```bash theme={null}
    python -m venv .venv && source .venv/bin/activate
    pip install anysite-cli
    ```
  </Accordion>
</AccordionGroup>

## Next Steps

<CardGroup cols={2}>
  <Card title="Discover Endpoints" icon="magnifying-glass" href="/cli/endpoints">
    Browse and search 118+ available API endpoints
  </Card>

  <Card title="Make API Calls" icon="code" href="/cli/api-calls">
    Start extracting data with single API requests
  </Card>
</CardGroup>
