Skip to content

byetevinn/shtoolkit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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)
  • 📋 Copy file contents (copy-content / cpc)
  • ⚙️ Centralized config via .shtk.json (for tree)
  • 🔍 Ignore rules by name, folder and glob
  • 📦 JSON and YAML output
  • 📊 Detailed statistics
  • 🚫 Robust error handling

📦 Installation

Global

npm install -g @byetevinn/shtoolkit

Using npx

npx @byetevinn/shtoolkit tree

🚀 Commands

🌳 Tree

Generate project structure.

shtk tree

👉 Full docs: tree


📋 Copy Content (cpc)

Copy file contents from one or more paths.

shtk cpc src

👉 Full docs: copy-content


⚙️ Init

Initialize configuration file.

shtk init

👉 Full docs: init


📚 Documentation


⚙️ Configuration

Run:

shtk init

This creates a .shtk.json file used by the tree command.

ℹ️ Note: copy-content does NOT use .shtk.json — it always follows the paths provided.


🧠 Ignore Rules

names

Ignore files/folders anywhere

"names": ["node_modules", ".git"]

filesIn

Ignore files inside specific folders

"filesIn": ["screenshots", "src/temp/uploads"]

patterns

Glob support

"patterns": ["*.log", "*.tmp"]

📊 Example Output

JSON

{
  "name": "project",
  "type": "folder",
  "children": []
}

YAML

name: project
type: folder
children: []

📈 Stats Example

📊 Copy Content Result

📁 Total Files : 23
✅ Processed   : 23
⏭ Skipped     : 0
❌ Errors      : 0
📄 Total Lines : 1213

🧪 Use Cases

  • Prepare context for AI (ChatGPT, etc)
  • Generate project documentation
  • Analyze codebase structure
  • Debug file content

🛠 Roadmap

  • Markdown output
  • --flat flag
  • .gitignore integration
  • Multi-directory support

👤 Author

Built by Stevan Padilha


📝 License

MIT

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors