Skip to content
DocsAll docs
Console

kloudlite

Lists the commands and options of kloudlite, the command-line program for your computer.

Last updated

On this page

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

ArgumentHelp
<team>Team whose session to open; your own session when absent
--teamThe team, as a flag: kloudlite -t TEAM -s SESSION claude reads like claude -t -s
--startStart the session first (and its stopped workspaces)
--sessionSession (name or id) to open; asked on a terminal when unclear
--jsonPrint the answer verbatim as JSON (resource commands), for scripts and agents

kloudlite login

Log in through the browser and store the CLI token

ArgumentHelp
--apiAPI 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

ArgumentHelp
--teamShow 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

ArgumentHelp
<team>Team whose session to serve; your own when absent
--sessionSession (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]

ArgumentHelp
--teamTeam whose session to open; your own when absent
--sessionSession (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

ArgumentHelp
--ownerA handle or team; your own when absent

kloudlite request

Send any request to the api: kloudlite request GET /v1/quota

ArgumentHelp
<http_method>GET, POST, PUT, PATCH or DELETE
<api_path>Path, e.g. /v1/quota
--bodyRequest body as JSON (or @file)
--queryKEY=VALUE query parameter; repeat for more

kloudlite environments

Multi-service environments

kloudlite environments create

Create an environment

ArgumentHelp
<environment>Name, or team/name for a team's
--servicesServices as JSON (or @file): [{"name","image","ports","env","command","mounts"}]
--quota-gbDisk in GB
--snapshotGrow it from a snapshot
--ttl-secsSeconds unused before it is deleted (600..=2592000)

kloudlite environments list

List your environments and your teams'

ArgumentHelp
--ownerOnly this handle or team's

kloudlite environments get

Show an environment

ArgumentHelp
<environment>Environment: name, team/name or id

kloudlite environments set-services

Replace the whole service list

ArgumentHelp
<environment>Environment: name, team/name or id
--servicesServices as JSON (or @file)

kloudlite environments start

Start an environment

ArgumentHelp
<environment>Environment: name, team/name or id

kloudlite environments stop

Stop an environment

ArgumentHelp
<environment>Environment: name, team/name or id

kloudlite environments restart

Restart one running service so it gets its current env vars

ArgumentHelp
<environment>Environment: name, team/name or id
--serviceThe service to restart

kloudlite environments set-ttl

Set or clear the unused-time limit

ArgumentHelp
<environment>Environment: name, team/name or id
--ttl-secsSeconds unused before it is deleted (600..=2592000); absent clears it

kloudlite environments delete

Delete an environment

ArgumentHelp
<environment>Environment: name, team/name or id

kloudlite environments clone

Make a new environment from this one

ArgumentHelp
<environment>Environment: name, team/name or id
--toThe new environment: name or team/name
--snapshotClone one of its snapshots instead of the live disk
--servicesServices as JSON (or @file): [{"name","image","ports","env","command","mounts"}]
--quota-gbDisk in GB

kloudlite environments restore

Put this environment back to one of its snapshots

ArgumentHelp
<environment>Environment: name, team/name or id
--snapshotSnapshot id
--discardA service whose data may be lost; repeat for more

kloudlite volumes

Volumes: list, get, versions, delete, delete-version

kloudlite volumes list

List volumes

ArgumentHelp
--kindworkspace or environment
--ownerOnly this handle or team's

kloudlite volumes get

A volume by name

ArgumentHelp
--ownerA handle or team; your own when absent
<volume>Volume: name or owner/name

kloudlite volumes versions

The versions of a volume

ArgumentHelp
--ownerA handle or team; your own when absent
<volume>Volume: name or owner/name

kloudlite volumes delete

Delete a detached volume with all its snapshots

ArgumentHelp
--ownerA handle or team; your own when absent
<volume>Volume: name or owner/name

kloudlite volumes delete-version

Delete one version of a volume

ArgumentHelp
--ownerA 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)

ArgumentHelp
--workspaceWorkspace: name, team/name or id
--environmentEnvironment: name, team/name or id
--messageA message for the snapshot
--volumeVolume name; required on a volume's first push

kloudlite snapshots list

