Initialise project
To set up a project, run the command. Loom asks which language your sections use by default. It's TypeScript unless you name another, so press Enter.
Your answer goes into .loom/config.yaml, the project's settings:
corpus: corpus
primary: typescript
ignore: []primary is the default language, and corpus names the folder your looms live in. Commit the file. Beside it, .loom/.gitignore keeps out the language servers Loom downloads. The folder that holds .loom/config.yaml is now a Loom project.
ignore lists looms that aren't part of the project, written like lines of a .gitignore. It starts empty because Loom already skips whatever Git ignores, and test fixtures named *.fixture.loom. Add drafts/, say, and Loom skips that folder when it tangles the project or looks for orphans.
Running loom init again changes nothing, and it never touches the looms you already have.
A home for your looms
Looms live in a folder called corpus, and loom init creates it for you. Move your loom in with .
A loom in corpus writes its files to the project root folder, the one that holds corpus. So hello.ts still lands where it did.
In a real project you'll want to choose where the files go. For that, Loom supports a Package setting in a loom's frontmatter:
With that frontmatter, Loom writes src/hello.ts.
This loom has no Language line, because the project's primary language is TypeScript. The quick start's loom needed one because it wasn't part of a project.
Tangle the project
Point loom tangle at the folder rather than at one file: . Loom reads every loom in corpus and writes hello.ts, the same file as before.
The lock file
Every time it tangles, Loom records the files it wrote in .loom/loom.lock. Commit it with the rest of the project.
The lock is how Loom tells its files from yours. A file that isn't in the lock was never tangled, so Loom never touches it: a README, a test, anything you wrote by hand.
When you delete a section that wrote a file, the file stays on disk, but the lock still lists it. shows such files, and deletes them.
Ejecting Loom
Loom doesn't lock you in. What it tangles is ordinary source code, the same files you would write by hand. Nothing in them depends on Loom.
So you can stop using Loom whenever you like. is the opposite of loom init: it replaces corpus with corpus.zip, so your looms are kept, and removes .loom. Every tangled file stays where it is, and the project builds and runs as it did before.