Modern CLI to explore, filter and copy project content with consistency and simplicity.
- 🌳 Generate project tree (
tree) with token estimation &--dry-runmode - 📋 Copy file contents (
copy-content/cpc) with flexible path inputs (space string, commas, semicolons, multiline, JSON array, space paths) - 🚚 Smart output delivery (robust PowerShell file clipboard integration with safe text fallback)
- 🩺 Diagnose local environment (
doctorfor fast non-destructive check,doctor --deepfor live clipboard verification) - 🔀 Git-aware file selection (
--changed,--staged,--untracked,--all-changes) - ⚙️ Centralized config via
.shtk.json - 📦 JSON and YAML output formats
npm install -g @byetevinn/shtoolkitnpx @byetevinn/shtoolkit tree# Space-separated arguments
shtk cpc src docs README.md
# Single space-separated string
shtk cpc "src docs README.md"
# Commas or semicolons
shtk cpc "src, docs, README.md"
shtk cpc "src; docs; README.md"
# JSON array (for complex or ambiguous paths)
shtk cpc '["src", "docs", "README.md"]'
# Quoted path with spaces
shtk cpc '"docs/my folder" README.md'# Analyze tree structure without copying or creating files
shtk tree --dry-run
# Output pretty JSON or YAML
shtk tree --pretty
shtk tree --yaml# Fast, non-destructive environment check
shtk doctor
# Live end-to-end clipboard diagnostic test
shtk doctor --deepBoth tree and copy-content automatically manage clipboard delivery:
- Small outputs copy directly as text.
- Large outputs create temporary files and attach the real file object to your Windows/WSL clipboard using verified PowerShell automation (
Set-Clipboard -LiteralPath& WinForms fallback). - If file clipboard operations fail,
shtoolkitautomatically falls back to copying content as plain text, ensuring your data is never lost.
Built by Stevan Padilha
MIT