Skip to content

Run it on
your own machine.

An execution context is a machine you run code on: your laptop, a home server, or a build box. Your runs go there first, and Kody cloud is the fallback.

Connect your agent

Execution contexts are an early access experiment. Turn them on at Experiments.

Example machine named my-laptop
Execution contextsEarly access
npm install -g @kodycodes/cli
kody login

# register this machine and keep it running
kody connect --name my-laptop

# send your runs here first
kody chain add my-laptop

Install the CLI, sign in, connect the machine, and add it to your chain.

Your machine does the work.
Your credentials stay put.

A run on your machine has the same permissions as the same run on Kody cloud. Credentials never reach the machine. When code there calls a service with a credential, the request leaves from Kody cloud, which adds the credential on the way out.

The machine sees the response, not the credential.

What changes on a machine

You decide what the machine adds

  • Host folders. Only folders you allow, read-only unless you say otherwise. Credential stores such as ~/.ssh are never exposed.
  • Local network. Off until you turn it on, so a run can reach devices on your network.
  • Shell commands. Off until you turn them on at the machine itself.

Run a command on the machine

kody.command.run
import { kody } from 'kody:runtime'

const result = await kody.command.run({
  command: 'git status --short && npm test',
  cwd: '/Users/me/code/app',
  timeoutMs: 120_000,
})
// { exitCode, stdout, stderr, durationMs, ... }

Code in a run calls kody.command.run with a command and a working folder.

Offline or busy?
The run moves on.

Your chain is the ordered list of places Kody tries: up to three machines, with Kody cloud last. A machine that is offline or busy is skipped. A run that names one machine with no fallback fails instead.

Jobs, webhooks, and subscriptions can choose where they run too. Runs on your machine do not use your Worker compute allowance.

The chain and cloud fallback

Set it up once.
It keeps running.

kody connect installs a background service on Linux, macOS, or Windows, so the machine reconnects after a restart. It does not run as root, and it updates itself by default.

Pause a machine from anywhere, and see its status and runs in your workspace.

Share a machine with your team

Share a context with people or teams in your org. Each person opts in before their runs go there. Their runs never get your host folders or shell commands.

Sharing a context

Use the folder, the device, or the tool that only lives there.

Read the execution contexts guide

Connect your agent