TOOLING — COMMAND LINE

Your Postgres databases, driven from the terminal.

The lampion CLI covers the entire API: projects, branches, endpoints, SQL, roles, extensions, backups, anonymization. Output formatted with Rich for humans, JSON output for automation.

pip install lampion-cli · PyPI · Python 3.9+

For AI agents, see the MCP server. For the endpoint details, the API reference.

bashfirst contact
# install, set the token, list
$ pip install lampion-cli
$ export LAMPION_TOKEN=lmp_live_…
$ lampion projects list
→ my-app · fr-par-1 · running
§ 01 — INSTALL

Install and configure

One PyPI package, no system dependency. Export a scoped API key and the CLI talks to the production API.

pip
pip install lampion-cli — Python 3.9+, no native dependency.
uv
uv pip install lampion-cli — same package, ultra-fast resolver.
LAMPION_TOKEN
scoped API key (lmp_live_…) exported as an environment variable.
LAMPION_API_URL
optional — defaults to api.lampion.cloud.
shellinstall & auth
# install from PyPI
$ pip install lampion-cli
$ uv pip install lampion-cli
# export the scoped API key
$ export LAMPION_TOKEN=lmp_live_xxxxxxxxxxxxxxxx
# (optional) target another API
$ export LAMPION_API_URL=https://api.lampion.cloud

Generate an API key in Settings › API Keys of the console.

§ 02 — QUICK START

From zero to a SQL query

Create a project, grab the connection string, run SQL, fork a branch to test — all without leaving the terminal.

terminalfull workflow
# create a project on Scaleway Paris
$ lampion projects create my-app --region fr-par-1
✓ Project created: abc123 (fr-par-1)

# list endpoints for the connection string
$ lampion endpoints list abc123
┌──────────┬─────────┬──────────────────────────────────────────┐
│ ID       │ Status  │ Connection String                         │
├──────────┼─────────┼──────────────────────────────────────────┤
│ ep-abc   │ running │ postgresql://cloud_admin:[email protected]…  │
└──────────┴─────────┴──────────────────────────────────────────┘

# run SQL
$ lampion sql abc123 ep-abc "SELECT count(*) FROM users"
┌─────────┐
│ count   │
├─────────┤
│ 42,847  │
└─────────┘

# create a branch, test, delete
$ lampion branches create abc123 staging --parent abc123
✓ Branch created: stg-tid (staging)
$ lampion branches delete abc123 stg-tid
✓ Deleted
§ 03 — COMMANDS

The full surface, on one screen

Every CLI command, grouped by domain. They all follow the same shape: lampion <group> <action> <arguments>.

projects 4
lampion projects list List projects
lampion projects create my-app --region fr-par-1 Create a project
lampion projects get <id> Get project details
lampion projects delete <id> Delete a project
branches 6
lampion branches list <pid> List branches
lampion branches create <pid> dev --parent <pid> Create a CoW branch
lampion branches reset <pid> <bid> Reset to parent
lampion branches merge <pid> <bid> --dry-run Merge the schema (preview)
lampion branches promote <pid> <bid> Promote to main
lampion branches delete <pid> <bid> Delete a branch
endpoints 3
lampion endpoints list <pid> List computes
lampion endpoints suspend <pid> <eid> Scale to zero
lampion endpoints resume <pid> <eid> Resume
sql & schema 2
lampion sql <pid> <eid> "SELECT ..." Run SQL
lampion schema <pid> --database postgres Introspect the schema
databases & roles 4
lampion databases list <pid> <eid> List databases
lampion databases create <pid> <eid> mydb Create a database
lampion roles list <pid> <eid> List roles
lampion roles create <pid> <eid> app_user Create a role
extensions 3
lampion extensions list <pid> <eid> List
lampion extensions install <pid> <eid> pgvector Install
lampion extensions uninstall <pid> <eid> pgvector Uninstall
monitoring 4
lampion metrics <pid> CPU, RAM, connections, cache
lampion slow-queries <pid> <eid> Top slow queries
lampion logs <pid> <eid> --lines 50 Tail PG logs
lampion usage <pid> Compute/storage usage
backups 3
lampion backups list <pid> List snapshots
lampion backups create <pid> <bid> "name" Create a snapshot
lampion backups restore <pid> <bkid> Restore
dump 1
lampion dump <pid> <eid> -o dump.sql pg_dump export
anon (PII masking) 4
lampion anon status <pid> <bid> Anonymization status
lampion anon enable <pid> <bid> Enable masking
lampion anon add-rule <pid> <bid> --table users --column email --function "anon.fake_email()" Add a rule
lampion anon disable <pid> <bid> Disable
security 4
lampion allowlist get <pid> <eid> IP allowlist
lampion allowlist set <pid> <eid> 1.2.3.4/32 Configure the allowlist
lampion permissions list <pid> <eid> Permissions by role
lampion permissions grant <pid> <eid> --role app --table users --privilege SELECT GRANT
compliance 1
lampion residency <pid> Data location
§ 04 — AUTOMATION

Human-readable or pipe-able

By default, output is formatted with Rich for reading. Add --json and every list command becomes parsable by jq, a script or a CI/CD pipeline.

--json
Emits raw JSON on stdout, no color or borders — ideal in a pipe.
jq
Chain with jq to extract fields or filter the results.
LAMPION_TOKEN
No interaction: the env token is enough to script in CI.
shelljson + jq
# raw JSON output
$ lampion projects list --json
[{"id":"abc123","name":"my-app","region":"fr-par-1"}]

# extract a field with jq
$ lampion projects list --json | jq '.[].id'
"abc123"
REGIONS · FR
SOVEREIGN DATA
PARIS — FR-PAR
§ 05 — REGIONS

Where your data lives

Pass --region when creating a project. Scaleway infrastructure in Paris — your data never leaves the territory; more sovereign regions are on the roadmap.

Region Operator Location
fr-par-1 Scaleway Paris — Vitry-sur-Seine
fr-par-2 Scaleway Paris — Saint-Ouen-l'Aumône
Scaleway, in Paris (ISO/IEC 27001 and HDS certified, SecNumCloud in qualification). No data outside France. Multi-cloud portability on the roadmap.

One terminal, the
whole platform.

Create an account View on GitHub pip install lampion-cli — no credit card.