Project instructions.
Each new session, Nilux starts without knowing your project. Instead of explaining it again every time, write it down once in a nilux.md file. Nilux reads the file at the start of every session and follows it.
Good things to put in it:
- what the project is and how it is organised;
- how to build it and run the tests;
- your conventions ("use pnpm, not npm");
- what to leave alone ("do not edit files in
billing/without asking").
Create the file
The quickest way is to let Nilux write a first version. In a session, run:
bash❯/init
Nilux looks through the project and writes nilux.md in the project folder. Read it, fix anything it got wrong and add what only you know. Or write the file yourself. It is plain Markdown:
markdown# nilux.mdThis is a Next.js app with a Postgres database.- Use pnpm, not npm.- Run pnpm test after changing anything in src/api.- Never edit files in billing/ without asking first.
Commit nilux.md to your repository so everyone on the team gets the same instructions.
On Linux, file names are case-sensitive, so the file must be called nilux.md, in lowercase. If you already have a NILUX.md there, rename it.
Where Nilux looks
Nilux reads every one of these files that exists, from the most general to the most specific:
~/.nilux/nilux.md: your personal instructions for all projects.~/.nilux/rules/*.md: more personal rules, in alphabetical order.nilux.mdin the project folder: the project's shared instructions. (.nilux/nilux.mdworks too, but that folder is kept out of git.).nilux/rules/*.mdin the project: more project rules.nilux.local.mdin the project folder: your private notes for this project. Add it to.gitignoreso it is not shared.
~ means your home folder. If you start Nilux in a subfolder of the project, it also reads the nilux.md files in the folders between the project's root and that subfolder.
Include other files
To reuse a Markdown (.md) document you already have, put @ and its path on a line of its own:
markdown# nilux.md@docs/architecture.md@docs/coding-style.md
The path is relative to the file that includes it.
Tips
- Keep it short and concrete. A page of clear rules works better than ten pages of background.
- Rules that apply to every project you work on, such as your preferred language for code comments, belong in
~/.nilux/nilux.md. - Nilux picks up changes to these files when the next session starts.