Run Kuriko
The CLI
kuriko installs, upgrades and removes Kuriko in your own cloud, and applies your access policy. It runs on your machine with your own credentials, and never holds a secret.
npm i -g kurikokuriko help # every commandkuriko help <command> # one command's options| Command | What it does |
|---|---|
init [folder] | Makes a folder the installs repo. |
install | Puts Kuriko in a project, or has Kuriko run it for you, step by step. Safe to re-run. |
list | Shows your installs, how far each got, and their addresses. |
upgrade | Moves an install to this CLI's version. |
policy plan | apply | Shows, then makes, the changes in an install's policy.yaml. |
policy pull | For an install Kuriko runs: gets the policy.yaml it has applied. |
secret set <name> | Stores a data source's credential in the install's secret manager, for policy.yaml to name. |
person remove | Removes someone who has left, and hands their tools on. |
groups [search] | Lists your Google groups, to name in policy.yaml. |
destroy | Removes an install from its project. |
How the CLI works
It uses your credentials
The CLI runs gcloud and terraform as you. The only Kuriko server it talks to is our image registry, to check your access key can pull this version. Anything secret, like the sign-in app's client secret, goes from your terminal straight into Secret Manager. Neither the CLI nor any file it writes ever contains one.
Every command checks you're signed in first and, if a session has expired, offers to sign you in again in your browser. To do it yourself:
gcloud auth login --update-adcThe installs repo
An install is a folder named after its project, holding the answers you gave (kuriko.json), the Terraform configuration generated from them, and the install's policy.yaml. Terraform state lives in a Cloud Storage bucket in the project itself. The first kuriko install asks where to keep them:
- In your team's Terraform repo (recommended, if you have one): run install from inside it and it suggests a
kuriko/folder there. Changes are committed but not pushed, so they go through your usual pull requests. - In a repo of its own,
kuriko-installs, shared with whoever runs Kuriko. Changes are committed and pushed.
kuriko-installs.json # marks the repo# one folder per install, named after its project:acme-kuriko/ kuriko.json # your answers: project, region, groups, … main.tf # generated Terraform root (don't edit by hand) imports.tf # generated: anything the install adopted terraform.tfvars # the Kuriko version, and settings .kuriko/module/ # the Terraform module, as shipped with your CLI version policy.yaml # who can do what: edit this oneCommands find the repo from the folder you're in, then $KURIKO_INSTALLS. They act on the install folder you're in; otherwise, with one install they use it, and with several they show a menu of them with their status. In CI or a script, where there's no menu, name it with --dir <project-id>.
Before changing an install, commands check the repo is up to date with its remote, so you never act on stale configuration. Afterwards they offer to commit and push.
kuriko init
kuriko init kuriko-installsCreates the folder if needed and marks it as an installs repo. You rarely need it: kuriko install asks where the folder goes and makes it. Run git init in it and push it somewhere private your team can reach.
kuriko install
kuriko installInstalls Kuriko into a project, for a company that signs in with . It asks everything first, shows the plan, and only then starts. About 30 minutes, mostly waiting for the database.
Its first question is where Kuriko runs. Choose Managed by Kuriko to have Kuriko run it instead: that path needs only gcloud and an access key, and is described on Managed by Kuriko. The rest of this section is for an install in your own cloud.
| Step | What happens |
|---|---|
| Questions | Where its config goes, where Kuriko runs, where people sign in, the project, billing and region. Nothing is created until you confirm the plan. |
| Project | Creates the project (or uses yours) and turns on the services Kuriko uses. |
| Access key | You paste the access key we gave you (it starts with kuriko_). It's checked, then stored in Secret Manager, readable only by Artifact Registry. |
| Database | Starts creating Cloud SQL in the background, since it takes 10 to 15 minutes. Asks first, because it's the part that costs money. |
| Sign-in app ✋ | You create an internal OAuth client in the Google Cloud console; the CLI shows the exact redirect URI. You paste the client secret (hidden); it's checked and stored in Secret Manager. |
| Groups ✋ | You choose which Google groups are Kuriko's admins and builders, from the groups you already have (or let it create new ones). |
| AI apps | You tick which AI apps people can connect with (Claude Code and Claude to start). Every other app Kuriko knows goes into policy.yaml commented out, to turn on later. |
| Data warehouse | Optional. If your data is in BigQuery or Snowflake, it writes the connector into policy.yaml (granted to nobody yet). For Snowflake it can make Kuriko's key and prints the SQL for a read-only user. Redshift, Databricks and Microsoft Fabric are coming soon. See Data sources. |
| Groups Reader ✋ | You give Kuriko's web identity the Groups Reader role in the Google Admin console, so it can see who's in which group. |
| Everything else | Terraform creates the services, identities, key and storage, never deleting anything. Then the database schema, and your first policy.yaml, applied: the two groups' roles, the AI apps you chose, and your other groups as comments to copy from. |
| Check | Confirms, from inside your cloud, that Kuriko sees you in the admins group, exactly as sign-in will. |
✋ marks steps only a person can do in an admin console; the CLI explains each one, then checks it was done. It ends by printing your Kuriko address, its MCP server address and how to connect each AI app you chose, and offers to commit the install.
What it creates
| Resource | Purpose |
|---|---|
| Cloud Run: kuriko-web, kuriko-gateway, kuriko-migrate | The app, the gateway, and the job that migrates the database and runs one-off admin tasks. |
| Cloud SQL | Kuriko's records, in Postgres. Private to the project. |
| service accounts | kuriko-web, kuriko-gateway, kuriko-builder, kuriko-tools (no permissions) and kuriko-events: one per job, each with only what it needs. |
| Secret Manager | Kuriko's own secrets (database URL, session key), and your sign-in client secret, stored by the CLI. |
| Cloud KMS | A key for per-person connections. Kept if you destroy the install. |
| Artifact Registry, storage, Pub/Sub | Tool images, uploaded sources, build logs, and the events that move deploys along. |
kuriko list
kuriko listEvery install in the repo, how far it got, and its addresses. Read from each install's Terraform state, so it reflects what's actually in the cloud.
kuriko upgrade
npm i -g kurikokuriko upgrade [--dry-run]- Shows the version change and what changes in the cloud, and asks.
- Migrates the database before anything switches over, then moves the app and gateway to the new version. The running version keeps working throughout.
- Never moves an install to an older version, and refuses any plan that would delete a resource, except permissions Kuriko no longer needs, which the plan calls out.
--dry-run shows what would change and changes nothing.
kuriko policy
kuriko policy plankuriko policy apply [--yes]Who can do what in an install lives in its policy.yaml. plan checks the file and shows exactly what applying it would change; apply shows the same, asks, and makes the install match. Both run inside your cloud, so your machine never connects to the database. --yes applies without asking, for CI and AI agents; with no terminal, it leaves the commit to you and prints the git command. The format, and how changes work, are on Access policy.
plan also prints what only someone outside Kuriko can do: the Terraform the data team adds so Kuriko can read a BigQuery dataset, and the OAuth redirect URI to register for each per-person source.
On an install Kuriko runs
The same commands work, from the install's folder in your installs repo. They go through Kuriko, which checks you're one of the install's admins and runs them inside it, so each takes a minute or two. kuriko policy pull gets the policy.yaml it has applied, e.g. on a new machine.
kuriko secret set
kuriko secret set hubspot-tokenop read op://Infra/HubSpot/token | kuriko secret set hubspot-token # or piped inStores a data source's credential in the install's Secret Manager, for a connector in policy.yaml to name (secret: hubspot-token). It's typed hidden or piped in, and never shown or written to a file. On an install Kuriko runs it goes through Kuriko, which checks you're an admin there. Names starting kuriko- are Kuriko's own and can't be set.
kuriko person remove
kuriko person remove ana@yourco.com --to their-manager@yourco.comFor someone who has left, or whose address is going to someone else. It signs them out of Kuriko everywhere at once (browser and every AI app), deletes their own connected accounts, and hands their tools to --to. It shows what it will do and asks first. Remove them at too, or they can sign in again as a new person.
kuriko groups
kuriko groups [search]Lists your Google groups, so you can name them exactly in policy.yaml. It marks the ones the file already gives a role or access to, and warns about groups the file names that don't exist. A search shows only groups whose email, name or description contains it. A new install's policy.yaml starts with the list as comments to copy from. Membership is never copied into Kuriko: each person's groups are read when they sign in.
kuriko destroy
kuriko destroy [--dry-run] [--confirm <project-id>]Shows what will be deleted and what stays, then asks you to type the project ID.
- Deleted: the database and everything in it, Kuriko's services and identities, and every tool.
- Kept: the key (Google never deletes keys), your own secrets (the sign-in client, data source credentials), the Terraform state, and the project.
Outside the cloud, remove the sign-in app and its group settings in Google Admin console yourself.