From d53c20e7b660d19df10d2f5c004ec3a9adc027fe Mon Sep 17 00:00:00 2001 From: gabriel-azion Date: Tue, 12 Sep 2023 14:36:14 -0300 Subject: [PATCH] review readme --- README.md | 190 ++++++++++-------------------------------------------- 1 file changed, 34 insertions(+), 156 deletions(-) diff --git a/README.md b/README.md index 061e97ea..ac4a3c37 100644 --- a/README.md +++ b/README.md @@ -3,16 +3,24 @@ [![CLI Reference](https://img.shields.io/badge/cli-reference-green.svg)](https://github.com/aziontech/azion-cli/wiki/azion) [![Go Report Card](https://goreportcard.com/badge/github.com/aziontech/azion-cli)](https://goreportcard.com/report/github.com/aziontech/azion-cli) +**Azion CLI** is a user-friendly way to work with the Azion Edge Platform, allowing you to create and manage applications through simple commands. It makes possible the initialization, build, and deployment of applications, from simple static pages to different frameworks, such as: -The Azion CLI (command-line interface) is an open source tool that enables you to manage any Azion service via command line. Through it, you can manage all Azion products, create automations using CI/CD scripts or pipelines, provision multiple services that make up your application with a few commands, and also manage your Azion configurations as code. +- Next.js +- Vue +- Angular +- Astro +- Hexo +- Vite -The developer friendly way to interact with Azion! +Through it, you can manage all Azion products, create automation using CI/CD scripts or pipelines, provision multiple services that make up your application with a few commands, and also manage your Azion configurations as code. + +The developer-friendly way to interact with Azion! ## Quick links - [Downloading](#downloading) - [Building](#building) -- [Setup Autocomplete](#setup-autocomplete) +- [Setup Autocomplete](https://github.com/aziontech/azion-cli/wiki/Azion-CLI-autocompletion) - [How to Use](#How-to-Use) - [Commands Reference](https://github.com/aziontech/azion-cli/wiki/azion) - [Contributing](CONTRIBUTING.md) @@ -22,18 +30,20 @@ The developer friendly way to interact with Azion! ## Downloading ->**Attention**: if you've downloaded `azioncli` in an older version than 1.0.0, it's highly recommended to uninstall it before downloading `azion` cli. +>**Attention**: if you've downloaded `azioncli` in an older version than 1.0.0, it's highly recommended to uninstall it before downloading `azion` CLI. -There are two ways to download and use the `azion` CLI. -The first, is the regular way of cloning this repository and [building](#building) the project manually. -However, `azion` is also available as `homebrew`, `rpm`, `deb` and `apk` packages. +There are two ways to download and use the `azion` CLI: -To use `rpm`, `deb` and `apk` packages, please visit our [releases](https://github.com/aziontech/azion-cli/releases) page, and download the desired package. +- Cloning this repository and [building](#building) the project manually. +- Package managers, since `azion` is also available as `homebrew`, `rpm`, `deb` and `apk` packages. -To download azion CLI through Homebrew, run: +To use `rpm`, `deb` and `apk` packages, please visit our [releases](https://github.com/aziontech/azion-cli/releases) page, and download the desired package. -- `brew install aziontech/tap/azioncli` +To download azion CLI through Homebrew, run: +```sh +brew install aziontech/tap/azioncli +`````` ## Building Locally @@ -47,164 +57,28 @@ $ make cross-build --- -## Setup Autocomplete - -> Please verify if you have autocomplete enabled globally, otherwise the autocomplete for cli won't work - -## Dependencies zsh - -You need to install zsh-autosuggestions - -MacOs: - -```shell -brew install zsh-autosuggestions -``` - -Linux: - -```shell -git clone https://github.com/zsh-users/zsh-autosuggestions \${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions -``` - ---- - -## Installing autocomplete for azion cli only - -### MacOs / Linux - -Run -```shell -echo "autoload -U compinit; compinit" >> ~/.zshrc -``` -Then run -```shell -echo "source <(azioncli completion zsh); compdef _azioncli azioncli" >> ~/.zshrc -``` - -If you uninstall azion cli, please edit your `~/.zshrc` file and remove the line `source <(azioncli completion zsh); compdef _azioncli azioncli` - ---- - -## Installing autocomplete globally - -### MacOs - -Run: - -```shell -echo "autoload -U compinit; compinit" >> ~/.zshrc -``` - -Then open your `~/.zshrc` file, and add the following content to it - -```shell -if type brew &>/dev/null -then - FPATH="$(brew --prefix)/share/zsh/site-functions:${FPATH}" - - autoload -Uz compinit - compinit -fi -``` - -### Linux - -Open your `~/.zshrc` file and add the following content to it - -```shell -plugins=(zsh-autosuggestions) -```` - -If you have other plugins, just add zsh-zutosuggestions to the end. - -> Whether you chose to activate autocomplete globally or for azion cli only, the steps of each section should only be run once. After that, autocomplete will work every time you open a new terminal. - -### Dependencies bash - -You need to install bash-completion -MacOs: - -```shell -brew install bash-completion -``` - -Centos/RHEL 7: - -```shell -yum install bash-completion bash-completion-extras -``` - -Debian/Ubuntu: - -```shell -apt-get install bash-completion -``` - -Alpine: - -```shell -apk add bash-completion -``` - ---- - -## Installing autocomplete for azion cli only -### MacOs / Linux - -Run: - -```shell -echo "source <(azioncli completion bash)" >> ~/.bashrc -``` - -If you uninstall azion cli, please edit your `~/.bashrc` file and remove the line `source <(azioncli completion bash)` - ---- +## How to Use -## Installing autocomplete globally -### MacOS +### Authentication -Open your `~/.bashrc` file, and add the following content to it -```shell -BREW_PREFIX=$(brew --prefix) -[[ -r "${BREW_PREFIX}/etc/profile.d/bash_completion.sh" ]] && . ${BREW_PREFIX}/etc/profile.d/bash_completion.sh -``` +In order to perform network operations it is *mandatory* to provide [an authentication token](https://www.azion.com/en/documentation/products/accounts/personal-tokens/). -#### Linux +You can provide the token in two ways: -Run: +- Using `azion-cli token [tokenvalue]` command, which saves the token in a configuration file for further use: -```shell -echo "source /etc/profile.d/bash_completion.sh" >> ~/.bashrc ``` - -> Whether you chose to activate autocomplete globally or for azion cli only, the steps of each section should only be run once. After that, autocomplete will work every time you open a new terminal. - ---- -### Dependencies fish - -Run the command below once: - -```shell -echo "azioncli completion fish | source" >> ~/.config/fish/config.fish +$ azion -t ``` -If you uninstall azion cli, please edit your `~/.config/fish/config.fish` file and remove the line `azioncli completion fish | source` +- Using environment variable, which the token is cleared when the terminal is closed: -## How to Use - -In order to perform network operations it is *mandatory* to provide an authentication token. - -You can provide token in two ways: - -- Using azion-cli token command (this command saves the token in a configuration file for further use): -$ azion -t - -- Using environment variable (in this way the token will be cleared when the terminal is closed): +```sh $ export AZIONCLI_TOKEN= +``` +### Help You can just run `azion -h` and see it's options @@ -285,6 +159,10 @@ LEARN MORE Use 'azion --help' for more information about a command ``` +### Autocompletion + +It's possible to enable the autocompletion to be used with the `azion` CLI. To learn more about its settings and installation based on your OS, check the [autocompletion page](https://github.com/aziontech/azion-cli/wiki/Azion-CLI-autocompletion) + ## License This project is licensed under the terms of the [MIT](LICENSE) license.