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.
# install, set the token, list $ pip install lampion-cli $ export LAMPION_TOKEN=lmp_live_… $ lampion projects list → my-app · fr-par-1 · running
One PyPI package, no system dependency. Export a scoped API key and the CLI talks to the production API.
# 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.
Create a project, grab the connection string, run SQL, fork a branch to test — all without leaving the terminal.
# 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
Every CLI command, grouped by domain. They all follow the same shape: lampion <group> <action> <arguments>.
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 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 lampion endpoints list <pid> List computes lampion endpoints suspend <pid> <eid> Scale to zero lampion endpoints resume <pid> <eid> Resume lampion sql <pid> <eid> "SELECT ..." Run SQL lampion schema <pid> --database postgres Introspect the schema 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 lampion extensions list <pid> <eid> List lampion extensions install <pid> <eid> pgvector Install lampion extensions uninstall <pid> <eid> pgvector Uninstall 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 lampion backups list <pid> List snapshots lampion backups create <pid> <bid> "name" Create a snapshot lampion backups restore <pid> <bkid> Restore lampion dump <pid> <eid> -o dump.sql pg_dump export 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 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 lampion residency <pid> Data location 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.
# 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"
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 |