mkproj
is a simple and effective command-line interface (CLI) tool designed to help developers quickly create, visualize, and manage their project structures. With an intuitive interactive mode and flexible commands, mkproj
provides a fast way to organize your project files and folders.
Interactive Mode | Interactive Mode output |
---|---|
- Interactive Mode: Easily create and modify your project structure interactively using standard editing keys. Build your ideal layout with minimal friction.
- Text-Based Structure Creation: Create a project structure from a text file or piped input.
- Tree View: Display the current directory structure, with the option to include or exclude hidden files.
mkproj
is available on Homebrew for macOS and can be installed from source for other platforms.
To install mkproj
on macOS using Homebrew, run:
brew tap jobehi/mkproj
brew install mkproj
For other platforms, you can download and build the binary from the source code repository.
mkproj [command] [options]
- create: Create a project structure from a text file or piped input.
- tree: Display the current directory structure.
- help: Display this help message.
--root=<path>
: Specify the root directory for your project structure (default is the current directory).--file=<path>
: Provide a file that contains the project structure (used withcreate
).
By default, mkproj
starts in interactive mode, where you can manually build your project structure:
- Use standard editing keys to modify the structure.
- Press F2 to save and create the structure.
- Press Esc to exit without saving.
-
Start in Interactive Mode:
mkproj
This launches
mkproj
in an interactive environment where you can create and edit your project structure on the fly. -
Create a Project Structure from a Text File:
mkproj create --file=structure.txt --root=./new_project
This command reads the project structure from
structure.txt
and creates it in the specified root directory. -
Display the Current Directory Tree:
mkproj tree --root=./my_project
Displays the directory structure of
./my_project
without showing hidden files. -
Display the Directory Tree Including Hidden Files:
mkproj tree --root=./my_project --all
Displays the directory tree of
./my_project
, including hidden files.
The input structure can be created interactively or provided as a text file. You can use dashes (-
) for depth and suffix :file
to mark an entry as a file (for files with no extensions). For example:
project-root
- src
-- main.go
-- utils
--- helper.go
- README.md
- .gitignore:file
To set up mkproj
globally on macOS from the source code, follow these steps:
-
Clone the Repository:
git clone https://github.com/jobehi/mkproj.git cd mkproj
-
Build the Binary: Build the
mkproj
binary using Go:go build -o mkproj
-
Move the Binary to
/usr/local/bin
: Move the compiled binary to/usr/local/bin
to make it accessible globally:sudo mv mkproj /usr/local/bin/ sudo chmod +x /usr/local/bin/mkproj
-
Verify Installation: You can now use
mkproj
from anywhere in your terminal:mkproj help
Contributions are welcome! Please open an issue or a pull request on the GitHub repository to report bugs or suggest improvements. Refer to the Contributing Guidelines for more information.
mkproj
is released under the MIT License.