-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
priority-3 🌿Low impact polish/minor bugs/chores. Backlog if capacity allows.Low impact polish/minor bugs/chores. Backlog if capacity allows.
Description
Summary
Verify that the live copytree --help output exactly matches the flags, examples, and descriptions documented in the README to ensure consistency between documentation and implementation.
Problem Statement
As the CLI evolves, discrepancies can emerge between:
- Documented flags in README vs actual implementation
- Flag descriptions and examples
- Command aliases and shortcuts
- Default values and behavior
This affects:
- New users learning the tool from documentation
- Documentation accuracy and trust
- Support burden from incorrect examples
- Developer experience
Current State
Documentation Sources:
README.md- User-facing documentation- Frequently Used Flags section
- Common Recipes section
- Quick Start examples
bin/copytree.js- CLI implementation with Commander.jsdocs/cli/copytree-reference.md- Detailed CLI reference
Known Areas to Verify:
- All 8 commands exist and work:
copy,profile:list,profile:validate,copy:docs,config:validate,config:inspect,cache:clear,install:copytree - Flag aliases match (
-i/--display,-S/--stream,-t/--only-tree,-r/--as-reference) - Default formats (XML is default)
- Format options (xml, json, markdown, tree)
- Git integration flags (
-m/--modified,-c/--changed) - Output destinations (clipboard, file, display, stream)
- All documented examples are runnable
Proposed Solution
Create systematic audit to verify:
- All documented flags exist in CLI implementation
- All CLI flags are documented
- Descriptions match between docs and
--help - Examples in README work as written
- Aliases are consistent
- Default values are correct
Affected Components
bin/copytree.js- CLI command definitionsREADME.md- Main documentationdocs/cli/copytree-reference.md- CLI reference docs
Implementation Approach
-
Create Automated Test:
- Create
tests/e2e/cli-help.test.js - Snapshot test for
copytree --helpoutput - Test for each command's help
- Verify flag presence
- Create
-
Manual Audit Checklist:
- Compare README "Frequently Used Flags" vs actual options
- Test each example from "Common Recipes"
- Verify all format options work
- Check flag aliases
- Verify default behaviors
-
Update as Needed:
- Fix discrepancies (prefer implementation over docs if both work)
- Add missing documentation
- Remove outdated flags from docs
- Update examples to match current behavior
Tasks
- Create
tests/e2e/cli-help.test.jswith snapshot tests for help output - Test
copytree --helpmatches README introduction - Test
copytree copy --helpmatches documented copy command flags - Test all 8 commands have help: profile:list, profile:validate, copy:docs, config:validate, config:inspect, cache:clear, install:copytree
- Verify all flags in "Frequently Used Flags" exist and work
- Test all examples from "Common Recipes" section
- Verify format options:
--format xml,--format json,--format markdown,--format tree - Verify git flags:
-m/--modified,-c/--changed <ref> - Verify output flags:
-i/--display,-o/--output,-S/--stream,--clipboard - Verify special flags:
-t/--only-tree,-r/--as-reference,--with-line-numbers,--with-git-status - Check that undocumented flags are intentional (internal/experimental)
- Update README if implementation is correct but docs are wrong
- Update CLI descriptions if docs are correct but implementation is unclear
- Add missing aliases if commonly needed
- Document any breaking changes from mismatches
Acceptance Criteria
- All documented flags exist in
copytree --helpoutput - All examples in README can be copy-pasted and work
- CLI help text matches README descriptions
- No undocumented flags appear in help (unless intentionally internal)
- Snapshot tests prevent future drift between docs and implementation
- Default values documented correctly (format: xml, output: clipboard)
- All flag aliases work as documented
- All 8 commands appear in help and work
Additional Context
Flags documented in README to verify:
--format <xml|json|markdown|tree>- Output format (default: xml)-t, --only-tree- Tree structure only-i, --display- Print to terminal--clipboard- Force clipboard-S, --stream- Stream output-C, --char-limit <n>- Character budget--with-line-numbers- Line numbers--info- File metadata--show-size- File sizes--with-git-status- Git status-r, --as-reference- Generate reference--always <pattern...>- Force include--dedupe- Remove duplicates--sort <path|size|modified|name|extension>- Sort files
Commands to verify:
copytree [path]- Main copy command (default)copytree profile:list- List profilescopytree profile:validate <name>- Validate profilecopytree cache:clear- Clear cachescopytree config:validate- Validate configcopytree config:inspect- Inspect configcopytree copy:docs- Copy documentationcopytree install:copytree- Installation wizard
Good Examples of CLI/Docs Parity:
- Prettier's CLI docs - Comprehensive flag documentation
- ESLint's CLI reference - Detailed examples
Metadata
Metadata
Assignees
Labels
priority-3 🌿Low impact polish/minor bugs/chores. Backlog if capacity allows.Low impact polish/minor bugs/chores. Backlog if capacity allows.