The git of code generation.
A universal, declarative, composable generator engine. Scaffold projects, add features, and automate repetitive setup — for any framework, any language.
$npm install -g xocode$xo create acme/nextjs-starter$xo add acme/auth-jwt
Why xo?
Define everything as a generator.json manifest. No code required — just declare what to copy, render, inject, or merge.
xo scans your project and builds a signal map — file presence, detected framework, package manager, dependencies. Generators adapt automatically.
Generators declare requires and conflicts. xo enforces the dependency graph so you never apply an incompatible generator.
Every operation is recorded with before-snapshots. Run xo undo to instantly revert any generator application.
Publish a generator by pushing generator.json to any GitHub repo. No registry account, no upload step — just a URL.
CLI, VS Code extension, or embedded as a TypeScript library via @xo/core.
Simple by design
Drop a generator.json in any GitHub repo and anyone can run it with xo add. No registry account needed.
{
"name": "acme/react-component",
"type": "feature",
"requires": ["acme/react-setup"],
"detects": [
{ "signal": "pkg:react", "exists": true }
],
"prompts": [
{
"name": "componentName",
"type": "input",
"message": "Component name?"
},
{
"name": "withTests",
"type": "confirm",
"message": "Add a test file?"
}
],
"actions": [
{
"type": "template",
"source": "templates/component.tsx.hbs",
"target": "src/components/{{pascalCase componentName}}/index.tsx"
},
{
"type": "template",
"source": "templates/test.tsx.hbs",
"target": "src/components/{{pascalCase componentName}}/index.test.tsx",
"if": "withTests"
}
]
}FAQ
Ready?
Follow the guide and have a working generator running in under 10 minutes.