# jostraca

> A code generator you can run twice. Declare a file tree with React-style components and jostraca writes it. When a file already exists it can overwrite, preserve, present, diff or three-way merge, so regenerating over an edited tree is safe.

## What it is

Most generators are safe to run once. The second run, over a tree somebody has edited, is where they clobber work, and where teams stop regenerating and start hand-maintaining. jostraca is built for the second run.

You declare the output as a tree of components, Project, Folder, File and Content, in ordinary code, with loops and conditionals and no template syntax. A define phase builds the whole tree in memory, and a build phase writes it, so jostraca knows every file before it touches the disk.

When a file already exists, you choose what happens: overwrite it, preserve the old version beside the new, present the new version as an alternative for a person to pick, write a diff, or three-way merge against the last generation so local edits survive. A protect marker keeps a region of a file out of the generator's reach entirely.

It is implemented in TypeScript and in Go with byte-identical output, and it writes every file the SDK generator emits, which is why regenerating an SDK over a customised tree gives you a merge rather than a surprise.

## Facts

- Site: https://jostraca.org
- Source: https://github.com/jostraca/jostraca
- npm: jostraca
- Install: `npm install jostraca`
- Languages: TypeScript, Go
- Licence: MIT

## In the voxgig organisation

Repositories in this section pushed to in the 6 months before 2026-09-06.

- [build](https://github.com/voxgig/build), pushed 2026-09-05, npm @voxgig/build: Code generation for Voxgig system projects: reads the compiled model and writes deployment artifacts and application code with jostraca.

## The other sections

- [Open source at Voxgig](https://voxgig.com/open-source): the overview, with every voxgig repository active in the last six months.
- [SDK Generator](https://voxgig.com/open-source/sdk-generator): Six surfaces from one OpenAPI description.
- [SDK Catalog](https://voxgig.com/open-source/sdk-catalog): 600+ generated SDKs, as repositories you can read.
- [aontu](https://voxgig.com/open-source/aontu): Type-safe system definitions, as guardrails for coding agents.
- [tabnas](https://voxgig.com/open-source/tabnas): An extensible parsing engine, and a compile target for agents.
- [Seneca](https://voxgig.com/open-source/seneca): A microservices toolkit for Node.js.
- [Voxgig tools](https://voxgig.com/open-source/tools): The libraries inside every generated SDK, ported to every language the SDKs ship in.
