github.com/hazelops/ize@v1.1.12-0.20230915191306-97d7c0e48f11/DOCS.md (about)

     1  # Documentation
     2  ## Installation:
     3  ### To install the latest version via homebrew (MacOS only):
     4  ##### 1. Install [Homebrew](https://brew.sh/)
     5  ##### 2. Run the following commands:
     6  ```shell
     7  brew tap hazelops/ize
     8  ```
     9  
    10  ```shell
    11  brew install ize
    12  ```
    13  
    14  Now you can run `ize` from command shell by typing `ize` in console.
    15  
    16  #### 4. Update:
    17  4.1 Uninstall previous version:
    18  
    19  ```shell
    20  brew uninstall ize
    21  ```
    22  
    23  4.2 Update version in brew repo: `
    24  
    25  ```shell
    26  brew tap hazelops/ize
    27  ```
    28  
    29  4.3 Install:
    30  
    31  ```shell
    32  brew install ize
    33  ```
    34  
    35  ### Installation via public apt repository URL (Ubuntu):
    36  ##### 1. To add public apt repository run:
    37   ```shell
    38  echo "deb [trusted=yes] https://apt.fury.io/hazelops/ /" | sudo tee /etc/apt/sources.list.d/fury.list
    39  ```
    40  
    41  ##### 2. After this, you should update information. Run:
    42  ```shell
    43  sudo apt-get update
    44  ```
    45  
    46  ##### 3. To install the latest version of `ize` app, you should run:
    47  ```shell
    48  sudo apt-get install ize 
    49  ```
    50  
    51  ##### 4. If you wish to install certain version of the `ize` you should add version like this:
    52   ```shell
    53  sudo apt-get install ize=<version>
    54   ```
    55  
    56  ##### 6. To remove `ize` app - run this command:
    57  ```shell
    58  sudo apt-get purge ize
    59  ```
    60  
    61  ### Installation via Scoop (Windows only)
    62  #### Prerequisites:
    63  You must install Scoop (command-line installer for Windows). To install Scoop see the following [manual](https://github.com/ScoopInstaller/Scoop#installation)
    64  
    65  To install `ize` with Scoop:
    66  
    67  1. Install `git` with Scoop
    68  ```shell
    69  scoop install git
    70  ```
    71  2. Add bucket with the `ize` source:
    72  
    73  ```shell
    74  scoop bucket add ize https://github.com/hazelops/scoop-ize.git
    75  ```
    76  2. Install ize:
    77  
    78  ```shell
    79  scoop install ize
    80  ```
    81  
    82  
    83  ### Installation from source:
    84  #### Prerequisites:
    85  - GO version should be 1.16+
    86  - `GOPATH` environment variable is set to `~/go`
    87  
    88  To install Ize from source download code or clone it from this repo. After this you should run:
    89  
    90  ```shell
    91  go mod download
    92  make install
    93  ```
    94  
    95  
    96  ### Autocomplete:
    97  You could use integrated option to add autocompletion to Ize commands (bash, fish, zsh, powershell). In this manual we will describe it only for zsh and bash.
    98  
    99  To add autocompletion script, use the following manual:
   100  
   101  ##### 1. ZSH:
   102  If shell completion is not already enabled in your environment you will need to enable it. You should execute the following once:
   103  
   104  ```shell
   105  echo "autoload -U compinit; compinit" >>  ~/.zshrc
   106  ```
   107  
   108  To load completions for every new session, execute once:
   109  
   110  ###### 1.1 macOS:
   111  ```shell
   112  ize gen completion zsh > /usr/local/share/zsh/site-functions/_ize
   113  ```
   114  
   115  ###### 1.2 Linux:
   116  You will need root privileges.
   117  
   118  ```shell
   119  sudo zsh
   120  ```
   121  Input your root password and run:
   122  
   123  ```shell
   124  ize gen completion zsh > "${fpath[1]}/_ize"
   125  ```
   126  
   127  To take effect for this setup you should run `source ~/.zshrc` or simply restart shell.
   128  
   129  
   130  ##### 2. Bash:
   131  Autocompletion script depends on the `bash-completion` package.
   132  
   133  If it is not installed already, you can install it via your OS’s package manager.
   134  
   135  To load completions for every new session, you should execute once:
   136  
   137  ###### 2.1 MacOS:
   138  ```shell
   139  ize gen completion bash > /usr/local/etc/bash_completion.d/ize
   140  ```
   141  
   142  ###### 2.2 Linux:
   143  You will need root privileges.
   144  
   145  ```shell
   146  sudo bash
   147  ```
   148  Input your root password and run:
   149  
   150  ```shell
   151  ize gen completion bash > /etc/bash_completion.d/ize
   152  ```
   153  
   154  To take effect for this setup you should run `source ~/.bashrc` or simply restart shell.