Skip to content

Latest commit

 

History

18 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🧰 shtoolkit

Modern CLI to explore, filter and copy project content with consistency and simplicity.

🇧🇷 Leia em Português


✨ Features

  • 🌳 Generate project tree (tree) with token estimation & --dry-run mode
  • 📋 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 (doctor for fast non-destructive check, doctor --deep for live clipboard verification)
  • 🔀 Git-aware file selection (--changed, --staged, --untracked, --all-changes)
  • ⚙️ Centralized config via .shtk.json
  • 📦 JSON and YAML output formats

📦 Installation

Global

npm install -g @byetevinn/shtoolkit

Using npx

npx @byetevinn/shtoolkit tree

🚀 Quick Usage

📋 Flexible Path Inputs (cpc)

# 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'

🌳 Tree & Dry Run

# Analyze tree structure without copying or creating files
shtk tree --dry-run

# Output pretty JSON or YAML
shtk tree --pretty
shtk tree --yaml

🩺 Diagnostics

# Fast, non-destructive environment check
shtk doctor

# Live end-to-end clipboard diagnostic test
shtk doctor --deep

📚 Documentation


📋 Smart Output Delivery & Text Fallback

Both 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, shtoolkit automatically falls back to copying content as plain text, ensuring your data is never lost.

👤 Author

Built by Stevan Padilha


📝 License

MIT

About

No description, website, or topics provided.

Resources

Stars

4 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages