Skip to content

feat: CLI v2, write-target policy, and README update#4

Merged
dacrystal merged 7 commits intomainfrom
feat/cli-v2-readme-update
Apr 11, 2026
Merged

feat: CLI v2, write-target policy, and README update#4
dacrystal merged 7 commits intomainfrom
feat/cli-v2-readme-update

Conversation

@dacrystal
Copy link
Copy Markdown
Owner

Summary

  • CLI v2 restructure: template command group, source subcommands, prune, list replaces ps
  • Shell completion fixes, banner in --help, settings init improvements
  • Write-target policy: --path flag on template new, template_write_dir setting, XDG default
  • README fully updated for CLI v2 and standard-readme compliance
  • Fix pre-existing lint and mypy errors; add ruff and mypy to dev dependencies

Test Plan

  • make all passes (lint, typecheck, 249 tests)
  • devcode --help shows new command tree (template, list, prune, completion)
  • devcode template new --path /tmp/test mytemplate writes to the specified path
  • README section order: Configuration/Template System/File Injection appear before API

…ngs init

- open projectpath: add click.Path(file_okay=False, resolve_path=True) for dir-only completion
- new base arg: add shell_complete=_complete_templates
- edit/open template args: completion coverage confirmed and tested
- Banner: shown in --help and bare devcode via _DevCodeGroup.format_help(); trailing newline added
- completion subcommand: devcode completion bash/zsh/fish prints eval string; README updated
- settings init: _DevCodeGroup.main() calls _load_settings() before any Click processing
… setting, XDG default

- Add _resolve_write_target(path_override) with three-tier priority:
  --path flag > settings.template_write_dir > XDG_DATA_HOME default
- Add --path option to `template new` for per-invocation override
- Add template_write_dir to _DEFAULT_SETTINGS (None = use XDG)
- Warn when write dir is not in template_sources (template won't be discoverable)
- resolve_template_search_path now returns realpath'd entries for consistent comparison
- Remove _write_template_dir() (replaced by _resolve_write_target)
- Rewrite API section for full CLI v2 command tree (template group,
  source subcommands, prune, list replaces ps)
- Fix section order per standard-readme spec (extra sections before API)
- Add template_write_dir to Configuration section
- Rename Prerequisites to Dependencies, add LICENSE link, fix Contributing
- Fix pre-existing lint and mypy errors in devcode.py and tests
- Add ruff and mypy to dev dependencies in pyproject.toml
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Apr 11, 2026

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

❌ Patch coverage is 96.68874% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 94.47%. Comparing base (f336bcc) to head (1859908).
⚠️ Report is 7 commits behind head on main.

Files with missing lines Patch % Lines
src/devcode.py 96.68% 5 Missing ⚠️
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@            Coverage Diff             @@
##             main       #4      +/-   ##
==========================================
+ Coverage   94.05%   94.47%   +0.42%     
==========================================
  Files           1        1              
  Lines         538      670     +132     
==========================================
+ Hits          506      633     +127     
- Misses         32       37       +5     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

- Wrap expected paths in os.path.realpath() for symlink/short-name resolution
- Use os.path.join() instead of hardcoded Unix-style slashes
- Replace fake Unix paths in source add/remove tests with real temp dirs
@dacrystal dacrystal merged commit 1859908 into main Apr 11, 2026
3 checks passed
@dacrystal dacrystal deleted the feat/cli-v2-readme-update branch April 11, 2026 15:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants