Add example config and test harness
Closes #124
Summary
examples/config— Annotated starter config with rules for Git, Docker, npm, MCP tools, shell redirects, and home directory protection. Includes warnings about the last-match-wins ordering footgun.examples/test-config.sh— 45-test harness across 6 categories (MCP tools, redirects, system paths, home dir, commands, pipelines). Auto-detectsdippy/dippy.exe, CI-friendly exit code.
Usage
cp examples/config ~/.dippy/config
bash examples/test-config.sh
Test plan
- [ ] Copy
examples/configto~/.dippy/config - [ ] Run
bash examples/test-config.sh— all 45 tests should pass - [ ] Verify test harness works on Linux/macOS (
dippy) and Windows (dippy.exe)
Thanks for this — and the inline comments are exactly what make an example config readable, so I don't want to lose them. The catch is they don't currently work, and that's our bug, not yours: Dippy doesn't strip mid-line # comments from rule lines, so allow uv run pytest # test runner keeps the comment in the pattern and never matches uv run pytest. I checked and it's every directive type (commands, redirects, mcp, alias, even set), and it fails silently. Configuration.md documents allow git status # Inline comment as supported, so you followed the docs and Dippy let you down. I've written it up as #153.
So this PR is blocked on #153 rather than on anything you need to change — once the parser honors inline comments, your config works as written. Two smaller things to flag for when it's unblocked:
- Ordering:
allow rm -rf /**/__pycache__near the top gets overridden byask rm -rflower down (last-match-wins), so that one asks rather than allows. Your own header warns about exactly this footgun — just needs reordering. - The test harness: it would've caught the dead rules, which is a good argument for running the example's expectations in CI (a small pytest that loads
examples/configand asserts a few decisions) rather than a standalone script that has to be run by hand.
Genuinely useful PR — it turned up a real bug on our end. Holding it until #153 lands.