github.com/shravanasati/hydra@v1.0.1-0.20240122045627-1082d2ed50d2/README.md (about) 1 # hydra 2 3 [![Continuous Integration](https://github.com/shravanasati/hydra/actions/workflows/integrate.yml/badge.svg)](https://github.com/shravanasati/hydra/actions/workflows/integrate.yml) 4 5 *hydra* is a command line utility for generating language-specific project structures. 6 7 ![python-init](assets/python_init.PNG) 8 9 ⏬ 10 11 ![python-dir](assets/python_dir.PNG) 12 13 <br> 14 15 ## ✨ Features 16 17 - Build project templates with just one command 18 - Support for seven different licenses 19 - Language-specific `.gitignore` file 20 - Configure default language and default license to work with 21 - Fast and reliable 22 23 <br> 24 25 ## ⚡️ Installation 26 27 **For Linux users:** 28 29 If you use an Arch based distro, 30 ``` 31 yay -S hydra-go 32 ``` 33 Or any other AUR helper would work. 34 35 Otherwise, 36 37 Execute the following command in bash: 38 39 ```bash 40 curl https://raw.githubusercontent.com/shravanasati/hydra/main/linux_install.sh > hydra_install.sh 41 42 chmod +x ./hydra_install.sh 43 44 bash ./hydra_install.sh 45 ``` 46 47 48 **For MacOS users:** 49 50 Execute the following command in bash: 51 52 ```bash 53 curl https://raw.githubusercontent.com/shravanasati/hydra/main/macos_install.sh > hydra_install.sh 54 55 chmod +x ./hydra_install.sh 56 57 bash ./hydra_install.sh 58 ``` 59 60 **For Windows users:** 61 62 Open Powershell **as Admin** and execute the following command: 63 ```powershell 64 Set-ExecutionPolicy Bypass -Scope Process -Force; (Invoke-WebRequest -Uri https://raw.githubusercontent.com/shravanasati/hydra/main/windows_install.ps1 -UseBasicParsing).Content | powershell - 65 ``` 66 67 To verify the installation of *hydra*, open a new shell and execute `hydra -v`. You should see output like this: 68 ``` 69 hydra 2.2.0 70 71 Version: 2.2.0 72 ``` 73 If the output isn't something like this, you need to repeat the above steps carefully. 74 75 76 77 <br> 78 79 ## 💡 Usage 80 This section shows how you can use *hydra*. 81 82 ### config 83 The `config` command is used to set or alter the hydra user configurations. 84 85 `$ hydra config {flags}` 86 87 The valid flags for config command are: 88 - `name` --> The name of the user. 89 It is used as the name of the copyright holder in the LICENSE file. 90 91 - `github-username` --> The Github username of the user. 92 It is used to initiate the modules in go. 93 94 - `default-lang` --> The default language for project initialisation. It is used in case the `lang` argument is not provided in the `init` command. Valid options for the `default-lang` flag are: 95 * go 96 * python 97 * web 98 * flask 99 * c 100 * c++ 101 * ruby 102 103 - `default-license` --> The default license for project creation. Valid values are: 104 * MIT 105 * GPL 106 * BSD 107 * APACHE 108 * EPL 109 * MPL 110 * UNI 111 112 Once hydra is installed, it is advised to run the following command to complete the configuration. 113 114 `$ hydra config --name "YOUR NAME" --github-username "YOUR GITHUB USERNAME"` 115 116 117 ### list 118 The `list` command is used to list supported languages, licenses and the hydra user configurations. 119 120 `$ hydra list <item>` 121 122 Valid options for the `item` argument are: 123 - langs --> Languages supported by hydra 124 - licenses --> Licenses supported by hydra 125 - configs --> The hydra user configurations 126 127 Example: `hydra list langs` 128 129 ### init 130 To create a new project structure using *hydra*, 131 execute: 132 133 `$ hydra init <project name> [lang]` 134 135 The `init` command initialises the project. 136 137 138 Valid options for the language argument are: 139 - python 140 - go 141 - web 142 - flask 143 - c 144 - c++ 145 - ruby 146 147 Example: `hydra init myProject python` 148 149 In case the `lang` argument is not provided, hydra falls back to the `default-lang` configuration. 150 151 You can view the [structures.md](structures.md) file to see the project structure hydra creates for every language it supports. 152 153 154 ### version 155 `$ hydra version` 156 157 The version command shows the version of *hydra* installed. 158 159 ### help 160 `$ hydra help` 161 162 Renders assistance for *hydra* on a terminal, briefly showing its usage. 163 164 <br> 165 166 ## ⏩ Change Log 167 The changes made in the latest version of hydra, *v2.2.0* are: 168 169 - Added flask (python web framework), C, C++, and ruby as language types for project initialisation 170 - Improved web initialisation 171 - Added support for Unilicense 172 - Changed the hydra config directory 173 174 View [CHANGELOG.md](CHANGELOG.md) for more information. 175 176 <br> 177 178 ## 🔖 Versioning 179 *hydra* releases follow semantic versioning, every release is in the *x.y.z* form, where: 180 - *x* is the MAJOR version and is incremented when a backwards incompatible change to hydra is made. 181 - *y* is the MINOR version and is incremented when a backwards compatible change to hydra is made, like changing dependencies or adding a new function, method, struct field, or type. 182 - *z* is the PATCH version and is incremented after making minor changes that don't affect hydra's public API or dependencies, like fixing a bug. 183 184 <br> 185 186 ## 📄 License 187 License 188 © 2021-Present Shravan Asati 189 190 This repository is licensed under the MIT license. See [LICENSE](LICENSE) for details. 191 192 <br> 193 194 ## 👥 Contribution 195 Pull requests are more than welcome. For more information on how to contribute to *hydra*, refer [CONTRIBUTING.md](CONTRIBUTING.md).