skeldir
v1.1.0
Published
CLI to generate directory for a project from pasted tree structure.
Readme
⚡︎ skeldir (Skeleton Directory)
A minimal CLI tool to quickly scaffold clean project directories from your pasted tree structure.
No clutter, no hassle — just your project ready to go.
💡 Naming:
skeldir= tree → directory (create dir) •skeldirnt= directory → tree (generate tree)
📚 Table of Contents
- Why skeldir?
- ✨ Features
- 📦 Installation
- 💡 Usage
- 📌 Examples
- 🌳 Tree Generation (unskeldir!)
- 📋 Template Management
- ⚙️ Configuration
- 🛠️ Options
- 🤝 Contributing
Why skeldir?
I created skeldir because I got tired of manually setting up project folders every time I start a new idea. Copy-pasting old templates felt clunky and often included unnecessary files or folders I didn't need.
AI can generate project layouts fast, but making all those files yourself is a hassle. skeldir takes the AI's folder tree and builds the whole project instantly. Paste, generate, and start coding.
✨ Features
- Instant scaffolding — Generate project folder structures from tree diagrams
- Language templates — Built-in templates for Flutter, Java, Python, C, C++, Node.js, React
- Smart parsing — Automatically handles root folders (no duplicate nesting)
- Git integration — Auto-initialize git repos
- .gitignore generation — Language-specific ignore files
- Template persistence — Save and reuse custom templates
- Tree generation — Generate tree structures from existing directories (unskeldir!)
- Config file — Customize defaults via
~/.skeldir.json - Cross-platform — Works on Windows, macOS, and Linux
📦 Installation
npm install -g skeldirOr locally:
npm install skeldir
npx skeldir <project-name> [options]💡 Usage
skeldir <project-name> [options]📌 Examples
Create a Python project with git and .gitignore:
skeldir my_app --python --gitCreate a React project with verbose output:
skeldir myReactApp --react --git --verboseUse a custom tree structure:
skeldir my_project --custom
# Paste your tree structure and press ENTERCreate with numbered prefixes:
skeldir my_project --custom --index🌳 Tree Generation (skeldirnt)
Generate a tree structure from an existing directory — perfect for documenting your project or creating templates!
# Generate tree from current directory
skeldir tree
# Generate tree from specific path
skeldir tree src
# Fun alias: skeldirnt (skeleton directory 'n tree)
skeldir skeldirnt my-project
# Save to file
skeldir tree . --output structure.txt
# Limit depth
skeldir tree . --max-depth 2
# Include hidden files
skeldir tree . --include-hiddenAutomatically ignores: node_modules, .git, dist, build, coverage, .next, .nuxt, target, bin, obj, .vscode, .idea
📋 Template Management
Save and reuse your custom templates:
# Save a custom template
skeldir template save my-template
# Paste your tree structure when prompted
# List all saved templates
skeldir template list
# Use a saved template
skeldir my-project --use-template my-template
# Delete a template
skeldir template delete my-template⚙️ Configuration
Customize skeldir behavior via ~/.skeldir.json:
# Show current configuration
skeldir config --show
# Enable automatic git initialization
skeldir config --set-auto-git true
# Set a default template
skeldir config --set-default-template nodeExample ~/.skeldir.json:
{
"autoGitInit": true,
"defaultTemplate": "node",
"alwaysIncludeReadme": true,
"customTemplatesPath": null
}🛠️ Options
Project Creation Options
| Option | Description |
| ------------------- | ------------------------------------------------ |
| --flutter | Generate Flutter folder structure |
| --java | Generate Java project |
| --python | Generate Python project |
| --c | Generate C project |
| --cpp | Generate C++ project |
| --node | Generate Node.js project |
| --react | Generate React project |
| --custom | Create from pasted directory tree |
| --use-template <name> | Use a saved custom template |
| --index | Prefix folders/files with numbered prefixes |
| --git | Initialize git repository |
| --no-gitignore | Skip .gitignore file generation |
| --verbose | Enable verbose logging |
| --debug | Enable debug logs (more detailed) |
Tree Generation Options
| Option | Description |
| ------------------- | ------------------------------------------------ |
| -o, --output <file> | Save tree output to a file |
| -d, --max-depth <n> | Maximum depth to traverse |
| -H, --include-hidden | Include hidden files/folders |
| -i, --ignore <patterns> | Comma-separated patterns to ignore |
Other Commands
| Command | Description |
| ------------------- | ------------------------------------------------ |
| -v, --version | Show version number |
| -h, --help | Display help |
🔄 Workflow Example
Clone an existing project structure:
# 1. Generate tree from existing project
skeldir tree existing-project --output my-tree.txt
# 2. Create new project from that tree
skeldir my-new-project --custom --git
# Paste the contents of my-tree.txt🤝 Contributing
Contributions are welcome! Whether it's fixing bugs, suggesting new features, or improving the docs — every bit helps.
🧭 Getting Started
1. Fork this repo
2. Clone your fork
git clone https://github.com/your-username/skeldir.git
cd skeldir3. Create your own branch
git checkout -b your-branch-name4. Install dependencies
npm install5. Make your changes
Please follow the current coding style and keep commits clean and descriptive.
6. Test your changes
npm test7. Pull recent changes from main branch
git pull origin main8. Push your branch
git push origin your-branch-name9. Submit a pull request
- Describe what you changed and why
- Link any related issues
📄 License
MIT
