Integrations
Connect GitHub or Claude Code once, turn it on for the boxes that should use it, and git, gh and claude work there with no login inside the box.
Every box has git, gh and claude, but a new box is not logged in to anything. An integration is an account you connect once in the web app and then turn on for the boxes that should use it. In a box with GitHub on, git clone, pull and push against github.com and gh just work; in a box with Claude Code on, claude starts logged in.
kvbox integration ls # what you have connected
kvbox new web --integration github,claude # a new box with GitHub and Claude Code on
kvbox vm set web --integration github # turn it on for a box you have, no restart
kvbox vm set web --integration off # turn everything off for that boxIntegrations are free. There are two: github and claude.
Connect an account
Open Integrations in the web app and press Connect on a card.
- GitHub: GitHub asks you to approve kvbox, with access to your repositories and your email address, and sends you back connected.
- Claude Code: run
claude setup-tokenin a terminal on your own computer. It logs in to your Claude subscription and prints a token that lasts a year; paste it in the dialog. An Anthropic API key (sk-ant-api…) works too, and kvbox checks it with Anthropic before keeping it. kvbox never asks for your Claude login itself.
Connecting and disconnecting are done only in the web app, by a person who is logged in: an API key can list integrations and set a box's list, and nothing more.
A connection belongs to your account and works only in your own boxes. An org's boxes never get a member's personal connection: an org connects its own, done by one of its owners. Claude Code takes an API key there (a subscription token is one person's, so an org cannot use one). GitHub works differently for an org, below.
GitHub for an org
An org does not connect a person's GitHub account: that would hand every member, and every agent in the org's boxes, the owner's private repositories. Instead an owner installs the kvbox GitHub App:
- Switch the web app to the org, open Integrations and press Connect on the GitHub card.
- GitHub asks you to sign in with the kvbox app. If the app is already installed on a GitHub organization or account you own, the org is connected to it (with several, the web app asks which).
- If it is not installed anywhere you own, GitHub asks where to install it (your GitHub organization or account) and which repositories it may reach: all of them, or only the ones you pick. GitHub then sends you back connected.
The org's boxes with GitHub on can then work with those repositories, and no others: clone, pull and push, and with gh open and merge pull requests, edit issues and change workflow files (the app asks GitHub for contents, pull requests, issues and workflows, read and write). Each token they get lasts an hour and acts as the app's bot, not as any person, so commits in those boxes are made by kvbox[bot] unless the box sets a git config name of its own. To give it more repositories or fewer, press Repositories on the card (GitHub's page for the installation).
If you are not an owner of the GitHub organization, GitHub sends the install to its owners for approval; connect again once one of them has approved it.
Turn it on for a box
A connection does nothing until you turn it on for a box. A new box has no integrations unless you ask:
kvbox new web --integration githubFor a box you already have, kvbox vm set replaces its list. It applies at once: a running box needs no restart, and a stopped or hibernated one has it when it next runs.
kvbox vm set web --integration github
kvbox vm set web --integration off
kvbox get web # the "integrations" row shows the box's listA fork, a box made from a snapshot and a box made from a backup keep the list of the box they came from, as long as they stay in the same slug: a copy made into another slug (a fork into an org, or of an org's box into your own) starts with none. Give --integration to kvbox new to choose another list, or off for none.
You can turn an integration on before the account is connected: the box keeps it and it starts working the moment you connect. Turning one off never needs credit: it works for an account that is out of credit or suspended too.
What works in the box
With GitHub on:
git clone,fetch,pullandpushagainsthttps://github.com/...use your account.- SSH-style addresses work too:
git@github.com:you/repo.gitis fetched over HTTPS with your account, so the box needs no SSH key at GitHub. - The first
git commithas a name and email: your GitHub ones. Agit config --global user.nameof your own wins. ghruns as you:gh repo list,gh pr create.
With Claude Code on, claude starts logged in: with your subscription's token, or with your API key (Claude Code may ask once whether to use that key). The first start goes straight in, without asking how to log in.
A login you make yourself inside a box still works. gh auth login, a token in GH_TOKEN, a credential helper of your own in ~/.gitconfig, or ANTHROPIC_API_KEY set for claude are used as in any box; with the integration off the box behaves exactly as before.
In a box with GitHub connected but not turned on, git says so instead of just failing:
kvbox: GitHub is connected but not turned on for this box: kvbox vm set web --integration githubA script can ask for the token itself:
kvbox-credential --token github # prints the token, or nothing when there is none
kvbox-credential github # the full answer as JSON
kvbox-credential --token claude # the same for Claude CodeWhere the token is
Nowhere in the box. Nothing is written to the box's disk or its environment: each time git, gh or claude needs the token, a small helper in the box asks kvbox for it and uses it for that one command. That is why:
- turning an integration on works in a box that is already running;
- disconnecting works at once: the next
git pullin every box fails; - a snapshot, a fork or a backup of the box holds no token.
Know what "on" means: any program in that box can get the token, including what you run with kvbox exec, a cron command and an agent you hand the box to. Turn it on only for boxes that should act as you on GitHub, or spend your Claude subscription or API key. A program that is running holds the token in its memory until it exits, and a snapshot or a hibernate taken at that moment holds that memory.
Disconnect
Press Disconnect on the card in the web app. kvbox stops handing the token out; GitHub's is also revoked at GitHub. An org's GitHub App stays installed on GitHub, and a token already handed out ends within the hour: uninstall the app on GitHub (Repositories on the card, before you disconnect) if nothing else uses it. A Claude token or API key cannot be revoked by kvbox: do it in your Claude or Anthropic account if you no longer want it to work anywhere. Boxes keep the integration in their list, so connecting again makes them work again without touching them.
If GitHub stops accepting the connection (you revoked kvbox there, or the org's app was uninstalled or suspended), the card says Reconnect.
Older boxes and hosts
Integrations need a box on base image v0.17.0 or later, and Claude Code v0.18.0 or later. kvbox vm set tells you when a running box's image is older; kvbox vm update <box> moves it onto the current one. Boxes of managed databases and object storage never get an integration, and neither does a box made with --local on a host that has no control plane.