Skip to main content

Overview

Anysite CLI can load extracted data directly into databases. It supports SQLite (built-in) and PostgreSQL (via optional extra). 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

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

Next Steps