Skip to content
Integrations

Connect a project to Studio

Connect a local Kubb project to Studio, review generated files, and keep an agent running in the background.

Use Kubb Studio to generate and review a project's clients, types, schemas, hooks, and mocks from the browser. Start with Kubb installed and a kubb.config.ts in your project. kubb studio needs Kubb 5.6.1 or later, because Studio refuses older agents. kubb studio snapshot needs Kubb 5.6.2 or later.

For a quick trial without local setup, use Studio's shared sandbox with a spec you are comfortable providing outside your environment. For a persistent team connection on your infrastructure, use the Docker agent. An organization admin approves its pairing code.

Connect your project

Run this command from the project directory:

Terminal
kubb studio

Approve the pairing code in the Studio window and answer the permission prompts. Each project directory pairs as its own agent. Keep the command running, select the connected agent in Studio, and generate to see progress and the file tree.

With a CLI or Docker agent, generation runs in your environment. Studio receives plugin settings, the project path, progress, generated file paths, and a hash of each generated file. A local spec is not uploaded. Reading generated file contents or changing local files requires the agent's permission.

Review and save generated files

To view file contents and diffs, then write generated files to disk, connect with:

Terminal
kubb studio --allow-read --allow-write

With no permissions granted, Kubb leaves your output folder alone and Studio sees file paths and progress only. The agent keeps copies of recent generations in node_modules/.cache/kubb. The CLI remembers permission answers per project. See Options for --allow-config-edit, --allow-exec, and the other flags.

Keep an agent running in the background

Start the connection from your project directory:

Terminal
kubb studio start --allow-read

Complete pairing and permission prompts if this is the first connection. Check that the worker is connected:

Terminal
kubb studio status

To end the background connection, run:

Terminal
kubb studio stop

See Background connection for worker states, logs, and restart behavior.

Without a TTY the CLI skips the permission prompts, so pass the permission flags the run needs. In CI it does not pair either: set KUBB_AGENT_TOKEN to a paired agent's token. A CI API key works only with kubb studio snapshot.

Use a plugin from the registry

Studio lists the plugins in the Kubb registry, but it can only run the ones installed in your project. To enable one marked as not installed, install it from the project directory:

Terminal
kubb add acme/plugin-graphql

Then reconnect, so the agent reports the new plugin. Stop kubb studio and run it again, or run kubb studio stop and kubb studio start for a background connection. Any installed plugin that ships a kubb-extension.json works, with or without a registry entry. See Plugins in Studio.

See also