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 agentExecution contexts are an early access experiment. Turn them on at Experiments.
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 machineYou decide what the machine adds
- Host folders. Only folders you allow, read-only unless you say otherwise. Credential stores such as
~/.sshare 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
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 fallbackSet 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