Connect a project to Studio
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:
kubb studioApprove 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.
Review and save generated files
To view file contents and diffs, then write generated files to disk, connect with:
kubb studio --allow-read --allow-writeWith 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:
kubb studio start --allow-readComplete pairing and permission prompts if this is the first connection. Check that the worker is connected:
kubb studio statusTo end the background connection, run:
kubb studio stopSee Background connection for worker states, logs, and restart behavior.
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:
kubb add acme/plugin-graphqlThen 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
- Publish snapshots from CI: installable packages and generated-file diffs on pull requests
kubb studiocommand: actions, flags, environment variables, and snapshot results