The snapshots of a volume, newest first

ArgumentHelp
<volume>Volume key

kloudlite snapshots refs

A volume's refs

ArgumentHelp
<volume>Volume key

kloudlite snapshots delete

Delete a snapshot

ArgumentHelp
<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

ArgumentHelp
--ownerThe 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

ArgumentHelp
<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)

ArgumentHelp
<name>Secret name
--ownerThe team; your own handle when absent (your personal secret, no team)
--scopeWith 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

ArgumentHelp
--ownerThe team; your own handle when absent (your personal secrets, no team)
--scopeWith 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)

ArgumentHelp
<name>Secret name
--ownerThe team; your own handle when absent (your personal secret, no team)
--scopeWith 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

ArgumentHelp
--imageImage to start from
--packageA nixpkgs attribute; repeat for more
--from-workspaceStart from one of your workspaces
--from-snapshotSnapshot: name, name@N or a snapshot id
--teamThe team that owns it
--networkinternet or none
--cpuCores
--memory-gbMemory in GB
--disk-gbDisk in GB
--timeout-sSeconds it lives at most
--envNAME=VALUE; repeat for more
--ttyGive the process a terminal
--stdinKeep 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

ArgumentHelp
<sandbox>Sandbox id

kloudlite sandboxes list

List your sandboxes, newest first, 50 at a time; --all follows every page

ArgumentHelp
--teamOnly this team's
--limitAt most this many per page (1 to 200)
--cursorContinue after the cursor a previous page printed
--allFollow 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

ArgumentHelp
--imageImage to start from
--packageA nixpkgs attribute; repeat for more
--from-workspaceStart from one of your workspaces
--from-snapshotSnapshot: name, name@N or a snapshot id
--teamThe team that owns it
--networkinternet or none
--cpuCores
--memory-gbMemory in GB
--disk-gbDisk in GB
--timeout-sSeconds it lives at most
--envNAME=VALUE; repeat for more
--ttyGive the process a terminal
--stdinKeep 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

ArgumentHelp
<sandbox>Sandbox id
--followKeep 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

ArgumentHelp
<sandbox>Sandbox id

kloudlite sandboxes terminate

Stop a sandbox for good; the record stays until deleted

ArgumentHelp
<sandbox>Sandbox id

kloudlite sandboxes wait

Wait until a sandbox has terminated, print the reason and exit with the process's code

ArgumentHelp
<sandbox>Sandbox id
--timeout-sGive up after this many seconds

kloudlite sandboxes wait-running

Wait until a sandbox is running; fails with the reason if it terminates instead

ArgumentHelp
<sandbox>Sandbox id
--timeout-sGive up after this many seconds

kloudlite sandboxes delete

Delete a terminated sandbox's record

ArgumentHelp
<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

ArgumentHelp
--fileThe definition as a JSON file; - reads stdin
--ownerA handle or team; your own when absent

kloudlite pipelines update

Save a definition as the pipeline's next version; the same definition saves nothing

ArgumentHelp
<name>Pipeline: name or owner/name
--fileThe definition as a JSON file; - reads stdin
--ownerA handle or team; your own when absent

kloudlite pipelines list

List an owner's pipelines

ArgumentHelp
--ownerA handle or team; your own when absent

kloudlite pipelines get

Show a pipeline's definition, the newest version unless --version

ArgumentHelp
<name>Pipeline: name or owner/name
--ownerA handle or team; your own when absent
--versionA version number; the newest when absent

kloudlite pipelines versions

List a pipeline's saved versions

ArgumentHelp
<name>Pipeline: name or owner/name
--ownerA handle or team; your own when absent

kloudlite pipelines delete

Delete a pipeline with its versions; its old runs stay

ArgumentHelp
<name>Pipeline: name or owner/name
--ownerA handle or team; your own when absent

kloudlite pipelines run

Start a pipeline by hand; answers the queued run

ArgumentHelp
<name>Pipeline: name or owner/name
--ownerA handle or team; your own when absent
--versionA version number; the newest when absent
--inputKEY=VALUE for the definition's inputs; repeat for more
--environmentRun jobs that name none in this environment
--cloneRun 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

