Thank you for your interest in contributing to EnvForge! This document outlines how to get started.
This project follows the Contributor Covenant. Please be respectful and constructive.
- Rust 1.75 or later (
rustup update stable) - Git
- Linux or macOS
git clone https://github.com/emreerinc/envforge.git
cd envforge
cargo build
cargo test- Fork the repository
- Create a feature branch:
git checkout -b feature/my-feature - Make your changes
- Run checks:
cargo fmt && cargo clippy -- -D warnings && cargo test - Commit with a descriptive message
- Push and open a Pull Request
- rustfmt with default settings — run
cargo fmtbefore committing - CI will reject unformatted code
- Clippy strict —
cargo clippy -- -D warnings - All warnings are treated as errors
- CI will reject any clippy warning
- Follow standard Rust conventions:
snake_casefor functions/variables,PascalCasefor types - File names:
snake_case.rs
- All tests go in
tests/directory (no in-module tests) - Use descriptive test names:
test_parse_export_with_double_quotes - Use
instafor snapshot tests where applicable - Use
tempfilefor tests that need filesystem
-
cargo fmt --checkpasses -
cargo clippy -- -D warningspasses -
cargo testpasses (all tests) - New features have tests
- No unnecessary files added
Use conventional commit style:
feat: add fish shell supportfix: handle empty .zshrc correctlyrefactor: simplify parser regexdocs: update README installationtest: add round-trip tests for heredocchore: update dependencies
- Explain what changed and why
- Reference any related issues
- Include manual testing steps for TUI changes
src/
├── model/ # Data types — LineNode, ShellFile, errors
├── parser/ # Shell file parsing & serialization
├── config/ # App configuration, backup, atomic writes
├── ops/ # Business operations (CRUD, profiles, encryption, etc.)
├── ui/ # TUI rendering and interaction
└── cli/ # CLI subcommand definitions and handlers
- parser/ is the foundation — all other modules depend on it
- ops/ contains pure business logic — no I/O decisions, no UI
- ui/ and cli/ are thin layers that call ops/
- Never break round-trip fidelity — parse → serialize must be byte-identical
- Add the operation logic in
src/ops/ - Add CLI subcommand in
src/cli/mod.rs+ handler insrc/cli/commands.rs - Add TUI integration in
src/ui/app.rs(key handler) +src/ui/dialogs.rs(if popup needed) - Add tests in
tests/ - Update help screen in
src/ui/dialogs.rs
- Use GitHub Issues
- Include: OS, shell, EnvForge version (
envforge --version) - For parser bugs: include (sanitized) sample of your shell config
- For TUI bugs: include terminal emulator name and size
- Open a GitHub Issue with
[Feature]prefix - Describe the use case, not just the solution
- We prioritize features that align with the core philosophy: safe, non-destructive ENV management
See VERSIONING.md for version policy.