Generate complete project folders in seconds
npx treemk --text "src/index.js
src/app.js
tests/test.js
README.md" -o ./myappnpx treemk --json-input '{"src":["index.js","app.js"],"tests":["test.js"]}' -o ./myappnpx treemk -i structure.txt -o ./myapp# Use directly (recommended)
npx treemk --help
# Or install globally
npm install -g treemknpx treemk --template node -o ./my-api --boilerplate --install --git-initnpx treemk --template react -o ./my-react-app --boilerplate# Save once
npx treemk --text "src/server.js
src/routes/api.js
tests/test.js" --template-save my-api
# Reuse forever
npx treemk --template-use my-api -o ./new-apinpx treemk -i structure.txt --previewsrc/index.js
src/components/App.jsx
tests/test.js
package.json
my-app/
βββ src/
β βββ index.js
β βββ components/
β βββ App.jsx
βββ package.json
{
"src": {
"components": ["App.jsx"],
"index.js": null
},
"package.json": null
}Automatically generates working code for:
- server.js β Express server ready to run
- route.js β RESTful API routes
- model.js β Database models
- test.js β Jest test setup
- .env β Environment variables template
- .gitignore β Comprehensive ignore rules
- Dockerfile β Docker configuration
- And more!
-i, --input <file> # File path (works from anywhere!)
-o, --output <path> # Where to create (default: ./output)
-b, --boilerplate # Add smart code templates
-h, --help # Show help--template <name> # Use: react, node, python
--template-save <name> # Save for reuse
--template-use <name> # Load saved template
--template-list # Show all templates
--template-remove <name> # Delete template--text "<structure>" # Pass structure directly
--json-input '<json>' # Pass JSON directly-g, --git-init # Initialize git
--git-commit # Make first commit
--git-push # Push to GitHub (needs gh CLI)--install # Auto npm/pip install
--preview # Show tree preview
-u, --from-url <url> # Fetch from URL
-d, --dry-run # Preview without creatingnpx treemk --text "src/server.js
src/routes/users.js
src/routes/products.js
src/models/User.js
tests/api.test.js
.env
.gitignore
package.json" -o ./my-service -b --install -gnpx treemk --template python -o ./my-python-app -b --install --git-init# File in Downloads folder? No problem!
npx treemk -i structure.txt -o ./app
# File on Desktop? Works!
npx treemk -i ~/Desktop/project.txt -o ./appnpx treemk --template node \
-o ./api \
--boilerplate \
--install \
--git-init \
--git-commitCreate treemk.config.json in your project folder:
{
"output": "./app",
"boilerplate": true,
"gitInit": true,
"install": true
}Then just run:
npx treemk --template node~/.treemk/templates/ - Your saved templates live here
"Cannot find file"
- Try absolute path:
/home/user/structure.txt - Or just filename if in Downloads/Documents/Desktop
- Use
--textto avoid files entirely!
"No input provided"
# Use one of these:
npx treemk --text "src/index.js"
npx treemk -i file.txt
npx treemk --template node
cat file.txt | npx treemk -o ./app- Node.js 16+ (check:
node --version) - npm comes with Node.js
- Optional:
ghCLI for GitHub push
See [QuickStart.md] for step-by-step guide.
MIT License - Free to use for everyone!
# Fastest ways to create projects:
npx treemk --template node -o ./app -b # Node.js
npx treemk --template react -o ./app -b # React
npx treemk --template python -o ./app -b # Python
# No file needed:
npx treemk --text "src/index.js..." -o ./app
# Save template once, use forever:
npx treemk -i my-structure.txt --template-save my-template
npx treemk --template-use my-template -o ./new-projectMade for developers who value speed! β‘