Thank you for your interest in contributing to Claude Notes! This document provides guidelines for contributing to the project.
- Python 3.11 or higher
- uv (recommended) or pip
-
Fork the repository on GitHub
-
Clone your fork locally:
git clone https://github.com/yourusername/claude-notes.git cd claude-notes -
Install dependencies:
uv sync --all-extras
-
Verify the installation:
uv run claude-notes --help
-
Create a new branch for your feature/fix:
git checkout -b feature/your-feature-name
-
Make your changes in the
src/claude_notes/directory -
Test your changes:
# Run the CLI to test functionality uv run claude-notes list-projects uv run claude-notes show --help # Test HTML output uv run claude-notes show --format html --output test.html
Before submitting your changes, ensure they meet our quality standards:
# Format code
uv run ruff format
# Lint code
uv run ruff check
# Fix auto-fixable issues
uv run ruff check --fixWhile we don't have automated tests yet, please manually test:
- CLI Commands: Ensure all commands work as expected
- Terminal Output: Check that terminal formatting looks correct
- HTML Output: Verify HTML export works and renders properly
- Edge Cases: Test with empty conversations, missing files, etc.
src/claude_notes/cli.py- Command-line interface and main logicsrc/claude_notes/parser.py- JSONL transcript parsingsrc/claude_notes/formatters/- Output formatting modulesbase.py- Base formatter classterminal.py- Rich terminal formattinghtml.py- HTML export with CSSfactory.py- Formatter creationtools.py- Tool-specific formatters
src/claude_notes/pager.py- Interactive paging for terminal
- Python Style: Follow PEP 8, enforced by ruff
- Type Hints: Use type hints for function parameters and return values
- Docstrings: Add docstrings for classes and public methods
- Error Handling: Handle errors gracefully with informative messages
- Rich Formatting: Use Rich for terminal output, HTML for web output
To add a new output format:
- Create a new formatter class in
src/claude_notes/formatters/ - Inherit from
BaseFormatterinbase.py - Implement the
format_conversationmethod - Add the formatter to
factory.py - Update CLI to support the new format
To add support for a new tool:
- Add a formatter class to
html.py(inherit fromHTMLToolFormatter) - Add it to the
HTML_TOOL_FORMATTERSregistry - Add corresponding terminal formatter to
tools.pyif needed
-
Push your changes to your fork:
git push origin feature/your-feature-name
-
Create a pull request on GitHub with:
- Clear title describing the change
- Detailed description of what changed and why
- Screenshots for UI changes
- Link to any related issues
-
Ensure CI passes (GitHub Actions will run automatically)
-
Respond to code review feedback
Use clear, descriptive commit messages:
Add support for Glob tool in HTML formatter
- Create HTMLGlobFormatter class
- Add glob-specific styling
- Update tool registry
- Fix issue with pattern escaping
When reporting bugs, please include:
- Operating system and Python version
- Steps to reproduce the issue
- Expected vs actual behavior
- Error messages or screenshots
- Sample JSONL files (if applicable and not sensitive)
For new features, please:
- Check existing issues to avoid duplicates
- Describe the use case and benefit
- Propose an implementation approach
- Consider backward compatibility
Documentation improvements are always welcome:
- Fix typos or unclear instructions
- Add examples or use cases
- Improve code comments
- Update README or other docs
- Questions: Open a GitHub Discussion
- Bugs: Create a GitHub Issue
- Chat: Join discussions in existing issues
Please be respectful and constructive in all interactions. We aim to create a welcoming environment for all contributors.
Thank you for contributing to Claude Notes! 🎉