@genesislcap/genx
v15.50.0
Published
Genx CLI
Readme
Genx CLI
This repo contains our genx tool for rapid code scaffolding that adheres to best practices.
Installation
To enable this module in your application, follow the steps below.
- Add
@genesislcap/genxas a dependency in yourpackage.jsonfile. Whenever you change the dependencies of your project, ensure you run the$ npm run bootstrapcommand again. You can find more information in the package.json basics page.
{
...
"dependencies": {
...
"@genesislcap/genx": "latest"
...
},
...
}API Docs
Agent rules
genx agent-rules installs the shared AI agent rules that ship with this package
(agent-rules/) into a consumer project, and wires them into whichever assistants
that project uses.
npx genx agent-rules # install and wire up detected assistants
npx genx agent-rules .. # target another folder (see below)
npx genx agent-rules --tools claude,cursor,gemini # wire up specific assistants
npx genx agent-rules --check # CI: fail when installed rules are stale[folder] defaults to the current directory, and it should be the folder the assistants read -
usually the repo root. In a Genesis app that is one level above client/, where package.json
lives, so run npx genx agent-rules .. from client/. Run bare in a folder with no assistant
files, the command looks up the tree as far as the repo root and, if it finds the real root, points
at it and writes nothing rather than leaving an orphaned second copy behind (--tools installs in
the current folder anyway).
The rule markdown is copied to docs/agent-rules/, and each assistant is wired in its own idiom:
a .claude/skills/<rule>/SKILL.md for Claude Code, a .cursor/rules/<rule>.mdc for Cursor, and a
pointer line inside a managed block in GEMINI.md or AGENTS.md for the rest. All four load the
rule body on demand rather than on every session. Content outside the managed block is never
touched.
Claude Code also reads AGENTS.md from v2.1.277, but only when the project has no CLAUDE.md,
.claude/CLAUDE.md or CLAUDE.local.md at or above the working directory — and not on Amazon
Bedrock, with telemetry disabled, or in the first session after an upgrade. So wire claude
wherever Claude Code is used rather than relying on the agents pointer; see
the consumer docs for the
CLAUDE.local.md trap that comes with it.
Installed copies are managed: re-run the command after genx upgrade and npm install to pick
up rule changes, and propose edits in
foundation-ui rather than locally. The install
records what it did in docs/agent-rules/.genx-agent-rules.json, which is what lets --check
verify the assistants actually chosen and lets a later run sweep away rules retired upstream.
Currently shipped:
| Rule | Purpose |
| --- | --- |
| report-upstream-bug.md | Something broken upstream: file a bug in genesislcap/foundation-ui — with the human's confirmation — instead of quietly working around it in the consumer project. |
| propose-upstream-feature.md | Something missing upstream: propose the capability instead of building the fifth private copy of it. Includes a generality test so app code stays app code. |
Event type codegen
When eventTypes.enabled is set in genx.config.* or package.json (genx / genesis keys), genx build and genx generate event-types emit typed EventDetailsMap from Kotlin handler DTOs and generated table DAOs. See @genesislcap/event-type-codegen for configuration, limitations, and migration.
To generate from a live metadata dump (foundation-header Ctrl/Cmd+Shift+E in dev):
genx generate event-types --from-metadata event-metadata.jsonLicense
Note: this project provides front-end dependencies and uses licensed components listed in the next section; thus, licenses for those components are required during development. Contact Genesis Global for more details.
Licensed components
Genesis low-code platform
