Opinionated generator and codemod toolkit for the @finografic ecosystem.
This package provides a small CLI for:
- scaffolding new
@finograficpackages - applying conventions (e.g. TypeScript) to existing repositories
- keeping project structure consistent, minimal, and explicit
It is designed to be run, not installed.
Run directly using pnpm dlx:
pnpm dlx @finografic/genx <command> [options]
| Command | Description |
|---|---|
create |
Scaffold a new @finografic package |
migrate |
Sync conventions to an existing package |
deps |
Sync dependencies to @finografic/deps-policy |
features |
Add optional features to an existing package |
managed |
Run a command across all managed targets |
audit |
Scan features and apply what is missing or partial |
help |
Show this help message |
Create a new @finografic package from template
genx create [options]
| Flag | Description |
|---|---|
--type <type> |
Package type (see below) |
--name <name> |
Package name (@finografic/...) |
-y, --yes |
Accept defaults without prompting |
Examples:
# Create a new package interactively genx create # Create a CLI package genx create --type cli # Create a library with a specific name genx create --type library --name my-lib # Create a shared config package genx create --type config # Create a Vite + React app genx create --type react
PACKAGE TYPES:
| Type | Description |
|---|---|
library |
reusable TypeScript library |
cli |
command-line tool |
config |
shared configuration package |
react |
Vite + React + TypeScript app |
How it works:
- Prompts for package type, name, author, and optional features
- Copies _templates/ into the target directory with variable substitution
- Applies selected features (oxc-config, git-hooks, etc.)
- Runs pnpm install and initializes a git repository
Sync conventions to an existing @finografic package
genx migrate [path] [options]
| Flag | Description |
|---|---|
-y, --yes |
Skip per-file confirmation prompts |
Examples:
# Migrate current directory interactively genx migrate # Migrate a specific directory genx migrate ../my-package # Apply changes without per-file confirms genx migrate --yes
How it works:
- Select migrate operations (package.json, config, agent docs, etc.)
- Optionally select features to apply alongside migration
- Shows a diff preview for each changed file before writing
- Applies selected changes to the target directory
Sync package dependencies to @finografic/deps-policy
genx deps [path] [options]
| Flag | Description |
|---|---|
-y, --yes |
Apply all planned changes without prompting |
--allow-downgrade |
Include policy downgrades in the plan |
--update-policy |
Update deps-policy itself (no dep sync) |
Examples:
# Interactive sync in current directory genx deps # Sync deps for a specific directory genx deps ../my-package # Apply all changes non-interactively genx deps --yes # Include downgrades when planning genx deps --allow-downgrade # Update @finografic/deps-policy genx deps --update-policy
How it works:
- Reads policy versions from @finografic/deps-policy
- Compares against local package.json dependencies
- Shows a table of planned upgrades, adds, and downgrades
- Prompts to select packages (or applies all with --yes)
- Runs pnpm install and syncs toolchain versions (.nvmrc, engines, packageManager)
Add optional features to an existing @finografic package
genx features [path] [options]
| Flag | Description |
|---|---|
-y, --yes |
Skip per-file confirmation prompts |
Examples:
# Add features to current directory genx features # Add features to a specific directory genx features ../my-package # Apply without per-file confirms genx features --yes
How it works:
- Prompts to select from available features (oxc-config, css, git-hooks, etc.)
- Detects already-installed features and skips them
- Shows a diff preview for each changed file before writing
- Runs pnpm install when dependencies change
Run a command across all managed targets
genx managed <command> [options]
| Subcommand | Description |
|---|---|
migrate |
Run migrate across managed targets |
deps |
Sync deps across managed targets |
features |
Add features across managed targets |
| Flag | Description |
|---|---|
-y, --yes |
Skip per-target and per-file confirms |
--allow-downgrade |
Include downgrades (deps only) |
Examples:
# Migrate all managed targets genx managed migrate # Sync deps for all managed targets genx managed deps # Sync deps non-interactively genx managed deps --yes # Add features to all managed targets genx managed features
How it works:
- Reads managed targets from ~/.config/finografic/genx.config.jsonc
- Iterates each target, prompting to apply or skip (unless --yes)
- Runs the selected command (migrate, deps, features) on each target
Scan features and apply what is missing or partial
genx audit [path] [options]
| Flag | Description |
|---|---|
-y, --yes |
Apply selected features without per-file confirms |
Examples:
# Audit current directory genx audit # Audit a specific directory genx audit ../my-package # Apply without per-file confirms genx audit -y
How it works:
- Scans all known features against the target package
- Reports installed, partial, and missing features
- Prompts to select partial/missing features to apply
- Applies selected features with diff preview
Scaffolds and syncs the agent interface layer of a @finografic project.
- Creates
AGENTS.mdfrom the canonical template if absent - Merges existing
AGENTS.md: enforces template bodies, strips legacy memory sections, dedupes duplicate Markdown Tables headings, and reorders sections (front matter β Rules spine β extras β Learned) - Keeps enforced shared sections in sync with the template: Project Memory Model, Roadmap and Planning Docs, Rules β Global, Rules β Markdown Tables, and Git Policy
- Seeds Rules β Project-Specific once (never overwritten β project customises it)
- Copies portable agent skill procedures into
.github/skills/ - Adds
scaffold-cli-helpandscaffold-core-moduleonly for CLI package types - Removes the genx-only
scaffold-featureskill from generated targets
Shared AI tooling instructions for GitHub Copilot, Cursor, and Claude Code.
- Syncs
.github/copilot-instructions.mdfrom_templates(full file when content differs). - Syncs each file under
.github/instructions/from_templates, except theproject/subtree β that folder is never overwritten by genx (per-repo rules stay put). - Syncs
AGENTS.mdwith reverse apply from_templates/AGENTS.md.template(canonical spine: Rules β Project-Specific β Rules β Global β Rules β Markdown Tables β Git Policy, plus shared bodies for General / Markdown / Git). The target supplies Rules β Project-Specific body and any extra##sections; those land after the spine (merge order), with Learned last. Treat that template file as the spec β not the genx repoβs rootAGENTS.md. Missing file: write the full template.
Project memory model for agentic coding workflows.
docs/process/PROJECT_MEMORY_MODEL.mddocs/todo/ROADMAP.mddocs/todo/NEXT_STEPS.md.agents/handoff.md.agents/memory.mdAGENTS.mdProject Memory Model block (viaai-agentsdependency).gitignorerules for tracked handoff + ignored memory- minimal
CLAUDE.mdpointer toAGENTS.md - migration from legacy
.claude/memory.mdand.claude/handoff.md, followed by legacy-file deletion
CSS/SCSS formatting via oxfmt with CSS-aware overrides.
- Configures oxfmt (oxc) as the default formatter for
cssandscss - Patches
oxfmt.config.ts: addscssimport and{ files: ['*.css', '*.scss'], options: { ...css } }when missing (standard genx layout) - Renders CSS/SCSS formatter blocks through the shared grouped
.vscode/settings.jsonmodel
Pre-commit linting + conventional commits.
- Installs
lint-staged,husky - Installs
@commitlint/cli,@commitlint/config-conventional - Adds
lint-stagedconfig to package.json (*.{ts,tsx,js,jsx,mjs,cjs}βoxfmtthenoxlint --fix) - Scaffolds
.husky/pre-commitand.husky/commit-msg - Ensures
commitlint.config.mjsexists (copies from genx_templates/when missing) - Removes an inlined
commitlintkey from package.json if present (config lives incommitlint.config.mjs) - Removes legacy
simple-git-hooksconfig/files when present - Ensures
preparescript runshusky
Markdown linting via @finografic/md-lint.
- Installs
@finografic/md-lint - Splits a combined
*.{json,...,md}lint-staged glob into data-only +*.mdwithmd-lint --fix - Ensures
.markdownlint.jsoncextendsnode_modules/@finografic/md-lint/.markdownlint.jsonc - Removes deprecated inline
markdownlint.configfrom.vscode/settings.json - Adds VSCode extension recommendation
- Migrates old preview-style paths and removes deprecated copied CSS assets from
.vscode/ - Renders
.vscode/settings.jsonthrough the shared grouped settings model
Migrate an existing package to @finografic/oxc-config + oxfmt + oxlint (for repos not created from the latest genx template).
- Installs
oxfmt,oxlint,oxlint-tsgolint, and@finografic/oxc-config - Removes legacy
@finografic/oxfmt-configif present - Creates
oxfmt.config.ts(base preset; CSS overrides come from the css feature) - Writes a minimal
oxlint.config.tsusing the inferred package-type preset from@finografic/oxc-config/oxlint - Ensures
lint/lint:fix/lint:ciscripts use oxlint - Creates or updates
update:oxc-configin the PACKAGES scripts section - Ensures
format:check/format:fixscripts use oxfmt - Removes legacy update scripts (
update:eslint-config,update:oxfmt-config) - Replaces Prettier if present (uninstall + remove configs)
- Normalizes
lint-staged: code βoxfmtthenoxlint --fix;*.mdβoxfmtthenoxlint --fix; data files βoxfmtonly - Adds format check to
release:check/ CI when missing - Recommends
oxc.oxc-vscodein.vscode/extensions.json - Removes legacy
dbaeumer.vscode-eslint/dprint.dprintrecommendations from.vscode/extensions.json - Writes canonical grouped
.vscode/settings.json(oxc formatter, ordered language blocks, oxc/typescript preferences) - Removes associated legacy
eslint/dprintdependencies and root config files - Removes legacy
dprintformat-check steps from.github/workflows/ci.yml
Ensures a Vite + React + TypeScript app surface is fully configured with Panda CSS, @finografic/design-system, and path aliases.
- Ensures
react,react-dom,@finografic/design-system, and@finografic/iconsare independencies - Ensures
vite,@vitejs/plugin-react,@pandacss/dev,concurrently, and React type packages are indevDependencies - Creates
vite.config.tswith React plugin and path aliases when missing - Creates
panda.config.tswith design-system preset when missing - Creates
postcss.config.mjswith Panda CSS plugin when missing - Creates
src/vite-env.d.ts,src/main.tsx, andsrc/App.tsxwhen missing
Testing via Vitest.
- Installs
vitest - Adds
test/test:run/test:coveragescripts
Every scaffolded package includes:
package.jsonβ configured with scope, name, and package typetsconfig.jsonβ strict TypeScript configtsdown.config.tsβ modern bundler setupoxfmt.config.tsβ oxfmt formatting config.gitignore,LICENSE,README.md
Baseline features installed during create:
- oxc-config β migrate older repos to oxfmt + oxlint +
@finografic/oxc-config - markdown β markdown linting via
@finografic/md-lint
Optional features (selected during create or added via features / audit):
- vitest β unit testing
- git-hooks β pre-commit linting + conventional commits
- ai-agents β
AGENTS.mdsync + portable skills - ai-instructions β shared AI rules (Copilot, Cursor, Claude)
- ai-memory β roadmap, handoff, and session memory model
- css β CSS/SCSS formatting via oxfmt
- react-vite β Vite + React + TypeScript + Panda CSS app surface
my-package/
βββ src/
β βββ index.ts
β βββ cli.ts (cli type only)
βββ package.json
βββ tsconfig.json
βββ tsdown.config.ts
βββ oxfmt.config.ts
βββ .gitignore
βββ LICENSE
βββ README.md
βββ .github/ (optional)
βββ copilot-instructions.md
βββ instructions/
| Command | Description | Options |
|---|---|---|
create |
Scaffold a new @finografic package | --type <type>, --name <name>, -y |
migrate |
Sync conventions to an existing package | -y |
deps |
Sync dependencies to @finografic/deps-policy | -y, --allow-downgrade, --update-policy |
features |
Add optional features to an existing package | -y |
managed |
Run a command across all managed targets | migrate, deps, features, -y, --allow-downgrade |
audit |
Scan features and apply what is missing or partial | -y |
help |
Show this help message | - |
--help / -h |
Show help (works with commands too) | - |
See genx <command> --help for detailed usage.
git clone https://github.com/finografic/genx.git pnpm install pnpm build pnpm test:run
Link globally (recommended β rebuilds take effect immediately):
pnpm link
genx create
genx migrate --help
# When done:
pnpm unlinkOr run the built binary directly: node dist/index.mjs create
MIT Β© Justin Rankin