Contributing
Thank you for considering contributing to cli-expander! Whether it's bug reports, feature requests, code contributions, or documentation improvements, all help is welcome.
Ways to Contribute
Report Bugs
Found a bug? Open an issue on GitHub.
Good bug reports include:
- Steps to reproduce
- Expected vs actual behavior
ce --versionoutput- Your match file content (if relevant)
- Terminal emulator and shell version
- Linux distribution and version
Debug logs help a lot:
RUST_LOG=debug ce expand ":trigger" 2>&1
Suggest Features
Have an idea? Open a feature request issue with:
- What you want to do
- Why existing features don't cover it
- Example use case or match file
- Optional: how you'd implement it
Submit Code
- Fork the repository
- Create a branch:
git checkout -b feature/my-feature - Make your changes
- Run tests:
cargo test - Verify formatting:
cargo fmt --check - Run clippy:
cargo clippy --all-targets -- -D warnings - Push and open a Pull Request
Code style:
- Follow existing patterns in the codebase
- Use
cargo fmtfor formatting - Add tests for new functionality
- Document public APIs with doc comments
- Keep commits focused and well-described
Improve Documentation
Documentation lives in the brain-donnyaw-cf-pages repository as MDX files for Docusaurus.
Good documentation:
- Includes working examples
- Shows expected output
- Explains why, not just how
- Links to related concepts
- Uses clear, simple language
Share Match Files
Share useful match files by:
- Opening a PR with example additions to the examples section
- Publishing a gist or repository of match files
- Sharing in community discussions
Development Setup
# Clone the repository
git clone https://github.com/donnyaw/cli-expander
cd cli-expander
# Build
cargo build --release
# Run tests
cargo test
# Build documentation
# (see brain-donnyaw-cf-pages repo)
Project Structure
cli-expander/ Rust workspace
├── cli-expander-cli/ Main binary, CLI commands
├── cli-expander-config/ YAML config parser
├── cli-expander-match/ Trigger detection
├── cli-expander-render/ Template engine
├── cli-expander-ui/ Cursive TUI renderer
├── cli-expander-detect/ Input detection (evdev)
├── cli-expander-inject/ Text injection (uinput)
└── shell/ Shell plugins (bash, zsh, fish)
Community
- GitHub Issues — Bug reports, feature requests
- Discussions — Questions, ideas, show and tell
- Pull Requests — Code and documentation contributions
License
cli-expander is MIT licensed. By contributing, you agree to license your contributions under the same license.