UNPKG

henchman-cli

Version:

An all-in-one, interactive command-line tool that simplifies creating, setting up, and managing development projects like Flutter and Node.js while automating repetitive tasks.

284 lines (184 loc) β€’ 5.86 kB
# 🧌 Henchman: The Dev Sidekick You Didn’t Know You Needed. **Version 1.0.1** Henchman CLI is an all-in-one, interactive command-line tool designed to simplify the creation, setup, and management of development projects. Whether you’re working on Flutter, Node.js, or managing Git repositories, Henchman streamlines repetitive tasks, letting you focus on what matters mostβ€”writing great code. --- ## πŸš€ Features ### 1. **Interactive Menu** Henchman features an intuitive, arrow-selectable menu that makes navigation and task selection effortlessβ€”no more remembering lengthy commands. ### 2. **Project Creation** - **Node Projects**: - Empty: Create empty node project - Server: Create express server with dependencies - CLI: Create node CLI with dependencies - **Flutter Apps**: - Mobile: Create Flutter Android/iOS project with structure and dependencies - Web: Create Flutter Web project with structure and dependencies - Desktop: Create Flutter Windows/macOS/Linux project with structure and dependencies - Packages: Create Flutter package with structure. ### 3. **Project Structure Setup** - Automatically sets up directories and boilerplate code for Flutter and Node projects. - Installs required dependencies with a single command. ### 4. **Git Repository Management** - Initialize Git repositories with preconfigured `.gitignore` files and `README.md` templates. - Language specific `.gitignore` included for streamlined setup. ### 5. **SHA Key Retrieval** Retrieve SHA keys for Android development: - Debug SHA Key - Release SHA Key ### 6. **Simulator Management** - Start Android Emulators. - Launch iOS Simulators. ### 7. **Project Cleanup** Effortlessly clean up unused build files: - Node.js `node_modules` - Flutter build files - Python virtual environments files --- ## πŸ“– Usage ### Pre-requisites Ensure you have the following tools installed and added to your PATH: - **Node.js** and **npm** - **Flutter SDK** - **Git** - **Python** - **Keytool** (for retrieving SHA keys) Additionally, add these to your shell initialization script (e.g., `.bashrc`, `.zshrc`, `PATH`): #### For MacOS ```bash # Homebrew (Mac users) eval "$($(brew --prefix)/bin/brew shellenv)" # Android Emulator export ANDROID_SDK="<path-to-android-sdk>/emulator" # Java export JAVA_HOME="<path-to-java-home>" # Flutter export FLUTTER="<path-to-flutter-sdk>/bin" ``` ### Installation Henchman is distributed as an npm package: ```bash npm install -g henchman-cli ``` ### Running the CLI Simply run: ```bash henchman ``` Follow the interactive prompts to select your desired task. --- ## πŸ“‹ Menu Options ### **Project Creation** - Create a Node Project - Create a Flutter Application ### **Project Structure Setup** - Setup Flutter Project Structure - Setup Node Project Structure ### **Manage Git Repository** - Initialize Git Repository - Configure `.gitignore` and `README.md` ### **Retrieve SHA Keys** - Get Android Debug SHA Key - Get Android Release SHA Key ### **Start Simulators** - Start Android Emulator - Start iOS Simulator ### **Clean Projects** - Clean Node.js projects - Clean Flutter projects - Clean Python projects --- ## πŸ“‚ Project Structure Henchman automatically generates well-organized project structures for both Node and Flutter. For example: ### Express Project ``` project-name/ β”œβ”€β”€ controllers β”œβ”€β”€ core β”‚ β”œβ”€β”€ constants β”‚ β”œβ”€β”€ models β”‚ └── utils β”œβ”€β”€ docs β”œβ”€β”€ pages β”‚ β”œβ”€β”€ css β”‚ └── views └── routes ``` ### Flutter Application ``` project-name/ β”œβ”€β”€ android β”œβ”€β”€ ios β”œβ”€β”€ linux β”œβ”€β”€ macos β”œβ”€β”€ web β”œβ”€β”€ windows β”œβ”€β”€ assets β”‚ β”œβ”€β”€ anim β”‚ β”œβ”€β”€ fonts β”‚ └── images β”œβ”€β”€ docs └── lib β”œβ”€β”€ core β”‚ β”œβ”€β”€ constants β”‚ β”œβ”€β”€ error β”‚ β”œβ”€β”€ models β”‚ └── utilities β”œβ”€β”€ pages β”œβ”€β”€ providers β”œβ”€β”€ screens └── widgets ``` --- ## 🌟 Command Reference ### General Usage ``` henchman [options] [command] ``` #### Options: - `-V, --version` Output the version number - `-h, --help` Display help for a command --- ### Commands #### `configure` Configure 🧌 Henchman. #### `create [config]` Create a new project for a selected language. - **[config] options**: `flutter`, `node`, `git` #### `cleanup [config]` Cleanup projects for a selected language in input subfolders. - **[config] options**: `flutter`, `node`, `python` #### `setup [config]` Setup folder structure for a selected language. - **[config] options**: `flutter`, `node`, `git` #### `start [config]` Start a process. - **[config] options**: `sim` (`android`, `ios`) #### `get [config]` Get some information. - **[config] options**: `sha` (`debug`, `release`) #### `help [command]` Display help for a command. --- ## 🀝 Contributing We welcome contributions from the community! To contribute: 1. Fork the repository. 2. Create a new branch for your feature or bug fix. 3. Submit a pull request with a detailed description of changes. Please adhere to our [Code of Conduct](CODE_OF_CONDUCT.md) when interacting with the project. --- ## πŸ”’ Security If you discover any security vulnerabilities, please report them via [yashashm.dev@gmail.com](mailto:yashashm.dev@gmail.com). We take security issues seriously and appreciate your efforts to responsibly disclose them. Read more at [SECURITY](SECURITY.md) --- ## πŸ“œ Code of Conduct This project is governed by a [Code of Conduct](CODE_OF_CONDUCT.md). By participating, you agree to uphold a welcoming and inclusive environment. --- ## πŸ“ License Henchman CLI is licensed under the [MIT License](LICENSE). --- Thank you for using Henchman! πŸŽ‰ Happy coding!