Skip to content
Skip to Content
Getting Started

Configuration

The CLI stores named targets. One machine can talk to several kobe deployments.

Where config lives

FileRole
~/.config/kobe/config.jsonGlobal targets and the current target
./.kobe.tomlProject-local targets (gitignored if you choose)

kobe target set <name> --endpoint … writes ./.kobe.toml in the current directory. Pass --global to write ~/.config/kobe/config.json instead, for an endpoint you want from any directory.

kobe target set work --endpoint https://kobe.example.com --auth ssh --global
kobe target use work

kobe target use switches the target for the current shell only, so two terminals can point at different deployments. --target NAME overrides it for one command.

A local target of the same name overlays the global one. kobe target list marks those as both.

To inspect:

kobe config view
kobe target list
kobe target current

To edit interactively, run kobe config in a terminal. It opens the editor for the current target; kobe config edit NAME opens another one.

kobe config
kobe config edit work

Export and import JSON:

kobe config export > kobe-config.json
kobe config import kobe-config.json

Use - for stdout/stdin.

Project file

A ./.kobe.toml can register extra targets (for example a local e2e operator). It does not replace a global current_target unless you opt in:

# Optional: make this checkout default to e2e.
# Without this, `current_target` in this file is ignored when a global
# current target is already set, so `cd` into the repo does not steal it.
override_current_target = true
current_target = "e2e"

[targets.e2e]
endpoint = "http://127.0.0.1:8080"
auth = "token"
token = "e2e-dev-token"

If the global file has no current target, a local one is used. That is how a project file that only sets endpoint still works: it migrates to the default target.

current_target = "" is not a fallback to global; it is an unknown target name. Omit the key instead.

Use kobe --target e2e or kobe target use e2e without opting in.

The default pool is the pool ssh kobe-<name> uses when the host does not name one. Set it on an existing target with kobe init --default-pool <pool>, which updates the file that defines the target and skips setup steps that are already done. kobe target set --default-pool also works, but it replaces the whole target, so pass its endpoint and auth again.

Environment variables

VariableDescription
KOBE_ENDPOINTOne-off endpoint override
KOBE_TOKENBearer token when using token auth

Environment variables are useful in CI when you inject a token directly:

KOBE_ENDPOINT=https://kobe.example.com \
KOBE_TOKEN=$CI_KOBE_TOKEN \
  kobe lease ci-small --ttl 30m

--endpoint and --target are global flags on every command.

SSH key auth

When auth = "ssh", kobe uses your SSH agent to sign a challenge with your Ed25519 key. The agent must be running and have the key loaded:

ssh-add ~/.ssh/id_ed25519
kobe login

kobe uses TOFU (Trust On First Use) for server fingerprint verification. On first login to an endpoint, it stores the fingerprint and warns if it changes later. JSON output (-o json) never prompts; establish trust in text mode first.

Available for:
Apple macOS logomacOSMicrosoft Windows logoWindowsLinux logoLinux
Download Kunobi