kloudlite
Lists the commands and options of kloudlite, the command-line program for your computer.
Last updated
On this page
- Commands
- kloudlite
- kloudlite login
- kloudlite logout
- kloudlite builder
- kloudlite builder status
- kloudlite mcp
- kloudlite claude
- kloudlite env
- kloudlite env status
- kloudlite env daemon
- kloudlite env daemon install
- kloudlite env daemon uninstall
- kloudlite quota
- kloudlite request
- kloudlite environments
- kloudlite environments create
- kloudlite environments list
- kloudlite environments get
- kloudlite environments set-services
- kloudlite environments start
- kloudlite environments stop
- kloudlite environments restart
- kloudlite environments set-ttl
- kloudlite environments delete
- kloudlite environments clone
- kloudlite environments restore
- kloudlite volumes
- kloudlite volumes list
- kloudlite volumes get
- kloudlite volumes versions
- kloudlite volumes delete
- kloudlite volumes delete-version
- kloudlite snapshots
- kloudlite snapshots push
- kloudlite snapshots list
- kloudlite snapshots refs
- kloudlite snapshots delete
- kloudlite connectors
- kloudlite connectors list
- kloudlite connectors remove
- kloudlite secrets
- kloudlite secrets set
- kloudlite secrets list
- kloudlite secrets delete
- kloudlite sandboxes
- kloudlite sandboxes create
- kloudlite sandboxes get
- kloudlite sandboxes list
- kloudlite sandboxes run
- kloudlite sandboxes logs
- kloudlite sandboxes attach
- kloudlite sandboxes terminate
- kloudlite sandboxes wait
- kloudlite sandboxes wait-running
- kloudlite sandboxes delete
- kloudlite pipelines
- kloudlite pipelines create
- kloudlite pipelines update
- kloudlite pipelines list
- kloudlite pipelines get
- kloudlite pipelines versions
- kloudlite pipelines delete
- kloudlite pipelines run
- kloudlite pipelines rotate-webhook
- kloudlite pipelines runs
- kloudlite pipelines get-run
- kloudlite pipelines cancel-run
- kloudlite pipelines logs
- kloudlite pipelines wait-run
- kloudlite ide
- kloudlite ide list
- kloudlite ide call
- kloudlite ide read
- kloudlite ide write
- kloudlite ide edit
- kloudlite ide patch
- kloudlite ide glob
- kloudlite ide grep
- kloudlite ide exec
- kloudlite ide process-list
- kloudlite ide process-output
- kloudlite ide process-write
- kloudlite ide process-kill
- kloudlite ide watch
- kloudlite ide watch-poll
- kloudlite ide watch-stop
- kloudlite ide container-build
- kloudlite ide container-push
- kloudlite workspaces
- kloudlite workspaces create
- kloudlite workspaces list
- kloudlite workspaces get
- kloudlite workspaces delete
- kloudlite workspaces start
- kloudlite workspaces stop
- kloudlite workspaces restart
- kloudlite workspaces clone
- kloudlite workspaces restore
- kloudlite workspaces set-packages
- kloudlite workspaces set-ttl
- kloudlite workspaces set-env
- kloudlite workspaces update-packages
- kloudlite workspaces tools
- kloudlite workspaces ssh
- kloudlite workspaces proxy
- kloudlite workspaces ssh-config
- kloudlite workspaces ide
- kloudlite workspaces follow
- kloudlite sessions
- kloudlite sessions create
- kloudlite sessions set-ttl
- kloudlite sessions list
- kloudlite sessions get
- kloudlite sessions delete
- kloudlite sessions connect-env
- kloudlite sessions disconnect-env
- kloudlite sessions stop
- kloudlite sessions create-workspace
- kloudlite sessions delete-workspace
- kloudlite sessions create-sandbox
- kloudlite sessions intercept
- kloudlite sessions release
- kloudlite sessions use
- kloudlite sessions current
- Which session
- Environment tunnel
- SSH config
- Files
Commands
The CLI on your laptop. It opens your session, connects you to workspaces over ssh, and reaches a session's environment by service name. Every SDK method is also a command, kloudlite <resource> <verb>, for example kloudlite workspaces list. A command prints a table, or with --json the answer unchanged; on an error it prints the server's message and exits with a non-zero code. KLOUDLITE_URL and KLOUDLITE_TOKEN replace the login. It does not run inside a workspace; there the tool is kl.
Install: curl -fsSL https://dev.kloudlite.io/install.sh | sh puts kloudlite (and kl-tui, where it is built for your platform) in ~/.local/bin. The binaries are the kloudlite-v* releases on GitHub for x86_64-apple-darwin, aarch64-apple-darwin, x86_64-unknown-linux-gnu and aarch64-unknown-linux-gnu. You can also download them there by hand, with their sha256sums file. The quick start has the details. Log in once with kloudlite login; the token is stored under ~/.config/kloudlite. env daemon is macOS only.
The reference below is generated from the command definitions; kloudlite --help prints the same.
kloudlite
kloudlite on your laptop: kloudlite opens your session, kloudlite TEAM the team's
| Argument | Help |
|---|---|
<team> | Team whose session to open; your own session when absent |
--team | The team, as a flag: kloudlite -t TEAM -s SESSION claude reads like claude -t -s |
--start | Start the session first (and its stopped workspaces) |
--session | Session (name or id) to open; asked on a terminal when unclear |
--json | Print the answer verbatim as JSON (resource commands), for scripts and agents |
kloudlite login
Log in through the browser and store the CLI token
| Argument | Help |
|---|---|
--api | API address to log in to |
kloudlite logout
Revoke this machine's CLI token and forget it
kloudlite builder
Show your image builder: its state and why a build is waiting
kloudlite builder status
The builder's state, readiness, and why it is not ready yet
| Argument | Help |
|---|---|
--team | Show the team's builder; your own when absent |
kloudlite mcp
Serve the session's tools (all workspaces, environments, pod tools) as a stdio MCP server: claude mcp add kl -- kloudlite mcp
| Argument | Help |
|---|---|
<team> | Team whose session to serve; your own when absent |
--session | Session (name or id) to serve |
kloudlite claude
Open Claude Code on a session, with the kloudlite plugin, the kl tools and kl mode on; the connection is tested first: kloudlite claude -t TEAM -s SESSION [-- CLAUDE ARGS]
| Argument | Help |
|---|---|
--team | Team whose session to open; your own when absent |
--session | Session (name or id) to open |
<args> | Passed to claude unchanged |
kloudlite env
Reach the session's environment's services by name from this laptop
kloudlite env status
Show what the daemon is doing: environment, tunnel state, names in the hosts block
kloudlite env daemon
Install or remove the background daemon (macOS, needs sudo)
kloudlite env daemon install
Install the root LaunchDaemon: sudo kloudlite env daemon install
kloudlite env daemon uninstall
Stop and remove the LaunchDaemon and the hosts block
kloudlite quota
The ceiling and what is against it
| Argument | Help |
|---|---|
--owner | A handle or team; your own when absent |
kloudlite request
Send any request to the api: kloudlite request GET /v1/quota
| Argument | Help |
|---|---|
<http_method> | GET, POST, PUT, PATCH or DELETE |
<api_path> | Path, e.g. /v1/quota |
--body | Request body as JSON (or @file) |
--query | KEY=VALUE query parameter; repeat for more |
kloudlite environments
Multi-service environments
kloudlite environments create
Create an environment
| Argument | Help |
|---|---|
<environment> | Name, or team/name for a team's |
--services | Services as JSON (or @file): [{"name","image","ports","env","command","mounts"}] |
--quota-gb | Disk in GB |
--snapshot | Grow it from a snapshot |
--ttl-secs | Seconds unused before it is deleted (600..=2592000) |
kloudlite environments list
List your environments and your teams'
| Argument | Help |
|---|---|
--owner | Only this handle or team's |
kloudlite environments get
Show an environment
| Argument | Help |
|---|---|
<environment> | Environment: name, team/name or id |
kloudlite environments set-services
Replace the whole service list
| Argument | Help |
|---|---|
<environment> | Environment: name, team/name or id |
--services | Services as JSON (or @file) |
kloudlite environments start
Start an environment
| Argument | Help |
|---|---|
<environment> | Environment: name, team/name or id |
kloudlite environments stop
Stop an environment
| Argument | Help |
|---|---|
<environment> | Environment: name, team/name or id |
kloudlite environments restart
Restart one running service so it gets its current env vars
| Argument | Help |
|---|---|
<environment> | Environment: name, team/name or id |
--service | The service to restart |
kloudlite environments set-ttl
Set or clear the unused-time limit
| Argument | Help |
|---|---|
<environment> | Environment: name, team/name or id |
--ttl-secs | Seconds unused before it is deleted (600..=2592000); absent clears it |
kloudlite environments delete
Delete an environment
| Argument | Help |
|---|---|
<environment> | Environment: name, team/name or id |
kloudlite environments clone
Make a new environment from this one
| Argument | Help |
|---|---|
<environment> | Environment: name, team/name or id |
--to | The new environment: name or team/name |
--snapshot | Clone one of its snapshots instead of the live disk |
--services | Services as JSON (or @file): [{"name","image","ports","env","command","mounts"}] |
--quota-gb | Disk in GB |
kloudlite environments restore
Put this environment back to one of its snapshots
| Argument | Help |
|---|---|
<environment> | Environment: name, team/name or id |
--snapshot | Snapshot id |
--discard | A service whose data may be lost; repeat for more |
kloudlite volumes
Volumes: list, get, versions, delete, delete-version
kloudlite volumes list
List volumes
| Argument | Help |
|---|---|
--kind | workspace or environment |
--owner | Only this handle or team's |
kloudlite volumes get
A volume by name
| Argument | Help |
|---|---|
--owner | A handle or team; your own when absent |
<volume> | Volume: name or owner/name |
kloudlite volumes versions
The versions of a volume
| Argument | Help |
|---|---|
--owner | A handle or team; your own when absent |
<volume> | Volume: name or owner/name |
kloudlite volumes delete
Delete a detached volume with all its snapshots
| Argument | Help |
|---|---|
--owner | A handle or team; your own when absent |
<volume> | Volume: name or owner/name |
kloudlite volumes delete-version
Delete one version of a volume
| Argument | Help |
|---|---|
--owner | A handle or team; your own when absent |
<volume> | Volume: name or owner/name |
<n> | Version number |
kloudlite snapshots
Snapshots: push, list and delete
kloudlite snapshots push
Push a snapshot of a workspace's working copy (--workspace) or of every service's data in an environment (--environment)
| Argument | Help |
|---|---|
--workspace | Workspace: name, team/name or id |
--environment | Environment: name, team/name or id |
--message | A message for the snapshot |
--volume | Volume name; required on a volume's first push |
kloudlite snapshots list
The snapshots of a volume, newest first
| Argument | Help |
|---|---|
<volume> | Volume key |
kloudlite snapshots refs
A volume's refs
| Argument | Help |
|---|---|
<volume> | Volume key |
kloudlite snapshots delete
Delete a snapshot
| Argument | Help |
|---|---|
<volume> | Volume key |
<snapshot> | Snapshot id |
kloudlite connectors
Linked provider accounts: list and remove (connect in the web console)
kloudlite connectors list
The accounts linked to you or, with --owner, to a team: name, provider, account and state
| Argument | Help |
|---|---|
--owner | The team; your own handle when absent |
kloudlite connectors remove
Disconnect a connector: pipelines and pushes that use it stop working. Connecting needs a browser, so it is in the web console
| Argument | Help |
|---|---|
<name> | Connector name, as connectors list shows it |
kloudlite secrets
An owner's secrets: set (value from stdin only), list names, delete
kloudlite secrets set
Store NAME; the value is read from stdin, never an argument: printf %s "$V" | kloudlite secrets set NAME. With a team --owner it is your own secret in that team (only you see it; it wins over the team's of the same name in your workspaces); add --scope team for the team's shared secret (admins)
| Argument | Help |
|---|---|
<name> | Secret name |
--owner | The team; your own handle when absent (your personal secret, no team) |
--scope | With a team --owner: team is the team's shared secret (admins); absent it is your own secret in that team |
kloudlite secrets list
The names, who set them and when (values are never shown); with a team --owner, your own in that team; --scope team lists the team's shared ones
| Argument | Help |
|---|---|
--owner | The team; your own handle when absent (your personal secrets, no team) |
--scope | With a team --owner: team is the team's shared secret (admins); absent it is your own secret in that team |
kloudlite secrets delete
Remove NAME; refused while a workspace references it (an environment too, unless it is your own secret in a team, which is the default with a team --owner, and succeeds while the team holds a secret of that name; --scope team removes the team's shared one)
| Argument | Help |
|---|---|
<name> | Secret name |
--owner | The team; your own handle when absent (your personal secret, no team) |
--scope | With a team --owner: team is the team's shared secret (admins); absent it is your own secret in that team |
kloudlite sandboxes
Throwaway machines that run code
kloudlite sandboxes create
Ask for a sandbox that runs one process; answers at once, usually still starting: kloudlite sandboxes create -- python3 job.py
| Argument | Help |
|---|---|
--image | Image to start from |
--package | A nixpkgs attribute; repeat for more |
--from-workspace | Start from one of your workspaces |
--from-snapshot | Snapshot: name, name@N or a snapshot id |
--team | The team that owns it |
--network | internet or none |
--cpu | Cores |
--memory-gb | Memory in GB |
--disk-gb | Disk in GB |
--timeout-s | Seconds it lives at most |
--env | NAME=VALUE; repeat for more |
--tty | Give the process a terminal |
--stdin | Keep its stdin open so attach can type to it |
<cmd> | The process the sandbox runs and its arguments, after -- |
kloudlite sandboxes get
Show a sandbox
| Argument | Help |
|---|---|
<sandbox> | Sandbox id |
kloudlite sandboxes list
List your sandboxes, newest first, 50 at a time; --all follows every page
| Argument | Help |
|---|---|
--team | Only this team's |
--limit | At most this many per page (1 to 200) |
--cursor | Continue after the cursor a previous page printed |
--all | Follow the cursor until every sandbox is listed |
kloudlite sandboxes run
Run one process in a fresh sandbox, print its output and exit with its code; with --stdin attach to it instead: kloudlite sandboxes run -it -- sh
| Argument | Help |
|---|---|
--image | Image to start from |
--package | A nixpkgs attribute; repeat for more |
--from-workspace | Start from one of your workspaces |
--from-snapshot | Snapshot: name, name@N or a snapshot id |
--team | The team that owns it |
--network | internet or none |
--cpu | Cores |
--memory-gb | Memory in GB |
--disk-gb | Disk in GB |
--timeout-s | Seconds it lives at most |
--env | NAME=VALUE; repeat for more |
--tty | Give the process a terminal |
--stdin | Keep its stdin open so attach can type to it |
<cmd> | The process the sandbox runs and its arguments, after -- |
kloudlite sandboxes logs
Print the process's output so far, or until it ends with --follow
| Argument | Help |
|---|---|
<sandbox> | Sandbox id |
--follow | Keep printing until the process ends |
kloudlite sandboxes attach
Attach this terminal to the process of a sandbox made with --stdin; leaving does not stop it
| Argument | Help |
|---|---|
<sandbox> | Sandbox id |
kloudlite sandboxes terminate
Stop a sandbox for good; the record stays until deleted
| Argument | Help |
|---|---|
<sandbox> | Sandbox id |
kloudlite sandboxes wait
Wait until a sandbox has terminated, print the reason and exit with the process's code
| Argument | Help |
|---|---|
<sandbox> | Sandbox id |
--timeout-s | Give up after this many seconds |
kloudlite sandboxes wait-running
Wait until a sandbox is running; fails with the reason if it terminates instead
| Argument | Help |
|---|---|
<sandbox> | Sandbox id |
--timeout-s | Give up after this many seconds |
kloudlite sandboxes delete
Delete a terminated sandbox's record
| Argument | Help |
|---|---|
<sandbox> | Sandbox id |
kloudlite pipelines
CI pipelines and their runs
kloudlite pipelines create
Save a new pipeline from a JSON definition; a webhook URL is shown once
| Argument | Help |
|---|---|
--file | The definition as a JSON file; - reads stdin |
--owner | A handle or team; your own when absent |
kloudlite pipelines update
Save a definition as the pipeline's next version; the same definition saves nothing
| Argument | Help |
|---|---|
<name> | Pipeline: name or owner/name |
--file | The definition as a JSON file; - reads stdin |
--owner | A handle or team; your own when absent |
kloudlite pipelines list
List an owner's pipelines
| Argument | Help |
|---|---|
--owner | A handle or team; your own when absent |
kloudlite pipelines get
Show a pipeline's definition, the newest version unless --version
| Argument | Help |
|---|---|
<name> | Pipeline: name or owner/name |
--owner | A handle or team; your own when absent |
--version | A version number; the newest when absent |
kloudlite pipelines versions
List a pipeline's saved versions
| Argument | Help |
|---|---|
<name> | Pipeline: name or owner/name |
--owner | A handle or team; your own when absent |
kloudlite pipelines delete
Delete a pipeline with its versions; its old runs stay
| Argument | Help |
|---|---|
<name> | Pipeline: name or owner/name |
--owner | A handle or team; your own when absent |
kloudlite pipelines run
Start a pipeline by hand; answers the queued run
| Argument | Help |
|---|---|
<name> | Pipeline: name or owner/name |
--owner | A handle or team; your own when absent |
--version | A version number; the newest when absent |
--input | KEY=VALUE for the definition's inputs; repeat for more |
--environment | Run jobs that name none in this environment |
--clone | Run them in a per-run copy of this environment |
kloudlite pipelines rotate-webhook
Mint a new webhook URL; the old one stops at once and the new one is shown once
| Argument | Help |
|---|---|
<name> | Pipeline: name or owner/name |
--owner | A handle or team; your own when absent |
kloudlite pipelines runs
A pipeline's runs, newest first
| Argument | Help |
|---|---|
<owner> | The pipeline's owner: a handle or team |
<pipeline> | Pipeline name |
--limit | At most this many |
kloudlite pipelines get-run
Show one run
| Argument | Help |
|---|---|
<owner> | The pipeline's owner: a handle or team |
<pipeline> | Pipeline name |
<run> | Run id |
kloudlite pipelines cancel-run
Ask a run to stop
| Argument | Help |
|---|---|
<owner> | The pipeline's owner: a handle or team |
<pipeline> | Pipeline name |
<run> | Run id |
kloudlite pipelines logs
Print a job's log; --follow keeps going until the job ends
| Argument | Help |
|---|---|
<owner> | The pipeline's owner: a handle or team |
<pipeline> | Pipeline name |
<run> | Run id |
<job> | The job's index or key |
--follow | Poll for new output until the job ends |
--poll-s | Seconds between polls |
kloudlite pipelines wait-run
Wait for a run to end, print its state, exit non-zero unless it succeeded
| Argument | Help |
|---|---|
<owner> | The pipeline's owner: a handle or team |
<pipeline> | Pipeline name |
<run> | Run id |
--timeout-s | Give up after this many seconds |
--poll-s | Seconds between polls |
kloudlite ide
A workspace's tool server: files, commands, processes, watches, builds
kloudlite ide list
List every tool with its schema
| Argument | Help |
|---|---|
<workspace> | Workspace: name, team/name or id |
--url | Tool server address; default is the one the api names (use http://127.0.0.1:7788 under kloudlite workspaces ide) |
kloudlite ide call
Run any tool by name with its arguments as JSON
| Argument | Help |
|---|---|
<workspace> | Workspace: name, team/name or id |
--url | Tool server address; default is the one the api names (use http://127.0.0.1:7788 under kloudlite workspaces ide) |
<tool> | Tool name |
--args | The tool's arguments as JSON (or @file) |
kloudlite ide read
Read files
| Argument | Help |
|---|---|
<workspace> | Workspace: name, team/name or id |
--url | Tool server address; default is the one the api names (use http://127.0.0.1:7788 under kloudlite workspaces ide) |
--path | One file |
--paths | A file; repeat for more |
--offset | First line |
--limit | Number of lines |
kloudlite ide write
Write a file
| Argument | Help |
|---|---|
<workspace> | Workspace: name, team/name or id |
--url | Tool server address; default is the one the api names (use http://127.0.0.1:7788 under kloudlite workspaces ide) |
--path | File path |
--content | The content |
kloudlite ide edit
Edit one file (--path, --edits) or several (--files); atomic
| Argument | Help |
|---|---|
<workspace> | Workspace: name, team/name or id |
--url | Tool server address; default is the one the api names (use http://127.0.0.1:7788 under kloudlite workspaces ide) |
--path | One file |
--edits | Edits as JSON: [{"old","new","replace_all"}] |
--files | Several files as JSON: [{"path","edits"}] |
kloudlite ide patch
Apply a unified diff
| Argument | Help |
|---|---|
<workspace> | Workspace: name, team/name or id |
--url | Tool server address; default is the one the api names (use http://127.0.0.1:7788 under kloudlite workspaces ide) |
--diff | The diff |
--cwd | Working directory |
kloudlite ide glob
Find files by pattern
| Argument | Help |
|---|---|
<workspace> | Workspace: name, team/name or id |
--url | Tool server address; default is the one the api names (use http://127.0.0.1:7788 under kloudlite workspaces ide) |
--pattern | Glob pattern |
--cwd | Working directory |
kloudlite ide grep
Search file contents
| Argument | Help |
|---|---|
<workspace> | Workspace: name, team/name or id |
--url | Tool server address; default is the one the api names (use http://127.0.0.1:7788 under kloudlite workspaces ide) |
--pattern | Regular expression |
--cwd | Working directory |
--glob | Only files matching this |
--mode | Output mode |
--context | Lines of context |
--ignore-case | Ignore case |
--max | At most this many matches |
kloudlite ide exec
Run a shell command
| Argument | Help |
|---|---|
<workspace> | Workspace: name, team/name or id |
--url | Tool server address; default is the one the api names (use http://127.0.0.1:7788 under kloudlite workspaces ide) |
--cmd | The command line |
--cwd | Working directory |
--env | NAME=VALUE; repeat for more |
--timeout-ms | Time limit in milliseconds |
--head | Keep the first N lines of output |
--tail | Keep the last N lines of output |
--quiet | Print only the exit code |
--detach | Run as a process and answer its id |
kloudlite ide process-list
List processes
| Argument | Help |
|---|---|
<workspace> | Workspace: name, team/name or id |
--url | Tool server address; default is the one the api names (use http://127.0.0.1:7788 under kloudlite workspaces ide) |
kloudlite ide process-output
A process's output
| Argument | Help |
|---|---|
<workspace> | Workspace: name, team/name or id |
--url | Tool server address; default is the one the api names (use http://127.0.0.1:7788 under kloudlite workspaces ide) |
<process> | Process id |
--since | Stdout offset |
--since-err | Stderr offset |
kloudlite ide process-write
Write to a process's stdin
| Argument | Help |
|---|---|
<workspace> | Workspace: name, team/name or id |
--url | Tool server address; default is the one the api names (use http://127.0.0.1:7788 under kloudlite workspaces ide) |
<process> | Process id |
--data | The text |
kloudlite ide process-kill
Signal a process
| Argument | Help |
|---|---|
<workspace> | Workspace: name, team/name or id |
--url | Tool server address; default is the one the api names (use http://127.0.0.1:7788 under kloudlite workspaces ide) |
<process> | Process id |
--signal | A signal name |
kloudlite ide watch
Watch paths for changes
| Argument | Help |
|---|---|
<workspace> | Workspace: name, team/name or id |
--url | Tool server address; default is the one the api names (use http://127.0.0.1:7788 under kloudlite workspaces ide) |
--path | A path; repeat for more |
--cmd | Run this on a change |
--pattern | Only matching paths |
--once | Stop after the first change |
kloudlite ide watch-poll
Events from a watch
| Argument | Help |
|---|---|
<workspace> | Workspace: name, team/name or id |
--url | Tool server address; default is the one the api names (use http://127.0.0.1:7788 under kloudlite workspaces ide) |
<watch> | Watch id |
--since | Offset |
kloudlite ide watch-stop
Stop a watch
| Argument | Help |
|---|---|
<workspace> | Workspace: name, team/name or id |
--url | Tool server address; default is the one the api names (use http://127.0.0.1:7788 under kloudlite workspaces ide) |
<watch> | Watch id |
kloudlite ide container-build
Build an image on the owner's builder
| Argument | Help |
|---|---|
<workspace> | Workspace: name, team/name or id |
--url | Tool server address; default is the one the api names (use http://127.0.0.1:7788 under kloudlite workspaces ide) |
--tag | An image tag; repeat for more |
--context | Build context |
--file | Dockerfile |
--build-arg | A build arg; repeat for more |
--platform | Platform |
--no-cache | Skip the cache |
--timeout-ms | Time limit in milliseconds |
--head | Keep the first N lines of output |
--tail | Keep the last N lines of output |
kloudlite ide container-push
Copy an image the registry holds to new tags
| Argument | Help |
|---|---|
<workspace> | Workspace: name, team/name or id |
--url | Tool server address; default is the one the api names (use http://127.0.0.1:7788 under kloudlite workspaces ide) |
--src | Source image |
--dst | A destination tag; repeat for more |
kloudlite workspaces
Dev workspaces: create, start, stop, clone, restore, and reach one over ssh
kloudlite workspaces create
Create a workspace
| Argument | Help |
|---|---|
<workspace> | Name, or team/name for a team's |
--quota-gb | Disk in GB |
--image | Custom image |
--package | A nixpkgs attribute, optionally attr@version; repeat for more |
--ttl-secs | Seconds unused before it is deleted (600..=2592000) |
--env | NAME=VALUE or NAME='${{ secrets.X }}'; repeat for more |
kloudlite workspaces list
List your workspaces
| Argument | Help |
|---|---|
--team | Only this team's |
kloudlite workspaces get
Show a workspace
| Argument | Help |
|---|---|
<workspace> | Workspace: name, team/name or id |
kloudlite workspaces delete
Delete a workspace; its volume survives while a snapshot references it
| Argument | Help |
|---|---|
<workspace> | Workspace: name, team/name or id |
kloudlite workspaces start
Start a workspace
| Argument | Help |
|---|---|
<workspace> | Workspace: name, team/name or id |
kloudlite workspaces stop
Stop a workspace
| Argument | Help |
|---|---|
<workspace> | Workspace: name, team/name or id |
kloudlite workspaces restart
Restart a running workspace so it gets its current env vars
| Argument | Help |
|---|---|
<workspace> | Workspace: name, team/name or id |
kloudlite workspaces clone
Make a new workspace from this one's state
| Argument | Help |
|---|---|
<workspace> | Workspace: name, team/name or id |
--to | The new workspace's name |
--task | A task for the new workspace |
kloudlite workspaces restore
Make a new workspace from a snapshot
| Argument | Help |
|---|---|
--snapshot | Snapshot: name, name@N or a snapshot id |
--team | Team whose volume names to resolve |
--to | The new workspace's name |
--image | Override the snapshot's image |
--package | Override the snapshot's packages; repeat for more |
--quota-gb | Override the disk size in GB |
kloudlite workspaces set-packages
Replace the package list
| Argument | Help |
|---|---|
<workspace> | Workspace: name, team/name or id |
--package | A nixpkgs attribute, optionally attr@version; repeat for more |
kloudlite workspaces set-ttl
Set or clear the unused-time limit
| Argument | Help |
|---|---|
<workspace> | Workspace: name, team/name or id |
--ttl-secs | Seconds unused before it is deleted (600..=2592000); absent clears it |
kloudlite workspaces set-env
Replace the whole env; it takes effect on the next start
| Argument | Help |
|---|---|
<workspace> | Workspace: name, team/name or id |
--env | NAME=VALUE or NAME='${{ secrets.X }}'; repeat for more |
kloudlite workspaces update-packages
Re-resolve every pinned package
| Argument | Help |
|---|---|
<workspace> | Workspace: name, team/name or id |
kloudlite workspaces tools
The tool server's address and token (owner only)
| Argument | Help |
|---|---|
<workspace> | Workspace: name, team/name or id |
kloudlite workspaces ssh
ssh into a workspace: kloudlite workspaces ssh gh -- -A
| Argument | Help |
|---|---|
<target> | Workspace: name, team/name or id |
<args> | Passed to ssh unchanged |
kloudlite workspaces proxy
ssh's ProxyCommand: pump stdio to the workspace's gateway tunnel
| Argument | Help |
|---|---|
<id> | Workspace id |
kloudlite workspaces ssh-config
Write ~/.ssh/kloudlite_config and Include it from ~/.ssh/config
kloudlite workspaces ide
Tunnel the workspace's tool API to localhost: kloudlite workspaces ide api, then curl http://localhost:7788/tools
| Argument | Help |
|---|---|
<target> | Workspace: name, team/name or id |
--port | Local port to listen on |
kloudlite workspaces follow
Print a detached workspace process's output until it ends, and exit with its code; reconnects after laptop sleep without losing or repeating output
| Argument | Help |
|---|---|
<ws> | Workspace name or id |
<id> | Process id |
--team | Team the workspace belongs to; your own when absent |
--session | The session that holds the process; without it the usual resolution applies |
kloudlite sessions
Sessions: workspaces connected to one environment, and their intercepts
kloudlite sessions create
Create a session
| Argument | Help |
|---|---|
<session> | Name, or team/name for a team's |
--environment | An environment of the session's team |
--ttl-secs | Seconds unused before it is deleted (600..=2592000) |
kloudlite sessions set-ttl
Set or clear the unused-time limit
| Argument | Help |
|---|---|
<session> | Session: name, team/name or id |
--ttl-secs | Seconds unused before it is deleted (600..=2592000); absent clears it |
kloudlite sessions list
List your sessions
| Argument | Help |
|---|---|
--team | Only this team's |
kloudlite sessions get
Show a session with its workspaces and intercepts
| Argument | Help |
|---|---|
<session> | Session: name, team/name or id |
kloudlite sessions delete
Delete a session, the workspaces made in it and its intercepts; snapshots stay
| Argument | Help |
|---|---|
<session> | Session: name, team/name or id |
kloudlite sessions connect-env
Set or switch the session's environment
| Argument | Help |
|---|---|
<environment> | Environment id, name or team/name |
--session | Session: name, team/name or id; default the one picked with sessions use |
kloudlite sessions disconnect-env
Clear the session's environment
| Argument | Help |
|---|---|
--session | Session: name, team/name or id; default the one picked with sessions use |
kloudlite sessions stop
Stop a session and every workspace in it
| Argument | Help |
|---|---|
--session | Session: name, team/name or id; default the one picked with sessions use |
kloudlite sessions create-workspace
Create a workspace in a session; the session stops, starts and deletes it
| Argument | Help |
|---|---|
<workspace> | Name, or team/name |
--quota-gb | Disk in GB |
--image | Custom image |
--package | A nixpkgs attribute, optionally attr@version; repeat for more |
--ttl-secs | Seconds unused before it is deleted (600..=2592000) |
--env | NAME=VALUE or NAME='${{ secrets.X }}'; repeat for more |
--session | Session: name, team/name or id; default the one picked with sessions use |
kloudlite sessions delete-workspace
Delete a workspace made in a session
| Argument | Help |
|---|---|
<workspace> | Workspace id or name |
--session | Session: name, team/name or id; default the one picked with sessions use |
kloudlite sessions create-sandbox
Run one process in a new sandbox in a session; the session ends and deletes it, and it reaches the session's environment: kloudlite sessions create-sandbox -- python3 job.py
| Argument | Help |
|---|---|
--image | Image to start from |
--package | A nixpkgs attribute; repeat for more |
--from-workspace | Start from one of your workspaces |
--from-snapshot | Snapshot: name, name@N or a snapshot id |
--session | Session: name, team/name or id; default the one picked with sessions use |
--network | internet or none |
--cpu | Cores |
--memory-gb | Memory in GB |
--disk-gb | Disk in GB |
--timeout-s | Seconds it lives at most |
--env | NAME=VALUE; repeat for more |
--tty | Give the process a terminal |
--stdin | Keep its stdin open so attach can type to it |
<cmd> | The process the sandbox runs and its arguments, after -- |
kloudlite sessions intercept
Send everything that calls a service to a workspace
| Argument | Help |
|---|---|
<service> | The service to take over |
--workspace | A member workspace that answers |
--port | SERVICE_PORT=WORKSPACE_PORT, e.g. 8080=3000; repeat for more |
--session | Session: name, team/name or id; default the one picked with sessions use |
kloudlite sessions release
Release an intercept
| Argument | Help |
|---|---|
<service> | The service |
--session | Session: name, team/name or id; default the one picked with sessions use |
kloudlite sessions use
Pick the session this laptop is in (name or id). With no name, choose from yours or create one: on an existing environment (--environment), or on a new environment made first (--new-environment)
| Argument | Help |
|---|---|
<name> | Session name or id |
--team | Team the session belongs to; your own when absent |
--environment | Start a session on this existing environment (id or name) |
--new-environment | Create this environment, then a session on it |
kloudlite sessions current
Show the session this laptop is in
Which session
kloudlite with no subcommand needs a session before it can open it. It takes --session, else the saved pick if that session still exists, else your only session, else it asks (on a terminal only; elsewhere pass --session). With none at all it creates one called main with no environment, and you connect one later with session connect. The pick is saved in session.json, which the environment daemon reads too, so session use also moves the tunnel.
Environment tunnel
After sudo kloudlite env daemon install, the services of the picked session's environment answer by name from your laptop, through a tunnel and a block in the hosts file. There is nothing to connect by hand: the daemon follows session.json.
SSH config
workspaces ssh-config writes one block per workspace to ~/.ssh/kloudlite_config and puts Include ~/.ssh/kloudlite_config at the top of ~/.ssh/config once. The line must come first because ssh takes the first value that it sees. Run it again after creating or renaming a workspace. kloudlite must be on PATH for ssh to find the ProxyCommand.
Host api HostName ws-7f3a… User kl ProxyCommand kloudlite workspaces proxy ws-7f3a… UserKnownHostsFile ~/.config/kloudlite/known_hosts HostKeyAlias ws-7f3a…Files
| Path | What |
|---|---|
~/.config/kloudlite/config.json | API URL and token |
~/.config/kloudlite/session.json | The picked team and session |
~/.config/kloudlite/known_hosts | Pinned gateway host keys |
~/.ssh/kloudlite_config | Generated host blocks |
KLOUDLITE_CONFIG_DIR moves the config directory.
ws is an alias of workspaces. SSH configs that contain kloudlite ws proxy continue to work.