Installation
Requirements
- Node.js >= 24. The published packages run unmodified on Node and on Bun — no
Bun.*-only APIs — sotakobehaves identically under either runtime. - A package manager: npm, Bun, pnpm or Yarn. Every install and
takocommand in these docs is shown withnpm/npx; the Bun form (bun add,bunx tako …) works exactly the same, as do pnpm and Yarn. kurotako never shells out to a package manager during a normalgenerate(directory mode); it only needs one for output mode B, where it auto-installs the generated packages (and picks Bun / pnpm / Yarn / npm automatically, or fromoutputs[].packageManager).
Packages
kurotako is a set of small packages under the @kurotako/* scope. Nothing is bundled —
you install the CLI once, then add a parser and generators as your pipeline needs them.
1. The kurotako package (always)
| Package | Role |
|---|---|
kurotako | the tako binary and defineConfig, in one install |
npm install -D kurotako
# bun add -d kurotako
# pnpm add -D kurotako
# yarn add -D kurotako
Your tako.config.ts then imports from it:
import { defineConfig } from 'kurotako';
The tako binary can also be installed globally (npm install -g kurotako,
bun add -g kurotako); kurotako still stays a project dev dependency because your
tako.config.ts imports it.
kurotako is an umbrella over @kurotako/cli (the binary) and @kurotako/config
(defineConfig), both pulled in transitively. Install those two directly only for
advanced use — the CLI's programmatic API (runCli, reporters) or the config loader
internals (loadConfig, TakoConfigSchema, error classes). @kurotako/ir and
@kurotako/core come in transitively too; depend on them directly only for programmatic
use (see the API reference).
2. One parser, per schema source
| Package | Schema source |
|---|---|
@kurotako/parser-prisma | Prisma schema.prisma |
@kurotako/parser-openapi | OpenAPI 3.0/3.1 document (JSON/YAML or HTTP(S) URL) |
3. The generators you want output from
| Package | Output |
|---|---|
@kurotako/gen-zod | Zod schemas |
@kurotako/gen-angular | Angular types and typed FormGroups (embeds its own Zod) |
@kurotako/gen-react-tanstack | typed React + TanStack Form hooks (embeds its own Zod) |
@kurotako/gen-typescript | pure TypeScript type declarations, no runtime dependency |
@kurotako/gen-openapi | one OpenAPI 3.0/3.1 document per namespace |
# Prisma in, Zod + Angular out:
npm install -D @kurotako/parser-prisma @kurotako/gen-zod @kurotako/gen-angular
# bun add -d @kurotako/parser-prisma @kurotako/gen-zod @kurotako/gen-angular
# OpenAPI in, React + TanStack Form hooks out:
npm install -D @kurotako/parser-openapi @kurotako/gen-react-tanstack
npm install @tanstack/react-form zod
# Prisma in, Zod only:
npm install -D @kurotako/parser-prisma @kurotako/gen-zod
Install only what a given project uses. The full list is in the catalog.
Adding a parser or a generator later
Every parser and generator is a separate package. To add one:
- Install it:
npm install -D @kurotako/<package>(orbun add -d @kurotako/<package>). - Import its exported parser or generator in
tako.config.ts. - For a parser, add an entry under
sources(its key is the namespace). For a generator, add an entry to thegeneratorsarray — entries run in the order listed, and a generator that needs another one declares it as a private dependency.
Everything available is listed in the catalog.
Monorepos
In a workspace repo, keep one tako.config.ts at the root and install
@prisma/internals in the sub-project that owns the schema. tako init --monorepo
scaffolds that layout. See Using tako in a monorepo.
Versioning
Packages are versioned independently (changesets). The documentation version selector
tracks @kurotako/cli (tako) releases: a docs version is "the docs as they stood for
tako vX".