Skip to content

CptIdea/mkdt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mkdt

make directory tree

A minimalist CLI tool to generate directory structures from text input. Stop creating folders manually — describe your layout and let mkdt build it instantly.

Installation

go install github.com/CptIdea/mkdt@latest

Description

mkdt parses plain text descriptions of file structures and creates matching directories/files. Perfect for:

  • Quickly scaffolding projects
  • Replicating folder hierarchies from docs/chat
  • Automating repetitive directory creation

Supports:
✅ Nested folders/files
✅ Comments in templates
✅ "..."-like placeholders
✅ Parsing decorators
✅ Dry-run mode (preview changes)
✅ Clipboard input

Example Input Formats

# Simple structure
project/
  src/
    main.go
  .gitignore
# With ASCII art
app/
├── config/
│   └── settings.yaml
└── scripts/
    └── deploy.sh

Usage

From stdin:

echo '
src/
  main.go
  internal/
    utils.go  # Helper functions
' | mkdt

From clipboard (requires xclip/pbpaste):

mkdt -c

From a file:

mkdt -f template.txt

Dry-run (preview):

cat structure.txt | mkdt generate --dry-run

Full options:

mkdt --help

About

CLI tool for creating a directory tree

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages