Command line reference
Every lakana command and sub-command, with its arguments and options, in the order
lakana --help lists them. The options of the first section go before the command
name, as in lakana --output json whoami.
Options for every command
Usage: lakana [OPTIONS] COMMAND [ARGS]...
| Name | Type | Default | Description |
|---|---|---|---|
--profile |
text | none | Profile to use from the profile file. |
--url |
text | none | Override the profile's platform URL. |
--output |
one of table, json |
table |
Output format. Also read from LAKANA_OUTPUT. |
--verbose |
flag | off | Show tracebacks for unexpected errors. |
--version |
flag | off | Show the CLI's version and the instance's, then exit. |
lakana login
Usage: lakana login [OPTIONS]
Verify a credential and save it as a profile.
| Name | Type | Default | Description |
|---|---|---|---|
--profile |
text | none | Profile name to write. |
--url |
text | none | Platform URL. |
--token-stdin |
flag | off | Read the token from stdin (for CI). |
--env |
text | none | Default environment. |
lakana logout
Usage: lakana logout [OPTIONS]
Remove a saved profile (and its token) from the profile file.
| Name | Type | Default | Description |
|---|---|---|---|
--profile |
text | none | Profile to remove. |
lakana whoami
Usage: lakana whoami [OPTIONS]
Show who the configured credential authenticates as.
lakana sql
Usage: lakana sql [OPTIONS] {query}
Run SQL and print (or save) the result, or write it into a table.
With --into T --mode create --expire-after N the new table expires N days after its last write or read.
A query that stays queued for 3 seconds prints a line on standard error that says why ('Waiting: ...'), and again when the reason changes; the result still goes to standard output only. Nothing is printed about waiting with --output json.
| Name | Type | Default | Description |
|---|---|---|---|
QUERY |
text | required | The SQL, or - to read it from stdin. |
--env |
text | none | Environment (default: the profile's). |
--out |
path | none | Write the full result to this file. |
--format |
text | none | parquet, csv or arrow (default: from the extension). |
--max-rows |
whole number, 0 or more | 50 |
Most rows to display. |
--timeout |
number | none | Seconds to wait before giving up. |
--into |
text | none | Write the result into this table or view instead of printing it. |
--mode |
text | none | create, replace, append or view (needs --into). |
--incremental-key |
text | none | Append only rows past the target's max of this column. |
--evolve-schema |
flag | off | Let the target adopt the result's schema. |
--expire-after |
whole number, 1 to 3650 | none | Let the new table expire this many days after its last write or read. |
--break-glass |
flag | off | Write to a protected environment outside a run (needs MANAGE_ENVIRONMENT; audited). |
--reason |
text | none | Why, 10-500 characters on one line (with --break-glass). |
lakana deploy
Usage: lakana deploy [OPTIONS] [repo]
Deploy REPO to an environment; exit 1 if the deploy fails.
| Name | Type | Default | Description |
|---|---|---|---|
REPO |
text | none | Repository name (default: lakana.yaml's repo:). |
--env |
text | none | Environment (default: the profile's). |
--ref |
text | none | Branch, tag or full SHA. |
--dry-run |
flag | off | Validate and diff only. |
--no-wait |
flag | off | Print the deploy id and exit. |
--timeout |
number | none | Seconds to wait. |
lakana rollback
Usage: lakana rollback [OPTIONS] [repo]
Move REPO's deployment back without fetching from git.
| Name | Type | Default | Description |
|---|---|---|---|
REPO |
text | none | Repository name (default: lakana.yaml's repo:). |
--env |
text | none | Environment (default: the profile's). |
--to |
text | none | A full SHA deployed here before. |
--to-previous |
flag | off | The project version current before this one. |
--timeout |
number | none | Seconds to wait. |
lakana undeploy
Usage: lakana undeploy [OPTIONS] [repo]
Remove REPO's deployment and the identity its runs use; tables and history stay.
| Name | Type | Default | Description |
|---|---|---|---|
REPO |
text | none | Repository name (default: lakana.yaml's repo:). |
--env |
text | none | Environment (default: the profile's). |
--yes |
flag | off | Don't ask for confirmation. |
lakana orphans
Usage: lakana orphans [OPTIONS]
List tables earlier project versions produced that no current one does.
| Name | Type | Default | Description |
|---|---|---|---|
--env |
text | none | Environment (default: the profile's). |
lakana run
Usage: lakana run [OPTIONS] [repo]
Run REPO's deployed project version; exit 0 on success, 1 otherwise, 7 if one is active.
| Name | Type | Default | Description |
|---|---|---|---|
REPO |
text | none | Repository name (default: lakana.yaml's repo:). |
--env |
text | none | Environment (default: the profile's). |
--select |
text, repeatable | none | Asset pattern (shell glob); repeatable. |
--upstream |
flag | off | Add every ancestor. |
--downstream |
flag | off | Add every descendant. |
--no-wait |
flag | off | Print the run id and exit. |
--timeout |
number | none | Seconds to wait. |
lakana search
Usage: lakana search [OPTIONS] {TEXT}
Find tables, columns, descriptions, runs and people that match TEXT.
Matching ignores case and finds TEXT anywhere in a name or description. Exact matches come first, then names that start with TEXT, then names that contain it, then descriptions. Runs are found by the first four or more characters of their id, their job or their repository. You see only what you may read. Use --output json for every field.
| Name | Type | Default | Description |
|---|---|---|---|
TEXT |
text | required | What to find; 1 to 200 characters. |
--kind |
one of table, column, run, principal |
none | Only this kind of result. |
--limit |
whole number, 1 to 100 | 20 |
Most results to show (1 to 100). |
--offset |
whole number, 0 or more | 0 |
Results to skip, to show the next page. |
--env |
text | none | Environment (default: the profile's). |
lakana init
Usage: lakana init [OPTIONS] [directory]
Create a Lakana project that deploys unchanged.
| Name | Type | Default | Description |
|---|---|---|---|
DIRECTORY |
path | . |
Project directory (default: here). |
--repo |
text | none | Repository name (default: the directory name). |
--sample / --no-sample |
flag | none | Write a small sample to build and query (default: yes for a local instance). |
lakana profile
Usage: lakana profile [OPTIONS] COMMAND [ARGS]...
Manage saved profiles (local only).
lakana profile list
Usage: lakana profile list [OPTIONS]
List saved profiles; tokens are never shown.
lakana profile use
Usage: lakana profile use [OPTIONS] {name}
Make NAME the default profile.
| Name | Type | Default | Description |
|---|---|---|---|
NAME |
text | required | |
--env |
text | none | Also set its default environment. |
lakana profile remove
Usage: lakana profile remove [OPTIONS] {name}
Delete profile NAME and its token.
| Name | Type | Default | Description |
|---|---|---|---|
NAME |
text | required | |
--yes |
flag | off | Don't ask for confirmation. |
lakana env
Usage: lakana env [OPTIONS] COMMAND [ARGS]...
Manage environments.
lakana env create
Usage: lakana env create [OPTIONS] {name}
Create environment NAME (with bronze/silver/gold namespaces).
Write the storage root the one way Lakana compares locations: a lower-case scheme (s3, not s3a), one slash between path segments and none doubled after file:// (file:///data, not file:////data), for file an absolute path and no host (not file://data or file://localhost/data), no . or .. segments, no percent escapes and no *, ?, [ or ]. One trailing slash is fine. Another spelling is refused, and the message names the one to use.
| Name | Type | Default | Description |
|---|---|---|---|
NAME |
text | required | |
--storage-root |
text | required | e.g. file:///data or s3://bucket/lake |
--option |
text, repeatable | none | Storage option key=value (repeatable). Values land in shell history; prefer --secret-ref for credentials. |
lakana env list
Usage: lakana env list [OPTIONS]
List environments you can see, or with --deleted the deleted ones.
A deleted environment keeps its tables' files until purge_after (the server's undo period, 7 days by default); until then lakana env restore NAME brings it back.
| Name | Type | Default | Description |
|---|---|---|---|
--deleted |
flag | off | List the deleted environments that can still be restored, and until when. |
lakana env get
Usage: lakana env get [OPTIONS] {name}
Show environment NAME.
| Name | Type | Default | Description |
|---|---|---|---|
NAME |
text | required |
lakana env delete
Usage: lakana env delete [OPTIONS] {name}
Delete environment NAME. Its tables' files are kept for the undo period, then deleted.
Within the server's undo period (LAKANA_TABLES__UNDO_DAYS, 7 days by default), lakana env restore NAME brings the environment back with its tables, their data and their grants. Until then the name stays taken, and lakana env list --deleted shows until when. Views and external tables are removed; an external table's files are never deleted. --purge skips the period.
Refused (409) while any repository is deployed to it: run lakana undeploy REPO --env NAME for each first. Refused while protected.
| Name | Type | Default | Description |
|---|---|---|---|
NAME |
text | required | |
--purge |
flag | off | Delete the tables' files at the worker's next clean-up instead of after the undo period; the environment cannot be restored then. Also for an environment already deleted. |
--yes |
flag | off | Don't ask for confirmation. |
lakana env restore
Usage: lakana env restore [OPTIONS] {name}
Restore the deleted environment NAME, with the tables, data and grants it had.
Works until the end of the undo period that lakana env list --deleted shows, and not after lakana env delete NAME --purge. A table dropped before the environment was deleted stays dropped; restore it afterwards with lakana table undrop. Needs MANAGE_ENVIRONMENT (deleting the environment revoked the grants given on it, so usually an administrator's).
| Name | Type | Default | Description |
|---|---|---|---|
NAME |
text | required |
lakana env set-storage
Usage: lakana env set-storage [OPTIONS] {name}
Change environment NAME's storage options or credentials secret.
While the environment has a storage secret, changing the options also needs the right to manage secrets in it (the ADMIN role), because an option such as s3.endpoint decides where the secret is sent. --option replaces all the options, so pass every one the environment should have. Attaching a secret approves the options it has then.
| Name | Type | Default | Description |
|---|---|---|---|
NAME |
text | required | |
--option |
text, repeatable | none | Storage option key=value (repeatable). Values land in shell history; prefer --secret-ref for credentials. |
--secret-ref |
text | none | Secret holding credentials. |
lakana env protect
Usage: lakana env protect [OPTIONS] {name}
Protect environment NAME: lock writes down to deployed runs.
A protected environment refuses every write outside runs of the deployed code (SQL, SDK, CLI and Iceberg REST clients alike) whatever the caller's grants; choose the identity a deployed job runs as with lakana deployments set-run-as. A holder of MANAGE_ENVIRONMENT can make one audited write with --break-glass --reason. It also refuses deletion and storage changes.
| Name | Type | Default | Description |
|---|---|---|---|
NAME |
text | required |
lakana env unprotect
Usage: lakana env unprotect [OPTIONS] {name}
Remove protection from environment NAME.
| Name | Type | Default | Description |
|---|---|---|---|
NAME |
text | required | |
--yes |
flag | off | Don't ask for confirmation. |
lakana env retention
Usage: lakana env retention [OPTIONS] {name}
Show environment NAME's retention, or set it with --days or turn it off with --off.
The retention applies to every managed table in the environment that sets none of its own (lakana table retention). Such a table expires N days after its last activity, and never sooner than N days after this command, so turning it on gives every table its full period. Expired tables are dropped by the worker's clean-up and can be restored with lakana table undrop during the undo period. Off unless set. Needs MANAGE_ENVIRONMENT; refused for a protected environment, whose tables never expire.
| Name | Type | Default | Description |
|---|---|---|---|
NAME |
text | required | |
--days |
whole number, 1 to 3650 | none | Tables that set no retention expire N days after their last write or read. |
--off |
flag | off | Turn the environment's retention off. |
--yes |
flag | off | Don't ask for confirmation. |
lakana env orphaned-locations
Usage: lakana env orphaned-locations [OPTIONS] {name}
List, or with --delete remove, table directories older releases left without a record.
Releases before location records could leave table directories under managed/ that no table and no record names: tables dropped before the upgrade, creates that failed, environments deleted before their tables could be restored. The worker's clean-up only counts them. Without --delete this is a dry run: it lists each directory with its files, size and newest file, and deletes nothing. A directory with a file newer than --older-than (30 days by default) is never deleted. --delete asks first (--yes skips the question), checks every directory again, and keeps one that a table, a create or a dropped table now uses. NAME may be a deleted environment. Needs MANAGE_ENVIRONMENT on the whole instance (the ADMIN role), because the storage root may be shared. After restoring the catalog from a backup, keep --older-than above the backup's age: a table created after the backup has no record either.
| Name | Type | Default | Description |
|---|---|---|---|
NAME |
text | required | |
--older-than |
text | 30d |
Only directories whose newest file is older than this many days, like 30d. |
--delete |
flag | off | Delete the directories listed as old enough. |
--yes |
flag | off | Don't ask for confirmation. |
lakana ns
Usage: lakana ns [OPTIONS] COMMAND [ARGS]...
Manage namespaces.
lakana ns create
Usage: lakana ns create [OPTIONS] {path}
Create namespace PATH (dotted, e.g. bronze.eu).
| Name | Type | Default | Description |
|---|---|---|---|
PATH |
text | required | |
--env |
text | none | Environment (default: the profile's). |
--property |
text, repeatable | none | key=value (repeatable). |
--break-glass |
flag | off | Write to a protected environment outside a run (needs MANAGE_ENVIRONMENT; audited). |
--reason |
text | none | Why, 10-500 characters on one line (with --break-glass). |
lakana ns list
Usage: lakana ns list [OPTIONS]
List namespaces.
| Name | Type | Default | Description |
|---|---|---|---|
--env |
text | none | Environment (default: the profile's). |
lakana ns get
Usage: lakana ns get [OPTIONS] {path}
Show namespace PATH.
| Name | Type | Default | Description |
|---|---|---|---|
PATH |
text | required | |
--env |
text | none | Environment (default: the profile's). |
lakana ns delete
Usage: lakana ns delete [OPTIONS] {path}
Delete namespace PATH.
| Name | Type | Default | Description |
|---|---|---|---|
PATH |
text | required | |
--env |
text | none | Environment (default: the profile's). |
--yes |
flag | off | Don't ask for confirmation. |
--break-glass |
flag | off | Write to a protected environment outside a run (needs MANAGE_ENVIRONMENT; audited). |
--reason |
text | none | Why, 10-500 characters on one line (with --break-glass). |
lakana table
Usage: lakana table [OPTIONS] COMMAND [ARGS]...
Manage tables and load data.
lakana table create
Usage: lakana table create [OPTIONS] {name}
Create managed table NAME (namespace.table).
With --expire-after N the table expires N days after its last write or read: the worker's clean-up then drops it, and lakana table undrop restores it during the undo period.
| Name | Type | Default | Description |
|---|---|---|---|
NAME |
text | required | |
--env |
text | none | Environment (default: the profile's). |
--schema |
path | none | JSON file with the column list. |
--column |
text, repeatable | none | name:type, ? suffix = nullable (repeatable). Quote a ? spec, e.g. 'region:string?', so the shell doesn't glob it. |
--expire-after |
whole number, 1 to 3650 | none | Let the new table expire this many days after its last write or read. |
--break-glass |
flag | off | Write to a protected environment outside a run (needs MANAGE_ENVIRONMENT; audited). |
--reason |
text | none | Why, 10-500 characters on one line (with --break-glass). |
lakana table create-external
Usage: lakana table create-external [OPTIONS] {name}
Register external table NAME over files under raw/.
| Name | Type | Default | Description |
|---|---|---|---|
NAME |
text | required | |
--location |
text | required | Pattern under raw/, e.g. raw/orders/*.csv |
--format |
text | required | csv, json or parquet |
--env |
text | none | Environment (default: the profile's). |
--break-glass |
flag | off | Write to a protected environment outside a run (needs MANAGE_ENVIRONMENT; audited). |
--reason |
text | none | Why, 10-500 characters on one line (with --break-glass). |
lakana table list
Usage: lakana table list [OPTIONS] {namespace}
List the tables in NAMESPACE, or with --dropped the tables dropped from it.
A dropped table keeps its files until purge_after (the server's undo period, 7 days by default); until then lakana table undrop restores it. A table that its retention lets expire within the server's warning window (7 days by default) shows when, in expires.
| Name | Type | Default | Description |
|---|---|---|---|
NAMESPACE |
text | required | |
--dropped |
flag | off | List the dropped tables that can still be restored, and until when. |
--env |
text | none | Environment (default: the profile's). |
lakana table get
Usage: lakana table get [OPTIONS] {name}
Show table or view NAME, its columns, and a view's SQL and references.
A table whose first build did not finish, or failed a check, is shown as not published; one that keeps the data that failed a check (on_failure: keep), as kept. A table that its retention lets expire within the server's warning window says when. An artifact is shown with its name and a pointer to lakana artifact versions list.
| Name | Type | Default | Description |
|---|---|---|---|
NAME |
text | required | |
--env |
text | none | Environment (default: the profile's). |
lakana table health
Usage: lakana table health [OPTIONS] {name}
Show table NAME's last maintenance, the newest result of each check, and who reads it.
Readers are counted from the queries that succeeded, per person and day. You see them only with the ADMIN role. A Python task's reads of its inputs count too. Use --output json for every field.
| Name | Type | Default | Description |
|---|---|---|---|
NAME |
text | required | |
--days |
whole number, 1 or more | none | Readers over this many days (up to the server's kept period, 90 by default). |
--env |
text | none | Environment (default: the profile's). |
lakana table describe
Usage: lakana table describe [OPTIONS] {name}
Describe table NAME or one of its columns, or reset the description.
The text you set is shown instead of the description: in the asset's header, and a deploy never replaces it. --reset goes back to the header's text. You need to own the table, or hold the right to drop it.
| Name | Type | Default | Description |
|---|---|---|---|
NAME |
text | required | |
--column |
text | none | Describe this column instead of the table. |
--text |
text | none | The description, up to 4,000 characters. |
--reset |
flag | off | Remove your text, so the project's shows again. |
--env |
text | none | Environment (default: the profile's). |
lakana table delete
Usage: lakana table delete [OPTIONS] {name}
Drop table NAME. Its files are kept for the undo period, then deleted.
Within the server's undo period (LAKANA_TABLES__UNDO_DAYS, 7 days by default), lakana table undrop NAME restores the table with its data and its grants, row filters and column masks. --purge skips the period: the worker deletes the files at its next clean-up. An external table's files are never deleted.
| Name | Type | Default | Description |
|---|---|---|---|
NAME |
text | required | |
--purge |
flag | off | Delete its files at the next clean-up instead; it cannot be restored. |
--env |
text | none | Environment (default: the profile's). |
--yes |
flag | off | Don't ask for confirmation. |
--break-glass |
flag | off | Write to a protected environment outside a run (needs MANAGE_ENVIRONMENT; audited). |
--reason |
text | none | Why, 10-500 characters on one line (with --break-glass). |
lakana table undrop
Usage: lakana table undrop [OPTIONS] {name}
Restore the dropped table NAME, with its data, grants, row filters and column masks.
Works until the end of the undo period that lakana table list NAMESPACE --dropped shows. Needs the rights to drop and to create tables in the namespace. When NAME was dropped more than once, the newest comes back; restore an older one with --as.
| Name | Type | Default | Description |
|---|---|---|---|
NAME |
text | required | |
--as |
text | none | Restore it under this name, when a table of its own name exists now. |
--env |
text | none | Environment (default: the profile's). |
--break-glass |
flag | off | Write to a protected environment outside a run (needs MANAGE_ENVIRONMENT; audited). |
--reason |
text | none | Why, 10-500 characters on one line (with --break-glass). |
lakana table append
Usage: lakana table append [OPTIONS] {name} {file}
Append FILE (Parquet, CSV or Arrow) to table NAME.
The table's schema is fetched first. A CSV is parsed straight into the table's column types; Parquet and Arrow are cast to them. Nullability is checked too, and a column that doesn't fit fails here, before anything is sent.
| Name | Type | Default | Description |
|---|---|---|---|
NAME |
text | required | |
FILE |
path | required | |
--env |
text | none | Environment (default: the profile's). |
--format |
text | none | parquet, csv or arrow (default: from the extension). |
--source |
text, repeatable | none | A table the data came from (repeatable); recorded as lineage. |
--break-glass |
flag | off | Write to a protected environment outside a run (needs MANAGE_ENVIRONMENT; audited). |
--reason |
text | none | Why, 10-500 characters on one line (with --break-glass). |
lakana table replace
Usage: lakana table replace [OPTIONS] {name} {file}
Replace every row of table NAME with FILE (Parquet, CSV or Arrow).
Without --evolve-schema the file is conformed to the table's columns first, exactly as table append does. With it, the file is sent as it is and the table takes its schema.
| Name | Type | Default | Description |
|---|---|---|---|
NAME |
text | required | |
FILE |
path | required | |
--env |
text | none | Environment (default: the profile's). |
--format |
text | none | parquet, csv or arrow (default: from the extension). |
--evolve-schema |
flag | off | Let the table adopt the file's schema. |
--source |
text, repeatable | none | A table the data came from (repeatable); recorded as lineage. |
--break-glass |
flag | off | Write to a protected environment outside a run (needs MANAGE_ENVIRONMENT; audited). |
--reason |
text | none | Why, 10-500 characters on one line (with --break-glass). |
lakana table maintain
Usage: lakana table maintain [OPTIONS] {name}
Expire table NAME's old snapshots, delete its orphaned files, and remove failed-check tags.
A snapshot kept under the tag of a failed check is removed with that tag once it is older than 7 days. A snapshot that a run still in progress needs to set its table back is kept.
| Name | Type | Default | Description |
|---|---|---|---|
NAME |
text | required | |
--env |
text | none | Environment (default: the profile's). |
--keep-days |
whole number, 0 or more | 7 |
Keep snapshots younger than this. |
--keep-last |
whole number, 1 or more | 5 |
Always keep this many recent snapshots. |
--dry-run |
flag | off | Report what would happen; change nothing. |
--older-than-hours |
whole number, 1 to 87600 | 72 |
Orphaned files younger than this many hours are never deleted (1 to 87600). |
--timeout |
number | none | Seconds to wait before giving up. |
lakana table lineage
Usage: lakana table lineage [OPTIONS] {name}
Show table NAME's lineage as a tree (or JSON with --output json).
| Name | Type | Default | Description |
|---|---|---|---|
NAME |
text | required | |
--env |
text | none | Environment (default: the profile's). |
--downstream |
flag | off | Show what NAME feeds, not what feeds it. |
--depth |
whole number, 1 to 10 | 3 |
Hops to walk. |
lakana table retention
Usage: lakana table retention [OPTIONS] {name}
Show when managed table NAME expires, or set it with --days, --on or --never.
An expired table is dropped by the worker's clean-up and can be restored with lakana table undrop during the undo period. Its last activity is the later of its last write (or other change) and its last read through Lakana's queries. Tables in a protected environment and tables a deployed project builds never expire.
Without an option this shows the table's retention. The table's owner may set any. Otherwise, making it expire sooner (or at all) needs the right to drop the table; making it expire later, or --never, needs the right to write it.
| Name | Type | Default | Description |
|---|---|---|---|
NAME |
text | required | |
--days |
whole number, 1 to 3650 | none | Expire N days after the last write or read. |
--on |
text | none | Expire on this day (YYYY-MM-DD, UTC). |
--never |
flag | off | Never expire, whatever the environment says. |
--env |
text | none | Environment (default: the profile's). |
lakana table expiring
Usage: lakana table expiring [OPTIONS]
List the managed tables that their retention lets expire soon, soonest first.
Each row says when, the rule (and whether the table or its environment sets it) and who set it. Keep a table with lakana table retention NAME --never, or give it more days.
| Name | Type | Default | Description |
|---|---|---|---|
--within |
text | none | List what expires within this many days, such as 7d (default: the server's warning window, 7 days). |
--env |
text | none | Environment (default: the profile's). |
lakana artifact
Usage: lakana artifact [OPTIONS] COMMAND [ARGS]...
Manage artifacts: versioned files such as models.
lakana artifact upload
Usage: lakana artifact upload [OPTIONS] {name} {path}
Store PATH (a file or a directory) as a new version of artifact NAME (namespace.name).
Everything in a directory is stored, including hidden files such as .env: point the command at a directory that holds only the artifact. Only files the store does not have yet are sent. Links, devices and Windows-unsafe names are refused before anything is sent; the message names the path.
| Name | Type | Default | Description |
|---|---|---|---|
NAME |
text | required | |
PATH |
path | required | |
--env |
text | none | Environment (default: the profile's). |
--break-glass |
flag | off | Write to a protected environment outside a run (needs MANAGE_ENVIRONMENT; audited). |
--reason |
text | none | Why, 10-500 characters on one line (with --break-glass). |
lakana artifact list
Usage: lakana artifact list [OPTIONS]
List the artifacts you may read, with their current version and size.
| Name | Type | Default | Description |
|---|---|---|---|
--namespace |
text | none | Only this namespace, e.g. models. |
--env |
text | none | Environment (default: the profile's). |
lakana artifact drop
Usage: lakana artifact drop [OPTIONS] {name}
Drop artifact NAME (namespace.name): every version, its files and its grants.
This cannot be undone. The name becomes free; a new artifact of that name starts at version 1. The files are removed inside the request, so an artifact with thousands of files can take minutes; if the server fails part-way, Lakana's periodic clean-up finishes the job. Needs DROP_TABLE on the artifact, which a task never has. In a protected environment pass --break-glass --reason.
| Name | Type | Default | Description |
|---|---|---|---|
NAME |
text | required | |
--env |
text | none | Environment (default: the profile's). |
--yes |
flag | off | Don't ask for confirmation. |
--break-glass |
flag | off | Write to a protected environment outside a run (needs MANAGE_ENVIRONMENT; audited). |
--reason |
text | none | Why, 10-500 characters on one line (with --break-glass). |
lakana artifact download
Usage: lakana artifact download [OPTIONS] {name} {directory}
Download a version of artifact NAME (namespace.name) into DIRECTORY.
DIRECTORY must not exist, or be empty. The files appear there only when all of them have arrived and match the manifest; if anything goes wrong nothing is left at DIRECTORY (a directory that did not exist is not there, one that existed is empty again) and the message says what to do. An empty directory is never replaced: it keeps its place and its mode, and the files are moved into it at the end. Nothing is written through a link.
The copy is private to you, because the artifact's contents are access-controlled on the server: files are 0600 and directories 0700 (less your umask), nothing is executable. To open the copy to others run chmod -R a+rX DIR. (A read-only copy, files 0400 and directories 0500, is what a task gets as its input; remove one with chmod -R u+w DIR first.)
| Name | Type | Default | Description |
|---|---|---|---|
NAME |
text | required | |
DIRECTORY |
path | required | |
--version |
whole number, 1 or more | none | The version to download (default: the current one). |
--env |
text | none | Environment (default: the profile's). |
lakana artifact versions
Usage: lakana artifact versions [OPTIONS] COMMAND [ARGS]...
Show the versions of an artifact: when each was made, its size, its file count, its digest, and whether it was deleted.
lakana artifact versions list
Usage: lakana artifact versions list [OPTIONS] {name}
List the versions of artifact NAME (namespace.name), newest first.
A deleted version is listed too, with when it was deleted; its bytes are gone. Version numbers can have gaps. If an upload said the server did not confirm its commit, look here for a version with the manifest_sha256 it names.
On a narrow terminal the table leaves out columns, the digest last, and says which; the JSON form always has them all and the whole digest: lakana --output json artifact versions list NAME.
| Name | Type | Default | Description |
|---|---|---|---|
NAME |
text | required | |
--env |
text | none | Environment (default: the profile's). |
lakana artifact versions delete
Usage: lakana artifact versions delete [OPTIONS] {name} {version}
Delete one version of artifact NAME (namespace.name). This cannot be undone.
The version's files are removed from Lakana's storage, except a file another version still has. A bucket that keeps old object versions, and a backup, still have them. The version stays in versions list, marked deleted, with who deleted it and when; its number is never reused. The command says how many files it freed and how many it kept, and why: another version has them, an open upload names them, or Lakana's periodic clean-up decides about them (for example for a large version, a manifest the catalog does not know after a restore, a damaged manifest or a storage failure). Needs DROP_TABLE on the artifact, which a task never has. In a protected environment pass --break-glass --reason.
| Name | Type | Default | Description |
|---|---|---|---|
NAME |
text | required | |
VERSION |
whole number, 1 or more | required | The version number, from versions list. |
--env |
text | none | Environment (default: the profile's). |
--yes |
flag | off | Don't ask for confirmation. |
--break-glass |
flag | off | Write to a protected environment outside a run (needs MANAGE_ENVIRONMENT; audited). |
--reason |
text | none | Why, 10-500 characters on one line (with --break-glass). |
lakana artifact uploads
Usage: lakana artifact uploads [OPTIONS] COMMAND [ARGS]...
List and withdraw uploads that were begun and not finished. lakana artifact upload withdraws its own when it fails; use list to find one a killed process left behind and abort to withdraw it.
lakana artifact uploads list
Usage: lakana artifact uploads list [OPTIONS] [name]
List your own open uploads, newest first: the id, the artifact, when it began and expires.
Only your own: another person's uploads are never listed. An upload that was begun and never finished (after a killed process, a lost connection or a power cut) holds one of its artifact's 16 upload places until it expires, one hour by default. Withdraw one with lakana artifact uploads abort NAME UPLOAD_ID. The list does not say how many files an upload has sent.
| Name | Type | Default | Description |
|---|---|---|---|
NAME |
text | none | Only this artifact (namespace.name); every artifact by default. |
--env |
text | none | Environment (default: the profile's). |
--limit |
whole number, 1 to 500 | 100 |
Uploads per page. |
--cursor |
text | none | Continue from a previous page. |
--all |
flag | off | Follow every page. |
lakana artifact uploads abort
Usage: lakana artifact uploads abort [OPTIONS] {name} {upload_id}
Withdraw upload UPLOAD_ID of artifact NAME (namespace.name) that was never finished.
lakana artifact upload does this by itself when it fails or is interrupted, so you rarely need it. An artifact allows 16 open uploads at once; an abandoned one frees its place when it is withdrawn or after the upload lifetime (one hour by default). Only the person (or service account) that began the upload can withdraw it, and only while it is open. Files it already stored stay until Lakana's periodic clean-up finds that nothing needs them.
| Name | Type | Default | Description |
|---|---|---|---|
NAME |
text | required | |
UPLOAD_ID |
text | required | |
--env |
text | none | Environment (default: the profile's). |
lakana query
Usage: lakana query [OPTIONS] COMMAND [ARGS]...
Submit queries and fetch their results step by step.
lakana query list
Usage: lakana query list [OPTIONS]
List the queued and running queries of an environment.
Running queries come first, then queued ones in the order they will be taken, with the reason each waits. You see your own queries; with MANAGE_ENVIRONMENT on the environment, everyone's, and --submitter narrows them to one principal's. The SQL and the error text are not listed: read them with 'lakana query status ID'. A long list prints a "More results" line with the command that shows the next page.
| Name | Type | Default | Description |
|---|---|---|---|
--env |
text | none | Environment (default: the profile's). |
--all |
flag | off | Also the queries that ended in the last 24 hours. |
--status |
text, repeatable | none | Only queries in this status: queued, running, succeeded, failed or cancelled. Repeat the option or separate the values with commas. An ended status lists the ended queries of the last 24 hours without --all. |
--submitter |
text | none | Only the queries this principal submitted. |
--limit |
whole number, 1 to 200 | 100 |
Most queries to list. |
--cursor |
text | none | Continue after the page that printed this cursor. |
lakana query submit
Usage: lakana query submit [OPTIONS] {query}
Submit SQL without waiting; prints the query id.
| Name | Type | Default | Description |
|---|---|---|---|
QUERY |
text | required | |
--env |
text | none | Environment (default: the profile's). |
lakana query status
Usage: lakana query status [OPTIONS] {query_id}
Show a query's status; for a queued query, waiting_for says why it has not started.
| Name | Type | Default | Description |
|---|---|---|---|
QUERY_ID |
text | required | |
--env |
text | none | Environment (default: the profile's). |
lakana query wait
Usage: lakana query wait [OPTIONS] {query_id}
Wait for a query to finish.
After 3 seconds in the queue, a line on standard error says why the query waits ('Waiting: ...'), and again when the reason changes. Ctrl-C cancels the query, also one of someone else's if you hold MANAGE_ENVIRONMENT.
| Name | Type | Default | Description |
|---|---|---|---|
QUERY_ID |
text | required | |
--env |
text | none | Environment (default: the profile's). |
--timeout |
number | none | Seconds to wait before giving up. |
lakana query cancel
Usage: lakana query cancel [OPTIONS] {query_id}
Cancel a queued query, or ask the worker to stop a running one.
| Name | Type | Default | Description |
|---|---|---|---|
QUERY_ID |
text | required | |
--env |
text | none | Environment (default: the profile's). |
lakana query result
Usage: lakana query result [OPTIONS] {query_id}
Fetch a finished query's result.
| Name | Type | Default | Description |
|---|---|---|---|
QUERY_ID |
text | required | |
--env |
text | none | Environment (default: the profile's). |
--out |
path | none | Write the full result to this file. |
--format |
text | none | parquet, csv or arrow (default: from the extension). |
--max-rows |
whole number, 0 or more | 50 |
Most rows to display. |
lakana principal
Usage: lakana principal [OPTIONS] COMMAND [ARGS]...
Manage principals.
lakana principal create
Usage: lakana principal create [OPTIONS] {name}
Create principal NAME.
| Name | Type | Default | Description |
|---|---|---|---|
NAME |
text | required | |
--type |
one of user, service-account |
required | user or service-account |
lakana principal list
Usage: lakana principal list [OPTIONS]
List principals, newest first.
--search TEXT lists those whose name contains TEXT, in any letter case. A long list prints a "More results" line with the command that shows the next page.
| Name | Type | Default | Description |
|---|---|---|---|
--search |
text | none | Only names that contain this text, in any letter case. |
--limit |
whole number, 1 to 200 | none | Most rows to list (default 100). |
--cursor |
text | none | Continue after the page that printed this cursor. |
lakana principal get
Usage: lakana principal get [OPTIONS] {name}
Show principal NAME.
| Name | Type | Default | Description |
|---|---|---|---|
NAME |
text | required |
lakana principal deactivate
Usage: lakana principal deactivate [OPTIONS] {name}
Deactivate principal NAME; its credentials stop working.
| Name | Type | Default | Description |
|---|---|---|---|
NAME |
text | required | |
--yes |
flag | off | Don't ask for confirmation. |
lakana group
Usage: lakana group [OPTIONS] COMMAND [ARGS]...
Manage groups.
lakana group create
Usage: lakana group create [OPTIONS] {name}
Create group NAME.
| Name | Type | Default | Description |
|---|---|---|---|
NAME |
text | required |
lakana group list
Usage: lakana group list [OPTIONS]
List groups, newest first.
--search TEXT lists those whose name contains TEXT, in any letter case. A long list prints a "More results" line with the command that shows the next page.
| Name | Type | Default | Description |
|---|---|---|---|
--search |
text | none | Only names that contain this text, in any letter case. |
--limit |
whole number, 1 to 200 | none | Most rows to list (default 100). |
--cursor |
text | none | Continue after the page that printed this cursor. |
lakana group delete
Usage: lakana group delete [OPTIONS] {name}
Delete group NAME.
| Name | Type | Default | Description |
|---|---|---|---|
NAME |
text | required | |
--yes |
flag | off | Don't ask for confirmation. |
lakana group members
Usage: lakana group members [OPTIONS] {name}
List group NAME's members.
| Name | Type | Default | Description |
|---|---|---|---|
NAME |
text | required |
lakana group add-member
Usage: lakana group add-member [OPTIONS] {name} {principal}
Add PRINCIPAL to group NAME.
| Name | Type | Default | Description |
|---|---|---|---|
NAME |
text | required | |
PRINCIPAL |
text | required |
lakana group remove-member
Usage: lakana group remove-member [OPTIONS] {name} {principal}
Remove PRINCIPAL from group NAME.
| Name | Type | Default | Description |
|---|---|---|---|
NAME |
text | required | |
PRINCIPAL |
text | required | |
--yes |
flag | off | Don't ask for confirmation. |
lakana token
Usage: lakana token [OPTIONS] COMMAND [ARGS]...
Manage personal access tokens.
lakana token issue
Usage: lakana token issue [OPTIONS] {principal} {name}
Issue a personal access token named NAME for PRINCIPAL; the token is shown once.
| Name | Type | Default | Description |
|---|---|---|---|
PRINCIPAL |
text | required | |
NAME |
text | required |
lakana token list
Usage: lakana token list [OPTIONS] {principal}
List PRINCIPAL's tokens (never their secrets).
| Name | Type | Default | Description |
|---|---|---|---|
PRINCIPAL |
text | required |
lakana token revoke
Usage: lakana token revoke [OPTIONS] {principal} {key_id}
Revoke PRINCIPAL's token KEY_ID.
| Name | Type | Default | Description |
|---|---|---|---|
PRINCIPAL |
text | required | |
KEY_ID |
text | required | |
--yes |
flag | off | Don't ask for confirmation. |
lakana task-token
Usage: lakana task-token [OPTIONS] COMMAND [ARGS]...
Mint and revoke task tokens.
lakana task-token mint
Usage: lakana task-token mint [OPTIONS] {principal}
Mint a task token for PRINCIPAL; the token is shown once.
PRINCIPAL is your own name, unless you are an instance admin.
| Name | Type | Default | Description |
|---|---|---|---|
PRINCIPAL |
text | required | |
--scope |
text, repeatable | required | Asset pattern, e.g. bronze.* (repeatable). |
--ttl |
whole number, 1 or more | required | Lifetime in seconds. |
--env |
text | none | Environment (default: the profile's). |
lakana task-token revoke
Usage: lakana task-token revoke [OPTIONS] {key_id}
Revoke task token KEY_ID.
| Name | Type | Default | Description |
|---|---|---|---|
KEY_ID |
text | required | |
--yes |
flag | off | Don't ask for confirmation. |
lakana grant
Usage: lakana grant [OPTIONS] COMMAND [ARGS]...
Manage grants.
lakana grant create
Usage: lakana grant create [OPTIONS]
Grant a role or action on a securable to a principal or group.
| Name | Type | Default | Description |
|---|---|---|---|
--kind |
text | required | INSTANCE, ENVIRONMENT, NAMESPACE or TABLE. |
--principal |
text | none | Principal name. |
--group |
text | none | Group name. |
--role |
text | none | VIEWER, ANALYST, DATA_SCIENTIST, DATA_ENGINEER or ADMIN. |
--action |
text | none | A single action, e.g. READ_TABLE. |
--env |
text | none | Environment. |
--ns |
text | none | Namespace (dotted). |
--table |
text | none | Table name. |
lakana grant list
Usage: lakana grant list [OPTIONS]
List active grants, newest first; without a filter, every grant.
Filters combine. --principal and --group list the grants made to them (not those a principal has through its groups: lakana access explain says that). --action lists the grants that give an action, by itself or through a role. --env, with --ns and --table, lists the grants on exactly that object. A long list prints a "More results" line with the command that shows the next page.
The table names who each grant is for in subject (user alice, service ci-bot, group analysts); the API sends ids only, so the names cost one request per principal and group until all are found, and a caller that may not list them sees the ids. A column with nothing in it is left out. When the terminal is too narrow the table leaves out kind, namespace, table, environment and action, in that order, and folds a long subject onto more lines, so that the id that grant revoke needs always stays whole, and a line under the table shows the revoke command; --output json always has every field.
A grant of MANAGE_GRANT, MANAGE_GROUP or MANAGE_TOKEN as a single action has the marker no effect in a note column, which never drops (a narrow terminal leaves out table after the others, so that the id and the marker stay whole), and a line under the table explains it, followed by the command that revokes each such grant with its whole id (the first five; --output json has all of them and carries the full sentence). Revoke such a grant, and give the ADMIN role to whoever should keep the ability.
| Name | Type | Default | Description |
|---|---|---|---|
--principal |
text | none | Principal name. |
--group |
text | none | Group name. |
--action |
text | none | Only grants that give this action, e.g. READ_TABLE. |
--env |
text | none | Environment. |
--ns |
text | none | Namespace (dotted). |
--table |
text | none | Table name. |
--limit |
whole number, 1 to 200 | none | Most rows to list (default 100). |
--cursor |
text | none | Continue after the page that printed this cursor. |
lakana grant revoke
Usage: lakana grant revoke [OPTIONS] {grant_id}
Revoke grant GRANT_ID.
Take the id from grant list, which keeps it in the table even on a narrow terminal.
| Name | Type | Default | Description |
|---|---|---|---|
GRANT_ID |
text | required | |
--yes |
flag | off | Don't ask for confirmation. |
lakana access
Usage: lakana access [OPTIONS] COMMAND [ARGS]...
Explain who may do what.
lakana access explain
Usage: lakana access explain [OPTIONS] {principal}
Show what PRINCIPAL may do on an object, and through which grant, role or group.
One row per action that applies to the object: allowed is the answer of the same check the server makes when the principal tries, and via names the grants that give it (a role, a single action, or either through a group). You may explain yourself; explaining someone else needs the ADMIN role on the instance.
| Name | Type | Default | Description |
|---|---|---|---|
PRINCIPAL |
text | required | |
--scope |
text | none | The object: ENV, ENV/NAMESPACE or ENV/NAMESPACE/TABLE. Leave it out for the instance. |
lakana row-filter
Usage: lakana row-filter [OPTIONS] COMMAND [ARGS]...
Manage row filters.
lakana row-filter create
Usage: lakana row-filter create [OPTIONS] {table}
Restrict which rows of TABLE (namespace.table) a principal or group sees.
| Name | Type | Default | Description |
|---|---|---|---|
TABLE |
text | required | |
--expression |
text | required | Restricted SQL expression. |
--principal |
text | none | Principal name. |
--group |
text | none | Group name. |
--env |
text | none | Environment (default: the profile's). |
lakana row-filter list
Usage: lakana row-filter list [OPTIONS]
List active row filters, optionally filtered.
The table names who each row filter is for in subject. When the terminal is too narrow it leaves out environment, id and namespace, in that order; --output json always has every field.
| Name | Type | Default | Description |
|---|---|---|---|
--principal |
text | none | Principal name. |
--group |
text | none | Group name. |
--env |
text | none | Only this environment. |
lakana row-filter revoke
Usage: lakana row-filter revoke [OPTIONS] {row_filter_id}
Revoke row filter ROW_FILTER_ID.
Take the id from row-filter list; on a narrow terminal the table leaves it out, so widen the terminal or use --output json.
| Name | Type | Default | Description |
|---|---|---|---|
ROW_FILTER_ID |
text | required | |
--yes |
flag | off | Don't ask for confirmation. |
lakana column-mask
Usage: lakana column-mask [OPTIONS] COMMAND [ARGS]...
Manage column masks.
lakana column-mask create
Usage: lakana column-mask create [OPTIONS] {table} {column}
Mask COLUMN of TABLE (namespace.table) for a principal or group.
| Name | Type | Default | Description |
|---|---|---|---|
TABLE |
text | required | |
COLUMN |
text | required | |
--expression |
text | required | Restricted SQL expression. |
--principal |
text | none | Principal name. |
--group |
text | none | Group name. |
--env |
text | none | Environment (default: the profile's). |
lakana column-mask list
Usage: lakana column-mask list [OPTIONS]
List active column masks, optionally filtered.
The table names who each column mask is for in subject. When the terminal is too narrow it leaves out environment, id and namespace, in that order; --output json always has every field.
| Name | Type | Default | Description |
|---|---|---|---|
--principal |
text | none | Principal name. |
--group |
text | none | Group name. |
--env |
text | none | Only this environment. |
lakana column-mask revoke
Usage: lakana column-mask revoke [OPTIONS] {column_mask_id}
Revoke column mask COLUMN_MASK_ID.
Take the id from column-mask list; on a narrow terminal the table leaves it out, so widen the terminal or use --output json.
| Name | Type | Default | Description |
|---|---|---|---|
COLUMN_MASK_ID |
text | required | |
--yes |
flag | off | Don't ask for confirmation. |
lakana secret
Usage: lakana secret [OPTIONS] COMMAND [ARGS]...
Manage write-only secrets.
lakana secret create
Usage: lakana secret create [OPTIONS] {name}
Create secret NAME; its values can never be read back.
Name its use with --index, --repository or --own-env to bind it as it is created; that needs the right to manage secrets, as secret bind does.
| Name | Type | Default | Description |
|---|---|---|---|
NAME |
text | required | |
--env |
text | none | Environment (default: the profile's). |
--value |
text, repeatable | none | key=value (repeatable). Lands in shell history; prefer --values-stdin. |
--values-stdin |
flag | off | Read a JSON object of values from stdin. |
--index |
text | none | Bind it to this package index. |
--repository |
text | none | Bind it to this repository. |
--own-env |
flag | off | Bind it to its environment: storage and webhooks. |
lakana secret list
Usage: lakana secret list [OPTIONS]
List secrets (names and metadata only).
format_version 1 marks a secret stored in the original format; set it again with lakana secret rotate to store it in the current one.
use says what a secret may be used for: a package index or a repository (use_target names it), or its environment's storage and webhooks. A secret with no use serves its environment only; lakana secret bind gives it one.
| Name | Type | Default | Description |
|---|---|---|---|
--env |
text | none | Environment (default: the profile's). |
lakana secret rotate
Usage: lakana secret rotate [OPTIONS] {name}
Replace secret NAME's values.
| Name | Type | Default | Description |
|---|---|---|---|
NAME |
text | required | |
--env |
text | none | Environment (default: the profile's). |
--value |
text, repeatable | none | key=value (repeatable). Lands in shell history; prefer --values-stdin. |
--values-stdin |
flag | off | Read a JSON object of values from stdin. |
lakana secret bind
Usage: lakana secret bind [OPTIONS] {name}
Bind secret NAME to the one use it may serve; needs the right to manage secrets.
| Name | Type | Default | Description |
|---|---|---|---|
NAME |
text | required | |
--env |
text | none | Environment (default: the profile's). |
--index |
text | none | Bind it to this package index. |
--repository |
text | none | Bind it to this repository. |
--own-env |
flag | off | Bind it to its environment: storage and webhooks. |
lakana secret revoke
Usage: lakana secret revoke [OPTIONS] {name}
Revoke secret NAME.
| Name | Type | Default | Description |
|---|---|---|---|
NAME |
text | required | |
--env |
text | none | Environment (default: the profile's). |
--yes |
flag | off | Don't ask for confirmation. |
lakana repo
Usage: lakana repo [OPTIONS] COMMAND [ARGS]...
Register and manage git repositories.
lakana repo add
Usage: lakana repo add [OPTIONS] {name}
Register repository NAME.
| Name | Type | Default | Description |
|---|---|---|---|
NAME |
text | required | |
--kind |
text | required | local, https or ssh. |
--url |
text | required | URL, or a path for --kind local. |
--credential-secret |
text | none | Secret name, resolved per environment. |
--credential-username |
text | none | HTTPS username (default oauth2). |
--known-hosts-file |
path | none | known_hosts lines for --kind ssh. |
--default-ref |
text | none | Ref deployed by default. |
lakana repo list
Usage: lakana repo list [OPTIONS]
List repositories.
lakana repo show
Usage: lakana repo show [OPTIONS] {name}
Show repository NAME.
| Name | Type | Default | Description |
|---|---|---|---|
NAME |
text | required |
lakana repo update
Usage: lakana repo update [OPTIONS] {name}
Change repository NAME; only the options given change.
| Name | Type | Default | Description |
|---|---|---|---|
NAME |
text | required | |
--url |
text | none | |
--credential-secret |
text | none | |
--credential-username |
text | none | |
--known-hosts-file |
path | none | |
--default-ref |
text | none | |
--clear |
text, repeatable | none | Clear a field (repeatable). |
lakana repo remove
Usage: lakana repo remove [OPTIONS] {name}
Delete repository NAME and its deploy history.
| Name | Type | Default | Description |
|---|---|---|---|
NAME |
text | required | |
--yes |
flag | off | Don't ask for confirmation. |
lakana index
Usage: lakana index [OPTIONS] COMMAND [ARGS]...
Register and manage package indexes for Python assets.
lakana index add
Usage: lakana index add [OPTIONS] {name}
Register package index NAME.
| Name | Type | Default | Description |
|---|---|---|---|
NAME |
text | required | |
--url |
text | required | https://host/path of the index, without a user name or password. |
--credential-secret |
text | none | Name of the secret that holds username and password, per environment. |
lakana index list
Usage: lakana index list [OPTIONS]
List package indexes.
lakana index show
Usage: lakana index show [OPTIONS] {name}
Show package index NAME.
| Name | Type | Default | Description |
|---|---|---|---|
NAME |
text | required |
lakana index update
Usage: lakana index update [OPTIONS] {name}
Change package index NAME; only the options given change.
| Name | Type | Default | Description |
|---|---|---|---|
NAME |
text | required | |
--url |
text | none | |
--credential-secret |
text | none | |
--clear |
text, repeatable | none | Clear a field (repeatable). |
lakana index remove
Usage: lakana index remove [OPTIONS] {name}
Delete package index NAME.
| Name | Type | Default | Description |
|---|---|---|---|
NAME |
text | required | |
--yes |
flag | off | Don't ask for confirmation. |
lakana deploys
Usage: lakana deploys [OPTIONS] COMMAND [ARGS]...
Deploy history.
lakana deploys list
Usage: lakana deploys list [OPTIONS]
List deploy history, newest first.
A long list prints a "More results" line with the command that shows the next page.
| Name | Type | Default | Description |
|---|---|---|---|
--env |
text | none | Environment (default: the profile's). |
--repo |
text | none | Only this repository. |
--limit |
whole number, 1 to 200 | none | Most deploys to list (default 100). |
--cursor |
text | none | Continue after the page that printed this cursor. |
lakana deploys show
Usage: lakana deploys show [OPTIONS] {deploy_id}
Show deploy DEPLOY_ID.
| Name | Type | Default | Description |
|---|---|---|---|
DEPLOY_ID |
text | required | |
--env |
text | none | Environment (default: the profile's). |
lakana deployments
Usage: lakana deployments [OPTIONS] COMMAND [ARGS]...
Current deployments and the identity each one runs as.
| Name | Type | Default | Description |
|---|---|---|---|
--env |
text | none | Environment (default: the profile's). |
lakana deployments list
Usage: lakana deployments list [OPTIONS]
Show the current project version per repository.
| Name | Type | Default | Description |
|---|---|---|---|
--env |
text | none | Environment (default: the profile's). |
lakana deployments set-run-as
Usage: lakana deployments set-run-as [OPTIONS] [repo]
Bind (or with --clear remove) the service account REPO's runs write as.
| Name | Type | Default | Description |
|---|---|---|---|
REPO |
text | none | Repository name (default: lakana.yaml's repo:). |
--env |
text | none | Environment (default: the profile's). |
--principal |
text | none | An active service account. |
--clear |
flag | off | Stop using a fixed identity for the runs. |
lakana project-version
Usage: lakana project-version [OPTIONS] COMMAND [ARGS]...
Immutable project versions.
lakana project-version show
Usage: lakana project-version show [OPTIONS] {project_version_id}
Show project version ID: its assets, the package indexes its lock uses and the DAG as a tree.
| Name | Type | Default | Description |
|---|---|---|---|
PROJECT_VERSION_ID |
text | required | |
--env |
text | none | Environment (default: the profile's). |
lakana runs
Usage: lakana runs [OPTIONS] COMMAND [ARGS]...
Runs of deployed project versions.
lakana runs list
Usage: lakana runs list [OPTIONS]
List runs, newest first.
A long list prints a "More results" line with the command that shows the next page.
| Name | Type | Default | Description |
|---|---|---|---|
--env |
text | none | Environment (default: the profile's). |
--repo |
text | none | Only this repository. |
--status |
text, repeatable | none | Only runs in this status: queued, running, succeeded, failed or cancelled. Repeat the option or separate the values with commas. |
--trigger |
text, repeatable | none | Only runs started this way: schedule, api or manual. Repeat the option or separate the values with commas. |
--job |
text | none | Only runs of this job. |
--since |
text | none | Only runs created at or after this date or time, such as 2026-10-18 or 2026-10-18T09:30:00Z. Without a time zone it is read in yours. |
--limit |
whole number, 1 to 200 | none | Most runs to list (default 100). |
--cursor |
text | none | Continue after the page that printed this cursor. |
lakana runs show
Usage: lakana runs show [OPTIONS] {run_id}
Show run RUN_ID, its tasks and its notifications; waiting_for says why a task waits.
| Name | Type | Default | Description |
|---|---|---|---|
RUN_ID |
text | required | |
--env |
text | none | Environment (default: the profile's). |
lakana runs logs
Usage: lakana runs logs [OPTIONS] {run_id}
Print a run's task logs.
| Name | Type | Default | Description |
|---|---|---|---|
RUN_ID |
text | required | |
--env |
text | none | Environment (default: the profile's). |
--task |
text | none | Only this task's log. |
--follow |
flag | off | Keep printing new text until the run finishes; each byte is fetched once. |
lakana runs cancel
Usage: lakana runs cancel [OPTIONS] {run_id}
Request cancellation of RUN_ID.
| Name | Type | Default | Description |
|---|---|---|---|
RUN_ID |
text | required | |
--env |
text | none | Environment (default: the profile's). |
lakana runs resume
Usage: lakana runs resume [OPTIONS] {run_id}
Resume RUN_ID's failed, upstream_failed and cancelled tasks in a new run.
| Name | Type | Default | Description |
|---|---|---|---|
RUN_ID |
text | required | |
--env |
text | none | Environment (default: the profile's). |
lakana scheduler
Usage: lakana scheduler [OPTIONS] COMMAND [ARGS]...
The scheduler role.
lakana scheduler status
Usage: lakana scheduler status [OPTIONS]
Show the scheduler holder and queue lengths (admin).
lakana worker
Usage: lakana worker [OPTIONS] COMMAND [ARGS]...
The workers of this instance.
lakana worker list
Usage: lakana worker list [OPTIONS]
List the registered workers and what each is doing (admin).
A worker is alive while its heartbeat is recent and lost after that; a lost worker's row stays for an hour, and the query or deploy it held is ended by the scheduler. The column takes is the work the worker takes: all, interactive (ad-hoc queries) or pipeline (deploys, pipeline tasks and table maintenance).
lakana job
Usage: lakana job [OPTIONS] COMMAND [ARGS]...
Jobs: named selections of a project, started by hand, by the API or by a schedule.
lakana job list
Usage: lakana job list [OPTIONS]
List the jobs of the deployed projects: state, triggers, next run and last run.
| Name | Type | Default | Description |
|---|---|---|---|
--env |
text | none | Environment (default: the profile's). |
--repo |
text | none | Repository name (default: lakana.yaml's repo:). |
lakana job show
Usage: lakana job show [OPTIONS] {name}
Show job NAME: its state, its triggers with the next run, and its last run.
| Name | Type | Default | Description |
|---|---|---|---|
NAME |
text | required | The job's name, as in lakana.yaml. |
--env |
text | none | Environment (default: the profile's). |
--repo |
text | none | Repository name (default: lakana.yaml's repo:). |
lakana job run
Usage: lakana job run [OPTIONS] {name}
Start job NAME now; if its project is busy, the start waits and begins when it is free.
Exit 0 when the run succeeds, 1 when it fails, is cancelled or the timeout elapses. When the start waits, the command prints what it waits for and exits 0: that means accepted, not run; a script that needs the result follows the run it names with lakana runs show.
| Name | Type | Default | Description |
|---|---|---|---|
NAME |
text | required | The job's name, as in lakana.yaml. |
--env |
text | none | Environment (default: the profile's). |
--repo |
text | none | Repository name (default: lakana.yaml's repo:). |
--no-wait |
flag | off | Print the run id and exit. |
--timeout |
number | none | Seconds to wait. |
lakana job pause
Usage: lakana job pause [OPTIONS] {name}
Pause job NAME's schedule; a waiting start still happens and a start by hand still works.
| Name | Type | Default | Description |
|---|---|---|---|
NAME |
text | required | The job's name, as in lakana.yaml. |
--env |
text | none | Environment (default: the profile's). |
--repo |
text | none | Repository name (default: lakana.yaml's repo:). |
lakana job resume
Usage: lakana job resume [OPTIONS] {name}
Resume job NAME's schedule from now; the times missed while paused do not fire.
| Name | Type | Default | Description |
|---|---|---|---|
NAME |
text | required | The job's name, as in lakana.yaml. |
--env |
text | none | Environment (default: the profile's). |
--repo |
text | none | Repository name (default: lakana.yaml's repo:). |
lakana job notify-test
Usage: lakana job notify-test [OPTIONS] {name}
Send a test message to job NAME's webhook and wait up to 30 seconds for the result.
The message carries clearly fake run data. Exit 0 when it was delivered; 1 when the webhook refused it or was not reached (the reason is printed), and also 1 when it is still being tried after the wait (look later with lakana job notification). Needs the deploy right.
| Name | Type | Default | Description |
|---|---|---|---|
NAME |
text | required | The job's name, as in lakana.yaml. |
--env |
text | none | Environment (default: the profile's). |
--repo |
text | none | Repository name (default: lakana.yaml's repo:). |
lakana job notification
Usage: lakana job notification [OPTIONS] {delivery_id}
Show one notification delivery, such as the one job notify-test queued.
| Name | Type | Default | Description |
|---|---|---|---|
DELIVERY_ID |
text | required | The delivery id job notify-test printed. |
--env |
text | none | Environment (default: the profile's). |
lakana check
Usage: lakana check [OPTIONS] COMMAND [ARGS]...
Data quality checks: the results of the checks a run made.
lakana check list
Usage: lakana check list [OPTIONS]
List check results, newest first. With --run, the results of one run.
The run column shows 8 characters of the run id; --output json has the whole id.
| Name | Type | Default | Description |
|---|---|---|---|
--env |
text | none | Environment (default: the profile's). |
--run |
text | none | Only the results of this run. |
--table |
text | none | Only this table's (namespace.table). |
--limit |
whole number, 1 to 1000 | 50 |
Most results to list. |
lakana check rows
Usage: lakana check rows [OPTIONS] {RUN} {CHECK}
Show the rows a check found in a run.
These are the rows this check found in that run, as they were then, also after the table was set back.
It runs as a query of yours, under your own rights, row filters and column masks: you see the rows the check found that you may read, and every other table the check's SQL reads is read as it is now. It needs the right to read the run and to submit queries, and the right to read every table the check's SQL reads: without it, the command refuses and shows neither rows nor SQL.
The rows stay readable for seven days after a failed blocking check; then lakana table maintain removes the snapshot, and the number of rows remains in lakana check list. A check that read no snapshot (a view, or SQL that does not read its table) has no rows to show; the message says where to run its SQL yourself.
Prints a table like lakana sql; --out writes every row to a file instead.
| Name | Type | Default | Description |
|---|---|---|---|
RUN |
text | required | The whole run id, as lakana runs list shows it. |
CHECK |
text | required | The check, as lakana check list shows it: table/check. |
--env |
text | none | Environment (default: the profile's). |
--out |
path | none | Write the full result to this file. |
--format |
text | none | parquet, csv or arrow (default: from the extension). |
--max-rows |
whole number, 0 or more | 50 |
Most rows to display. |
--timeout |
number | none | Seconds to wait before giving up. |
lakana audit
Usage: lakana audit [OPTIONS] COMMAND [ARGS]...
Read the audit log.
lakana audit list
Usage: lakana audit list [OPTIONS]
List audit events, newest first.
--output json shows each event's detail. Query text and column values in someone else's events are hidden unless you hold READ_QUERY_TEXT: a query's SQL text shows as its SHA-256 and length, an incremental write's watermark as {"hidden": true}. Your own events show in full. A page that shows other people's events, or --principal-id of someone else, is itself recorded in the audit log (ACTIVITY_VIEWED).
| Name | Type | Default | Description |
|---|---|---|---|
--event-type |
text | none | e.g. GRANT_CREATED |
--env |
text | none | Only this environment. |
--principal-id |
text | none | Only this principal's events. |
--since |
text | none | ISO 8601; UTC if no offset. |
--until |
text | none | ISO 8601; UTC if no offset. |
--limit |
whole number, 1 to 500 | 100 |
Events per page. |
--cursor |
text | none | Continue from a previous page. |
--all |
flag | off | Follow every page. |
lakana server
Usage: lakana server [OPTIONS] COMMAND [ARGS]...
Run Lakana on this machine (local only).
lakana server start
Usage: lakana server start [OPTIONS]
Start Lakana on this machine: migrate, then the server and worker.
Stop it with Ctrl-C, or from another terminal with 'lakana server stop'.
| Name | Type | Default | Description |
|---|---|---|---|
--local |
flag | off | Run this machine's own instance. |
--data-dir |
path | none | Data directory (default: XDG). |
--port |
whole number | 8765 |
Port to bind on 127.0.0.1 (default 8765). |
--log-requests |
flag | off | Print a line for every request the server answers (default: none). |
lakana server status
Usage: lakana server status [OPTIONS]
Report whether a local-mode instance is running.
Running means the data directory's lock is held (even before any pidfile exists, or while /healthz is slow), or the recorded server PID is alive and answers /healthz.
| Name | Type | Default | Description |
|---|---|---|---|
--data-dir |
path | none | Data directory (default: XDG). |
lakana server stop
Usage: lakana server stop [OPTIONS]
Stop this machine's local instance, as Ctrl-C in its terminal does.
Asks the instance in the data directory to shut down and waits up to 30 seconds for it to leave. Nothing running is not an error. It stops only the instance on this machine: a Compose stack stops with 'docker compose down' in its bundle directory.
| Name | Type | Default | Description |
|---|---|---|---|
--data-dir |
path | none | Data directory (default: XDG). |
lakana server reset
Usage: lakana server reset [OPTIONS]
Delete this machine's local instance's data, so the next start is a first run.
Deletes the database, the tables' files and the secrets key of the instance in the data directory, and nothing else: your project files are never touched. It refuses while the instance runs, and in any directory that is not a local instance's data directory.
| Name | Type | Default | Description |
|---|---|---|---|
--local |
flag | off | Reset this machine's own instance. |
--data-dir |
path | none | Data directory (default: XDG). |
--yes |
flag | off | Don't ask for confirmation. |
lakana bundle
Usage: lakana bundle [OPTIONS] COMMAND [ARGS]...
Generate a team deployment bundle.
lakana bundle init
Usage: lakana bundle init [OPTIONS] [directory]
Generate compose.yaml and .env for a team deployment, and save a profile.
| Name | Type | Default | Description |
|---|---|---|---|
DIRECTORY |
path | lakana-deploy |
Target directory for the bundle. |
--public-url |
text | none | The URL clients and the saved profile use. |
--bind |
text | 127.0.0.1 |
Host address the server port is published on. |
--port |
whole number | 8000 |
Host port for the server. |
--workers |
whole number | 2 |
Worker replicas. |
--image |
text | none | Override the Lakana image reference. |