Quick start
Create a workspace, connect to it, and run a service. Everything here is the same object seen from the console, the CLI, and the API; pick the tab you will use.
Create a workspace, connect to it, and run a service. Everything here is the same object seen from the console, the CLI, and the API; pick the tab you will use.
1. Sign in
Sign in at https://dev.kloudlite.io with GitHub or Google. Then install kl-connect and log in. It opens the browser once, stores a CLI token under ~/.config/kl-connect, and prints where the token went.
kl-connect loginAn API call needs a bearer token. kl-connect login stores one; kl-connect ws list shows it is working. See Authentication for minting a token by hand.
2. Create a workspace
A workspace needs a name and a disk quota; it runs in your team's region. Packages are Nix attribute names, optionally pinned as attr@version.
# The CLI creates through the console today; open it:open https://dev.kloudlite.io/me/workspacescurl -sS https://dev.kloudlite.io/v1/workspaces \ -H "Authorization: Bearer $KL_TOKEN" \ -H 'content-type: application/json' \ -d '{ "name": "api", "quota_gb": 20, "repo": "[email protected]:acme/api.git", "branch": "main", "packages": ["nodejs@22", "pnpm"] }'The response is the workspace document with state: "creating". It becomes ready once the pod is running and the packages are published; GET /v1/workspaces/{id} reports progress under packages_status and ssh.
3. Connect
kl-connect ws ssh resolves a name or id, fetches a short-lived connect ticket, and opens ssh through the region's gateway. Anything after -- goes to ssh.
kl-connect ws listkl-connect ws ssh apikl-connect ws ssh api -- -A # forward your agentWrite an ssh config once and every editor's remote mode works with the workspace's name as the host:
kl-connect ws ssh-configssh apicode --remote ssh-remote+api /home/kl/workspace4. Run something
Inside the workspace your tree is at /home/kl/workspace, your home is the workspace's own volume (it persists across restarts of this workspace, not across workspaces), and the packages you asked for are on PATH.
cd ~/srcpnpm installpnpm dev --port 30005. Stop, and keep the tree
A stop cuts a sync point, tears the pod down, and keeps the tree. A start brings it back on the same bytes.
curl -sS -X POST https://dev.kloudlite.io/v1/workspaces/$WS/stop -H "Authorization: Bearer $KL_TOKEN"curl -sS -X POST https://dev.kloudlite.io/v1/workspaces/$WS/start -H "Authorization: Bearer $KL_TOKEN"