The keko command
Every command and option of the command that turns a server or another Mac into a device
keko turns a Linux server or another Mac into one of your devices. It keeps an outbound connection to Keko,
so threads can run commands there. The step-by-step setup is in Your server.
curl -fsSL https://keko.run/install.sh | sh
keko login
keko setup
keko connectEvery command's --help says what it does. Threads run commands with the permissions of the user who runs
keko; on a shared server, run it as a dedicated user.
Commands
| Command | What it does |
|---|---|
keko login | Shows a link and a code to approve in a browser, then adds this machine to your devices |
keko connect | Connects, so threads can run here. Ctrl-C stops it |
keko setup | Installs what threads use on Keko Cloud: tools, a desktop and browser, previews (Linux) |
keko status | The account, the device, whether it's online, its folders, the service and the version |
keko dirs list | The folders threads may use (your home folder when none are saved) |
keko dirs add <folder>… | Saves folders threads may use. They must exist |
keko dirs remove <folder>… | Removes saved folders. At least one has to stay |
keko service install | Keeps it running in the background: a systemd user service on Linux, a launchd agent on macOS |
keko service status | Whether the service is installed and running |
keko service uninstall | Stops and removes the service |
keko update | Installs the newest release, checked against its checksum, and restarts the service |
keko logout | Removes the device from your account, signs out and deletes what was saved on this machine |
keko computer | The desktop driver threads' computer tools use. Keko starts it; you don't need to |
keko --version | The version you have |
Options
| Option | Commands | What it does |
|---|---|---|
--name <name> | login, connect | How the device shows in the app. The default is the machine's host name. On connect it applies to that run only |
--dir <folder> | login, connect | A folder threads may use; repeat it for more. On connect it applies to that run only |
--yes | login | Skips the confirmation, for scripts |
--forward-port <port> | connect | A port on this machine, such as a local MCP server or a database, that Keko Cloud threads may reach once you allow it for a thread; repeat it for more |
--verbose | connect | Prints the connection's own log lines too |
--tools, --desktop, --previews, --docker | setup | What to install (below). With none, the first three |
--yes | setup | Doesn't ask first, for scripts |
--dry-run | setup | Only shows what it would do |
--memory <size> | service install | Caps the memory threads, their commands and the desktop use together (below) |
login
login prints a link and a short code, and opens the link when the machine has a browser. Over SSH, open the link on
any device. Sign in with GitHub, check that the code matches and approve. Back in the terminal, it shows the account
and the device name and asks you to confirm.
Running login again adds the machine as a new device and removes the one it replaces. To use another account, run
logout first. When the service is installed, login restarts it with the new sign-in.
connect
connect prints one line once it's online. It reconnects by itself after a network drop or a restart on our side.
When something only you can fix stops it, such as the device being removed in the app or a newer version being needed,
it says so and exits with code 3, and the service stays stopped until you fix it.
| Exit code | Meaning |
|---|---|
| 0 | Done |
| 1 | Failed; the service starts it again |
| 2 | A usage mistake, such as an unknown option |
| 3 | Stopped for something only you can fix |
setup
setup installs what threads use on Keko Cloud, so they can do the same on this server. It runs on Debian, Ubuntu,
Fedora, RHEL 8 or newer, Oracle Linux, Rocky Linux and AlmaLinux.
| Option | What it installs |
|---|---|
--tools | git, the GitHub CLI, Node.js, Bun, Python and build tools |
--desktop | A desktop threads can see and drive, Google Chrome on x64 or Chromium on arm64, ffmpeg for recordings, and the stream for the Desktop tab |
--previews | Threads' web servers open as previews through Keko. It opens no ports |
--docker | Docker Engine from Docker's signed repository, when Docker isn't there |
It shows what it will install and asks first. It runs as you and uses sudo only to install packages and add the
vendors' signed repositories; Bun is checked against its SHA-256. It never changes running containers, SELinux or the
firewall. Running it again installs only what's missing. When the service is installed, it's installed again at the
end so threads get the new tools. More in Your server.
service
On Linux, the service is a systemd user unit that runs while you're logged in. To keep it running after you log out and after a restart:
sudo loginctl enable-linger $USERIts logs: journalctl --user -u keko -f. On macOS it's a launchd agent that starts when you log in, with its logs in
~/Library/Logs/Keko/keko.log.
The service runs threads' commands with the PATH you had when you installed it. Install it again after adding tools.
service install --memory 6G caps the memory the service, threads' commands, browsers and the desktop use together,
so they can't take the rest of the server's. The size needs its unit and at least 1G (6G, 1536M); it's kept for
the next install, setup and update, and --memory none removes it. It needs Linux with systemd's memory controller
for user services, and refuses with what to do when the server doesn't have it. On macOS it's refused.
computer
computer is what threads' computer tools call on a server's desktop: keko computer mcp serves the driver,
and keko computer record start <file> and record stop record the desktop into an MP4. Keko runs it for
threads; it uses the desktop setup --desktop set up and connect runs.
update
update reads the latest release, checks its checksum, runs it to check its version, keeps the old one, then swaps it
in and restarts the service. If the service doesn't start with the new version, it puts the old one back. It never
goes back to an older version.
Where it keeps things
| Path | What's there |
|---|---|
~/.keko/bin/keko | The command |
~/.keko | The sign-in and the device's pairing, readable only by you. On macOS the sign-in is in the login keychain when it's unlocked |
~/.keko/worktrees | Threads' worktrees |
~/.keko/projects | GitHub projects cloned for threads on this machine |
~/.keko/recordings | Threads' screen recordings |
~/.keko/dock/server.json | What setup set up and the service's memory cap |
~/.keko/dock/audit.log | What threads ran and changed on this machine |