Skip to content

Commit

Permalink
Update docs (#163)
Browse files Browse the repository at this point in the history
  • Loading branch information
baksetercx authored Jan 4, 2025
1 parent 1d82b08 commit 6b7e8e7
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 22 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# cli

Command Line Interface tool for creating, building and securing Elvia applications ⚡
**3lv** – the Command Line Interface tool for creating, building and securing Elvia applications ⚡

## 🚀 Features

Expand All @@ -10,8 +10,8 @@ Command Line Interface tool for creating, building and securing Elvia applicatio
- **Create** new projects from Elvia templates, with all batteries included.
- **Generate** a GitHub Actions workflow for building and deploying to Elvia's clusters on Azure, Google Cloud and ISS.

The GitHub Actions composite actions at [core-github-actions-templates](https://github.com/3lvia/core-github-actions-templates) are wrappers around many of the CLI commands.
Therefore it's useful to use the CLI when debugging or testing Elvias actions, since you can very easily reproduce the same commands locally.
The GitHub Actions composite actions at [core-github-actions-templates](https://github.com/3lvia/core-github-actions-templates) are wrappers around many of the `3lv` commands.
Therefore it's useful to use `3lv` when debugging or testing Elvia's actions, since you can very easily reproduce the same commands locally.

## 📚 Documentation

Expand Down
2 changes: 1 addition & 1 deletion docs/configuration.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## ⚙️ Configuration

The Elvia CLI support a configuration file (`3lv.yml`) to store some default values for the commands.
`3lv` supports a configuration file (`3lv.yml`) to store some default values for the commands.
Using a configuration file means you can avoid typing the same options every time you run a command.
The configuration file is optional and should be placed in the root of your repository.

Expand Down
18 changes: 10 additions & 8 deletions docs/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,28 +24,28 @@ Ensure you have Go and Make installed:
sudo apt install golang make
```

Clone the repository and install the CLI:
Clone the repository and install `3lv`:

```bash
git clone [email protected]:3lvia/cli
cd cli
sudo make install
make install # requires sudo
```

**macOS**: If `GOOS` and `GOARCH` are not properly set, you can use this command:

```bash
# for Intel macs
sudo make install-macos-amd64
make install-macos-amd64
# for M1 and newer macs
sudo make install-macos-arm64
make install-macos-arm64
```

### Running tests

Unit tests are written in Go and can be run with the following command:

```bash
```
make test
```

Expand All @@ -55,10 +55,12 @@ For example, to run the tests for the `build` command:
```bash
./tests/build/run_tests.sh
```
Note that the end-to-end tests run the `3lv` command directly.
This means that if you have changed some code and want to test it locally, you will need to install from source again (e.g. `make install`).

### Linter

We use the linter [golangci-lint](https://golangci-lint.run) and can be run with the following command:
We use the linter [golangci-lint](https://golangci-lint.run), which can be run with the following command:

```bash
make lint
Expand All @@ -68,8 +70,8 @@ Linter configuration can be found in `.golangci.yml`.

### Releasing a new version

Increase the number in the `VERSION` file, adhering to [semver](https://semver.org)
Before the CLI is stable at `v1.0.0`, breaking changes will happen in minor versions (and possibly also patch versions).
Increase the number in the `VERSION` file, adhering to [semver](https://semver.org).
Before `3lv` is stable at `v1.0.0`, breaking changes will happen in minor versions (and possibly also patch versions).
Therefore, we will not increase the major version until `v1.0.0` is released.

When a commit increasing the version is merged or pushed to `trunk`, a GitHub Action will automatically create a new release with the new version number as the tag.
5 changes: 3 additions & 2 deletions docs/examples.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
## 📖 Examples

The CLI assumes that you are in the git repository of the project you are working on.
`3lv` assumes that you are in the git repository of the project you are working on.

### Init

<details>

<summary>Expand</summary>

#### Create a new 3lv configuration file
#### Create a new `3lv` configuration file

```bash
# you will be prompted for input
Expand All @@ -17,6 +17,7 @@ The CLI assumes that you are in the git repository of the project you are workin

This will create a `3lv.yml` file in the root of your repository.
The advantage of having a configuration file is that you can avoid typing the same options every time you run a command.
See [here](configuration.md) for more information.

### Build

Expand Down
8 changes: 4 additions & 4 deletions docs/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ Supported platforms:
- **macOS** (both Intel and M-series)
- **Windows**

We stronlgy recommend using [Windows Subsystem for Linux (WSL)](https://docs.microsoft.com/en-us/windows/wsl/install) if you are on Windows.
We strongly recommend using [Windows Subsystem for Linux (WSL)](https://docs.microsoft.com/en-us/windows/wsl/install) if you are on Windows.
This is because we depend on software tools (see [requirements](requirements.md)) that are much easier to install on a Linux distribution than on Windows.

Note however that the CLI works perfectly fine on Windows, as long as you manage to install the aforementioned required software yourself.
Note however that `3lv` works perfectly fine on Windows, as long as you manage to install the aforementioned required software yourself.

### Linux/WSL and macOS

Download the tarball file for your platform (and optionally the MD5 cheksum) from the [releases page](https://github.com/3lvia/cli/releases),
Download the tarball file for your platform (and optionally the MD5 checksum) from the [releases page](https://github.com/3lvia/cli/releases),
extract it and move the binary to a directory in your PATH.

If you are using WSL, you can install the Linux binary.
Expand Down Expand Up @@ -43,7 +43,7 @@ certutil -hashfile 3lv-windows-amd64.msi MD5

### Upgrades

To upgrade the CLI, simply run this command:
To upgrade `3lv`, simply run this command:

```bash
3lv upgrade
Expand Down
8 changes: 4 additions & 4 deletions docs/requirements.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## 📋 Requirements

To use every part of the 3lv CLI, you need to have these dependencies installed:
To use every part of `3lv`, you need to have these dependencies installed:

- [git](https://git-scm.com/downloads): used for several commands.
- [Docker](https://docs.docker.com/engine/install): used for building containers.
Expand All @@ -9,9 +9,9 @@ To use every part of the 3lv CLI, you need to have these dependencies installed:
- [Trivy](https://aquasecurity.github.io/trivy): used for scanning containers.
- [Azure CLI](https://docs.microsoft.com/en-us/cli/azure/install-azure-cli): used for pushing containers to Azure Container Registry and deploying containers to Azure Kubernetes Service.
- [Google Cloud SDK](https://cloud.google.com/sdk/docs/install): used for deploying containers to Google Kubernetes Engine.
- [cookiecutter](https://cookiecutter.readthedocs.io/en/stable/installation.html): used for creating new projects; if [pipx](https://pipx.pypa.io/stable) is installed, the CLI will prompt you to install cookiecutter for you.
- [cookiecutter](https://cookiecutter.readthedocs.io/en/stable/installation.html): used for creating new projects; if [pipx](https://pipx.pypa.io/stable) is installed, `3lv` prompt you to install cookiecutter for you.

**Any of these dependencies can be skipped if you dont't use the subcommands that require them.**
**Any of these dependencies can be skipped if you don't use the subcommands that require them.**

### Pushing to registries

Expand All @@ -20,7 +20,7 @@ If you want to push to a registry, you need to be authenticated to that registry
#### Azure Container Registry

This is Elvia's default registry.
The CLI will automatically log you in if you have the Azure CLI installed.
`3lv` will automatically log you in if you have the Azure CLI installed.

#### GitHub Container Registry

Expand Down

0 comments on commit 6b7e8e7

Please sign in to comment.