Skip to main content

Overview

Anysite CLI can load extracted data directly into databases. It supports SQLite (built-in), PostgreSQL, and ClickHouse (via optional extras). Connections are stored in ~/.anysite/connections.yaml and can be referenced by name across all CLI commands.

Supported Databases

DatabaseExtra RequiredUse Case
SQLiteNone (built-in)Local development, single-user workflows, prototyping
PostgreSQLpip install "anysite-cli[postgres]"Production, multi-user, large datasets
ClickHousepip install "anysite-cli[clickhouse]"Analytics, columnar storage, large-scale aggregations

Add a Connection

anysite db add mydb --type sqlite --database ./data/mydata.db
SQLite databases are created automatically if the file doesn’t exist.
Use --password-env to reference an environment variable instead of passing passwords directly. The CLI stores connection details in ~/.anysite/connections.yaml with passwords stored as env var references.

Manage Connections

# List all connections
anysite db list

# Test a connection
anysite db test pg

# Remove a connection
anysite db remove pg

Connection Reference

SQLite Options

OptionDescriptionDefault
--typesqliteRequired
--databasePath to the SQLite database fileRequired

PostgreSQL Options

OptionDescriptionDefault
--typepostgresRequired
--hostDatabase hostlocalhost
--portDatabase port5432
--databaseDatabase nameRequired
--userUsernameRequired
--passwordPassword (prefer --password-env)
--password-envEnvironment variable name containing the password
--url-envEnvironment variable containing the full connection URL
--read-onlyMark connection as read-only (blocks writes)false

ClickHouse Options

OptionDescriptionDefault
--typeclickhouseRequired
--hostDatabase hostlocalhost
--portHTTP port8123
--databaseDatabase namedefault
--userUsername
--passwordPassword (prefer --password-env)
--password-envEnvironment variable name containing the password
--sslEnable SSL (auto-enabled on port 8443)false
--read-onlyMark connection as read-only (blocks writes)false
ClickHouse uses the HTTP protocol via clickhouse-connect. The default engine for auto-created tables is MergeTree().

Next Steps

Database Discovery

Auto-discover database structure and browse saved catalogs

Database Operations

Insert, query, and sync data with your databases