How to contribute
June 24, 2026 · View on GitHub
Create a new issue using the correct issue template or introduce a new feature/fix a bug and submit a pull request.
Catnap uses Semantic Versioning, make sure to bump the version respectively.
To bump the version, use the versionctl tool which can be generated using:
# Generate versionctl tool
$ nim generate_versionctl
# List usage of versionctl tool
$ versionctl
Project structure
.
├── config/
│ ├── config.cat # Main config (DSL)
│ ├── distros.cat # Distro art config (DSL)
│ └── themes/ # Example themes
├── docs/ # Contains man docs
├── image/ # Contains all images for README.md
├── src/
│ ├── common/ # Layer 1 => no internal deps, imports stdlib only
│ ├── config/ # Layer 2 => depends on: common
│ │ └── dsl/ # Custom config DSL (Domain-Specific Config Language)
│ ├── system/ # Layer 3 => depends on: common, config
│ ├── generation/ # Layer 4 => depends on: common, config, system
│ ├── rendering/ # Layer 5 => depends on: common, config, system, generation
│ ├── extern/
│ │ └── headers/ # C headers
│ └── catnap.nim # Entry point
├── scripts/ # Test scripts
└── config.nims # nim install, nim debug, ...
Module layer rules
The src/ tree is divided into strict dependency layers. A module may only import from its own layer or lower, importing upward is forbidden.
| Layer | Package | May import |
|---|---|---|
| 1 | common/ | stdlib only |
| 2 | config/ | common |
| 3 | system/ | common, config |
| 4 | generation/ | common, config, system |
| 5 | rendering/ | common, config, system, generation |
How to add a new distro
- Add the distro's art block in
config/distros.cat, inside the$distroslist. Keep entries in alphabetical order. Use{%name ["line1" ...] margin=[top left right]}— multiple names for aliases:{%mint %linuxmint [...]}. - In
src/common/definitions.nim, add an entry toPKGMANAGERS:
"distroname": "pkgmanager",
- If the package manager is new, also add it to
PKGCOUNTCOMMANDSin the same file:
"pkgmanager": "command to count installed packages",
- Submit a pull request to the Catnap repo.