(Translated by https://www.hiragana.jp/)
GitHub - jobehi/mkproj: An Interactive CLI Tool to Setup Your Project Trees
Skip to content
/ mkproj Public

An Interactive CLI Tool to Setup Your Project Trees

License

Notifications You must be signed in to change notification settings

jobehi/mkproj

Repository files navigation

mkproj: An Interactive CLI Tool to Setup Your Project Trees 🌳

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.

Features

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.

Installation

mkproj is available on Homebrew for macOS and can be installed from source for other platforms.

Install mkproj on macOS using Homebrew

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.

Usage

Command Overview

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.

Options

  • --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 with create).

Interactive Mode

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.

Examples

  • 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.

Project Structure Input Format

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

Setup mkproj Globally From Source Code

To set up mkproj globally on macOS from the source code, follow these steps:

  1. Clone the Repository:

    git clone https://github.com/jobehi/mkproj.git
    cd mkproj
  2. Build the Binary: Build the mkproj binary using Go:

    go build -o mkproj
  3. 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
  4. Verify Installation: You can now use mkproj from anywhere in your terminal:

    mkproj help

Contributing

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.

License

mkproj is released under the MIT License.

About

An Interactive CLI Tool to Setup Your Project Trees

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages