Akleao CLI
Unified command-line interface for Akleao apps.
Commands are scoped by app:
akleao dock …— Akleao Dock (projects, datasets, large-file uploads)akleao research …— Akleao Research (scaffold — not yet implemented)akleao <cmd> …— bare commands without an app scope default toresearch
Tracked in AKLEAO-43.
Install
cd cli
pip install -e .
Exposes the akleao command.
Authenticate once — every app
# Opens a browser on akleao.com; mints ONE sk_akleao_* key valid on
# both Dock and Research. Stored under the `akleao:` config section.
akleao login
# Headless / SSH:
akleao login --no-browser # RFC 8628 device flow
akleao login --api-key sk_akleao_...
akleao whoami
akleao logout
On staging/prod, just point at the auth base — both API bases (Research + Dock) are derived automatically for akleao.com hosts:
akleao login --env staging --api-url https://staging.akleao.com
akleao login --env prod --api-url https://akleao.com
Quickstart — Dock
# 1. Authenticate (unified login above, or the legacy per-app flow)
akleao dock auth login
# Or headless, with a pre-provisioned API key:
akleao dock auth login --api-key sk_akleao_...
# 2. List projects and datasets
akleao dock projects list
akleao dock datasets list --project <project-id>
# 3. Upload a large file directly to GCS
akleao dock datasets upload <dataset-id> ./huge-file.parquet
Configuration
All CLI config lives at ~/.config/akleao/config.yaml, with per-app nested sections (akleao: / dock: / research:), each holding named environments (default / staging / prod / …). The akleao: section is the shared bucket written by akleao login — one key + explicit dock_url / research_url per environment; the per-app sections remain for legacy per-app logins and app-specific overrides.
On first run, any legacy ~/.config/dock/config.yaml is automatically ported into the new file's dock: section.
Dock env vars
Scoped to whichever dock environment is active. They override values stored in the config file.
DOCK_API_URL— Dock base URL (default:http://localhost:3001)DOCK_API_KEY— API key (formatsk_akleao_...; legacysk_dock_...keys still work)DOCK_USER_EMAIL— bound user emailDOCK_ENV— named environment to target (default,staging,prod, …)
Akleao (shared) env vars
AKLEAO_API_KEY— unified API key (overrides the stored one)AKLEAO_API_URL— auth/login base URLAKLEAO_DOCK_URL/AKLEAO_RESEARCH_URL— per-app API basesAKLEAO_ENV— named environment to target
Research env vars
Same pattern with a RESEARCH_ prefix.
Commands
Dock — Auth
akleao dock auth login— default: opens a browser to authenticateakleao dock auth login --api-key KEY— headless, skip the browserakleao dock auth login --no-browser— device-flow approval (see below)akleao dock auth login --api-url URL— override/store the env's base URLakleao dock auth logout— clear credentials for the active envakleao dock auth whoami— print the user the stored key resolves to
Top-level shortcuts exist for convenience: akleao dock login, akleao dock whoami, akleao dock logout.
Dock — Env
akleao dock env list— show all environments with their URL and auth stateakleao dock env show [NAME]— details for one env (masks the API key; defaults to current)akleao dock env use <name>— switch which env is activeakleao dock env add <name> --url URL— register a new env (unauthenticated)akleao dock env set <name> [--url URL] [--clear-auth]— update URL and/or wipe stored credsakleao dock env remove <name> [--yes]— drop an env
Dock — Projects
akleao dock projects list [--limit N] [--status STATUS]akleao dock projects get <project-id>
Dock — Datasets
akleao dock datasets list [--project PROJECT_ID]akleao dock datasets get <dataset-id>akleao dock datasets create <name> --project <project-id>akleao dock datasets files list <dataset-id>akleao dock datasets upload <dataset-id> <file>— direct-to-GCS upload
Research
Not yet implemented. See AKLEAO-43.
Device-flow login (--no-browser)
For SSH sessions, containers, WSL, or anywhere a local browser isn't practical:
akleao dock auth login --no-browser
The CLI prints a short user code and a verification URL (e.g. a one-click approve page). Open it on any device you're already signed into Akleao with, confirm the code, and the CLI picks up the new API key automatically. RFC 8628 under the hood — POST /api/rest/v1/dock/auth/cli/device-code → poll /device-token until the frontend's approve-page fires.
Env-var precedence
For every setting with an env-var counterpart, the order is: explicit CLI flag → DOCK_* env var → value stored in the active environment. The config file is the baseline; env vars scoped to the prefix override just the active environment (they don't leak across research/dock/etc.).
Testing
cd cli
pip install -e '.[dev]'
pytest
Tests sandbox ~/.config/akleao/ into a tmpdir and mock HTTP via respx, so running them doesn't touch your real config or hit a live backend.
How large uploads work
akleao dock datasets upload does not send bytes through the Next.js API. Instead:
- CLI asks the backend for a v4 signed PUT URL (
POST /datasets/{id}/files/upload-url) - CLI streams the file directly to Google Cloud Storage with a progress bar
- CLI calls
POST /datasets/{id}/files/finalizeto register the file in the database
This means you can upload multi-gigabyte files without any proxy layer in the middle.
Package layout
cli/
├── pyproject.toml
├── README.md
└── akleao/
├── __init__.py
├── __main__.py # entry point; rewrites argv for default-to-research
├── cli.py # root Typer app, mounts dock + research
├── utils/
│ └── config.py # unified ~/.config/akleao/ config, per-app buckets
├── dock/
│ ├── cli.py
│ ├── api/
│ └── commands/ # auth, datasets, projects, env_cmd
└── research/
└── cli.py # scaffold — add commands here
When research commands are added, register them on akleao/research/cli.py::app — they'll be reachable at both akleao research <cmd> and (because research is the default scope) akleao <cmd>.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file akleao-0.2.1.tar.gz.
File metadata
- Download URL: akleao-0.2.1.tar.gz
- Upload date:
- Size: 200.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5fe526f8f9c2e3cfdd17ebdf1390c7145b896cf7d07b85137b6abfb7ed27d7c0
|
|
| MD5 |
d36aefcfa75a9a76b291016267df7b7e
|
|
| BLAKE2b-256 |
82fd19c32276de43d8c3cce84f87684e65f5421acda1aef14bfaf354621bafb7
|
Provenance
The following attestation bundles were made for akleao-0.2.1.tar.gz:
Publisher:
cli-release.yml on akleao/akleao
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
akleao-0.2.1.tar.gz -
Subject digest:
5fe526f8f9c2e3cfdd17ebdf1390c7145b896cf7d07b85137b6abfb7ed27d7c0 - Sigstore transparency entry: 2215343069
- Sigstore integration time:
-
Permalink:
akleao/akleao@9224ab124ef20c7b9ac54bb9019749e667d70e89 -
Branch / Tag:
refs/tags/cli-v0.2.1 - Owner: https://github.com/akleao
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
cli-release.yml@9224ab124ef20c7b9ac54bb9019749e667d70e89 -
Trigger Event:
push
-
Statement type:
File details
Details for the file akleao-0.2.1-py3-none-any.whl.
File metadata
- Download URL: akleao-0.2.1-py3-none-any.whl
- Upload date:
- Size: 138.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bccc98ab14107efa577dc1192144068e5c352d123fddb7bbbd806fd9eb30601f
|
|
| MD5 |
66a738c7502590e8b4336034d36d43ba
|
|
| BLAKE2b-256 |
e9d17ddb5c9d087de44a3dba7ba264e973d6e232aae339243c47df318cee5bf8
|
Provenance
The following attestation bundles were made for akleao-0.2.1-py3-none-any.whl:
Publisher:
cli-release.yml on akleao/akleao
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
akleao-0.2.1-py3-none-any.whl -
Subject digest:
bccc98ab14107efa577dc1192144068e5c352d123fddb7bbbd806fd9eb30601f - Sigstore transparency entry: 2215343110
- Sigstore integration time:
-
Permalink:
akleao/akleao@9224ab124ef20c7b9ac54bb9019749e667d70e89 -
Branch / Tag:
refs/tags/cli-v0.2.1 - Owner: https://github.com/akleao
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
cli-release.yml@9224ab124ef20c7b9ac54bb9019749e667d70e89 -
Trigger Event:
push
-
Statement type: