Quick start
Run your first code in a Kode capsule.
Last updated
On this page
Overview
Create an account on the sign-up page.
Install
kodeand sign in. The SDK uses the login ofkode. The installer supports macOS and Linux. On Windows, run these commands in WSL.curl -fsSL https://dev.kloudlite.io/install.sh | shkode loginCreate a capsule that runs code. Get the SDK from SDKs.
from kloudlite import Kodekl = Kloudlite()res = kl.capsules.run( cmd=["python3", "-c", "print('Hello World')"], packages=["python3"],)print(res["stdout"])import { Kode } from "./index.ts";const kl = new Kloudlite();const res = await kl.capsules.run({ cmd: ["python3", "-c", "print('Hello World')"], packages: ["python3"],});console.log(res.stdout);kl := kloudlite.New(kloudlite.Options{})res, err := kl.Capsules.Run(kloudlite.RunCapsule{ Capsule: kloudlite.CreateCapsule{ Cmd: []string{"python3", "-c", "print('Hello World')"}, Packages: []string{"python3"}, },})if err != nil { log.Fatal(err)}fmt.Print(res.Stdout)require_relative "kloudlite"kl = Kloudlite::Client.newres = kl.capsules.run( cmd: ["python3", "-c", "print('Hello World')"], packages: ["python3"])puts res["stdout"]var kl = new Kloudlite();var res = kl.capsules().run(new Kloudlite.RunCapsule() .cmd(List.of("python3", "-c", "print('Hello World')")) .packages("python3"));System.out.print(res.stdout);kode capsules run --package python3 -- python3 -c 'print("Hello World")'The TypeScript sample uses top-level await, so save it as
hello.tsbeside a copiedindex.tsand runbun hello.ts. With the npm package, import from@kloudlite/sdkin a.mjsfile.Check the output. The command prints this line, and the capsule ends after it:
Hello WorldIf you see a sign-in error instead, run
kode loginagain.
Next steps
- Workspaces: a workspace that keeps your code and tools.
- Desks: connect a workspace to the services of an environment.
- Pipelines: run scheduled and event-driven work in capsules.
To do these tasks with an AI agent, see Agentic workflows.