Skip to content
DocsAll docs
Console

Quick start

Run your first code in a Kode capsule.

Last updated

On this page

Overview

  1. Create an account on the sign-up page.

  2. Install kode and sign in. The SDK uses the login of kode. The installer supports macOS and Linux. On Windows, run these commands in WSL.

    CLI
    curl -fsSL https://dev.kloudlite.io/install.sh | shkode login
  3. Create a capsule that runs code. Get the SDK from SDKs.

    Python
    from kloudlite import Kodekl = Kloudlite()res = kl.capsules.run(    cmd=["python3", "-c", "print('Hello World')"],    packages=["python3"],)print(res["stdout"])
    TypeScript
    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);
    Go
    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)
    Ruby
    require_relative "kloudlite"kl = Kloudlite::Client.newres = kl.capsules.run(  cmd: ["python3", "-c", "print('Hello World')"],  packages: ["python3"])puts res["stdout"]
    Java
    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);
    CLI
    kode capsules run --package python3 -- python3 -c 'print("Hello World")'

    The TypeScript sample uses top-level await, so save it as hello.ts beside a copied index.ts and run bun hello.ts. With the npm package, import from @kloudlite/sdk in a .mjs file.

  4. Check the output. The command prints this line, and the capsule ends after it:

    text
    Hello World

    If you see a sign-in error instead, run kode login again.

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.