ArgumentHelp
<name>Pipeline: name or owner/name
--ownerA handle or team; your own when absent

kloudlite pipelines runs

A pipeline's runs, newest first

ArgumentHelp
<owner>The pipeline's owner: a handle or team
<pipeline>Pipeline name
--limitAt most this many

kloudlite pipelines get-run

Show one run

ArgumentHelp
<owner>The pipeline's owner: a handle or team
<pipeline>Pipeline name
<run>Run id

kloudlite pipelines cancel-run

Ask a run to stop

ArgumentHelp
<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

ArgumentHelp
<owner>The pipeline's owner: a handle or team
<pipeline>Pipeline name
<run>Run id
<job>The job's index or key
--followPoll for new output until the job ends
--poll-sSeconds between polls

kloudlite pipelines wait-run

Wait for a run to end, print its state, exit non-zero unless it succeeded

ArgumentHelp
<owner>The pipeline's owner: a handle or team
<pipeline>Pipeline name
<run>Run id
--timeout-sGive up after this many seconds
--poll-sSeconds between polls

kloudlite ide

A workspace's tool server: files, commands, processes, watches, builds

kloudlite ide list

List every tool with its schema

ArgumentHelp
<workspace>Workspace: name, team/name or id
--urlTool 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

ArgumentHelp
<workspace>Workspace: name, team/name or id
--urlTool server address; default is the one the api names (use http://127.0.0.1:7788 under kloudlite workspaces ide)
<tool>Tool name
--argsThe tool's arguments as JSON (or @file)

kloudlite ide read

Read files

ArgumentHelp
<workspace>Workspace: name, team/name or id
--urlTool server address; default is the one the api names (use http://127.0.0.1:7788 under kloudlite workspaces ide)
--pathOne file
--pathsA file; repeat for more
--offsetFirst line
--limitNumber of lines

kloudlite ide write

Write a file

ArgumentHelp
<workspace>Workspace: name, team/name or id
--urlTool server address; default is the one the api names (use http://127.0.0.1:7788 under kloudlite workspaces ide)
--pathFile path
--contentThe content

kloudlite ide edit

Edit one file (--path, --edits) or several (--files); atomic

ArgumentHelp
<workspace>Workspace: name, team/name or id
--urlTool server address; default is the one the api names (use http://127.0.0.1:7788 under kloudlite workspaces ide)
--pathOne file
--editsEdits as JSON: [{"old","new","replace_all"}]
--filesSeveral files as JSON: [{"path","edits"}]

kloudlite ide patch

Apply a unified diff

ArgumentHelp
<workspace>Workspace: name, team/name or id
--urlTool server address; default is the one the api names (use http://127.0.0.1:7788 under kloudlite workspaces ide)
--diffThe diff
--cwdWorking directory

kloudlite ide glob

Find files by pattern

ArgumentHelp
<workspace>Workspace: name, team/name or id
--urlTool server address; default is the one the api names (use http://127.0.0.1:7788 under kloudlite workspaces ide)
--patternGlob pattern
--cwdWorking directory

kloudlite ide grep

Search file contents

ArgumentHelp
<workspace>Workspace: name, team/name or id
--urlTool server address; default is the one the api names (use http://127.0.0.1:7788 under kloudlite workspaces ide)
--patternRegular expression
--cwdWorking directory
--globOnly files matching this
--modeOutput mode
--contextLines of context
--ignore-caseIgnore case
--maxAt most this many matches

kloudlite ide exec

Run a shell command

ArgumentHelp
<workspace>Workspace: name, team/name or id
--urlTool server address; default is the one the api names (use http://127.0.0.1:7788 under kloudlite workspaces ide)
--cmdThe command line
--cwdWorking directory
--envNAME=VALUE; repeat for more
--timeout-msTime limit in milliseconds
--headKeep the first N lines of output
--tailKeep the last N lines of output
--quietPrint only the exit code
--detachRun as a process and answer its id

kloudlite ide process-list

List processes

ArgumentHelp
<workspace>Workspace: name, team/name or id
--urlTool 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

ArgumentHelp
<workspace>Workspace: name, team/name or id
--urlTool server address; default is the one the api names (use http://127.0.0.1:7788 under kloudlite workspaces ide)
<process>Process id
--sinceStdout offset
--since-errStderr offset

kloudlite ide process-write

Write to a process's stdin

ArgumentHelp
<workspace>Workspace: name, team/name or id
--urlTool server address; default is the one the api names (use http://127.0.0.1:7788 under kloudlite workspaces ide)
<process>Process id
--dataThe text

kloudlite ide process-kill

Signal a process

ArgumentHelp
<workspace>Workspace: name, team/name or id
--urlTool server address; default is the one the api names (use http://127.0.0.1:7788 under kloudlite workspaces ide)
<process>Process id
--signalA signal name

kloudlite ide watch

Watch paths for changes

ArgumentHelp
<workspace>Workspace: name, team/name or id
--urlTool server address; default is the one the api names (use http://127.0.0.1:7788 under kloudlite workspaces ide)
--pathA path; repeat for more
--cmdRun this on a change
--patternOnly matching paths
--onceStop after the first change

kloudlite ide watch-poll

Events from a watch

ArgumentHelp
<workspace>Workspace: name, team/name or id
--urlTool server address; default is the one the api names (use http://127.0.0.1:7788 under kloudlite workspaces ide)
<watch>Watch id
--sinceOffset

kloudlite ide watch-stop

Stop a watch

ArgumentHelp
<workspace>Workspace: name, team/name or id
--urlTool 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

ArgumentHelp
<workspace>Workspace: name, team/name or id
--urlTool server address; default is the one the api names (use http://127.0.0.1:7788 under kloudlite workspaces ide)
--tagAn image tag; repeat for more
--contextBuild context
--fileDockerfile
--build-argA build arg; repeat for more
--platformPlatform
--no-cacheSkip the cache
--timeout-msTime limit in milliseconds
--headKeep the first N lines of output
--tailKeep the last N lines of output

kloudlite ide container-push

Copy an image the registry holds to new tags

ArgumentHelp
<workspace>Workspace: name, team/name or id
--urlTool server address; default is the one the api names (use http://127.0.0.1:7788 under kloudlite workspaces ide)
--srcSource image
--dstA 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

ArgumentHelp
<workspace>Name, or team/name for a team's
--quota-gbDisk in GB
--imageCustom image
--packageA nixpkgs attribute, optionally attr@version; repeat for more
--ttl-secsSeconds unused before it is deleted (600..=2592000)
--envNAME=VALUE or NAME='${{ secrets.X }}'; repeat for more

kloudlite workspaces list

List your workspaces

ArgumentHelp
--teamOnly this team's

kloudlite workspaces get

Show a workspace

ArgumentHelp
<workspace>Workspace: name, team/name or id

kloudlite workspaces delete

Delete a workspace; its volume survives while a snapshot references it

ArgumentHelp
<workspace>Workspace: name, team/name or id

kloudlite workspaces start

Start a workspace

ArgumentHelp
<workspace>Workspace: name, team/name or id

kloudlite workspaces stop

Stop a workspace

ArgumentHelp
<workspace>Workspace: name, team/name or id

kloudlite workspaces restart

Restart a running workspace so it gets its current env vars

ArgumentHelp
<workspace>Workspace: name, team/name or id

kloudlite workspaces clone

Make a new workspace from this one's state

ArgumentHelp
<workspace>Workspace: name, team/name or id
--toThe new workspace's name
--taskA task for the new workspace

kloudlite workspaces restore

Make a new workspace from a snapshot

ArgumentHelp
--snapshotSnapshot: name, name@N or a snapshot id
--teamTeam whose volume names to resolve
--toThe new workspace's name
--imageOverride the snapshot's image
--packageOverride the snapshot's packages; repeat for more
--quota-gbOverride the disk size in GB

kloudlite workspaces set-packages

Replace the package list

ArgumentHelp
<workspace>Workspace: name, team/name or id
--packageA nixpkgs attribute, optionally attr@version; repeat for more

kloudlite workspaces set-ttl

Set or clear the unused-time limit

ArgumentHelp
<workspace>Workspace: name, team/name or id
--ttl-secsSeconds 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

ArgumentHelp
<workspace>Workspace: name, team/name or id
--envNAME=VALUE or NAME='${{ secrets.X }}'; repeat for more

kloudlite workspaces update-packages

Re-resolve every pinned package

ArgumentHelp
<workspace>Workspace: name, team/name or id

kloudlite workspaces tools

The tool server's address and token (owner only)

ArgumentHelp
<workspace>Workspace: name, team/name or id

kloudlite workspaces ssh

ssh into a workspace: kloudlite workspaces ssh gh -- -A

ArgumentHelp
<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

ArgumentHelp
<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

ArgumentHelp
<target>Workspace: name, team/name or id
--portLocal 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

ArgumentHelp
<ws>Workspace name or id
<id>Process id
--teamTeam the workspace belongs to; your own when absent
--sessionThe 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

ArgumentHelp
<session>Name, or team/name for a team's
--environmentAn environment of the session's team
--ttl-secsSeconds unused before it is deleted (600..=2592000)

kloudlite sessions set-ttl

Set or clear the unused-time limit

ArgumentHelp
<session>Session: name, team/name or id
--ttl-secsSeconds unused before it is deleted (600..=2592000); absent clears it

kloudlite sessions list

List your sessions

ArgumentHelp
--teamOnly this team's

kloudlite sessions get

Show a session with its workspaces and intercepts

ArgumentHelp
<session>Session: name, team/name or id

kloudlite sessions delete

Delete a session, the workspaces made in it and its intercepts; snapshots stay

ArgumentHelp
<session>Session: name, team/name or id

kloudlite sessions connect-env

Set or switch the session's environment

ArgumentHelp
<environment>Environment id, name or team/name
--sessionSession: name, team/name or id; default the one picked with sessions use

kloudlite sessions disconnect-env

Clear the session's environment

ArgumentHelp
--sessionSession: name, team/name or id; default the one picked with sessions use

kloudlite sessions stop

Stop a session and every workspace in it

ArgumentHelp
--sessionSession: 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

ArgumentHelp
<workspace>Name, or team/name
--quota-gbDisk in GB
--imageCustom image
--packageA nixpkgs attribute, optionally attr@version; repeat for more
--ttl-secsSeconds unused before it is deleted (600..=2592000)
--envNAME=VALUE or NAME='${{ secrets.X }}'; repeat for more
--sessionSession: name, team/name or id; default the one picked with sessions use

kloudlite sessions delete-workspace

Delete a workspace made in a session

ArgumentHelp
<workspace>Workspace id or name
--sessionSession: 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

ArgumentHelp
--imageImage to start from
--packageA nixpkgs attribute; repeat for more
--from-workspaceStart from one of your workspaces
--from-snapshotSnapshot: name, name@N or a snapshot id
--sessionSession: name, team/name or id; default the one picked with sessions use
--networkinternet or none
--cpuCores
--memory-gbMemory in GB
--disk-gbDisk in GB
--timeout-sSeconds it lives at most
--envNAME=VALUE; repeat for more
--ttyGive the process a terminal
--stdinKeep 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

ArgumentHelp
<service>The service to take over
--workspaceA member workspace that answers
--portSERVICE_PORT=WORKSPACE_PORT, e.g. 8080=3000; repeat for more
--sessionSession: name, team/name or id; default the one picked with sessions use

kloudlite sessions release

Release an intercept

ArgumentHelp
<service>The service
--sessionSession: 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)

ArgumentHelp
<name>Session name or id
--teamTeam the session belongs to; your own when absent
--environmentStart a session on this existing environment (id or name)
--new-environmentCreate 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.

text
Host api  HostName ws-7f3a…  User kl  ProxyCommand kloudlite workspaces proxy ws-7f3a…  UserKnownHostsFile ~/.config/kloudlite/known_hosts  HostKeyAlias ws-7f3a…

Files

PathWhat
~/.config/kloudlite/config.jsonAPI URL and token
~/.config/kloudlite/session.jsonThe picked team and session
~/.config/kloudlite/known_hostsPinned gateway host keys
~/.ssh/kloudlite_configGenerated 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.