Skip to content

Commit

Permalink
docs: Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
qbart authored Sep 22, 2023
1 parent da0a208 commit e162710
Showing 1 changed file with 35 additions and 72 deletions.
107 changes: 35 additions & 72 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,96 +1,59 @@
# cli

Install via homebrew (first time):
```
brew tap Selleo/cli
brew install selleo
```
## Installation

Upgrade for new release:
```
brew upgrade selleo
```

or download binary for your system.

## AWS
### Install via asdf

### Dev
```shell
asdf plugin add selleo https://github.com/selleo/asdf-cli.git
asdf install selleo latest
asdf global selleo latest

You can fetch secrets from AWS store parameters and run the command:

```
selleo aws dev --region eu-central-1 --path /office/dev/api npm run start
selleo version
```

### Generators
update:
```shell
asdf install selleo latest
```

Generators are used to pre-generate templates that you can furhter adjust.
### Install via homebrew

#### Terraform
If you don't use `asdf`, you can use `brew`.

Generate app environment:
First time:
```
selleo gen terraform app \
--tf-cloud-org selleo \
--tf-cloud-workspace ict-til-production \
--region eu-west-1 \
--stage production \
--namespace til \
--name api \
--domain til.selleo.com \
--subdomain api
brew tap Selleo/cli
brew install selleo
```

#### GitHub workflows

Generate staging frontend workflow:
Upgrade for new release:
```
selleo gen github frontend \
--workdir . \
--domain staging.example.com \
--region eu-west-1 \
--app_id office \
--stage staging
brew upgrade selleo
```

Generate production frontend workflow from subfolder and trigger build only on git tag push:
```
selleo gen github frontend \
--workdir packages/office \
--domain example.com \
--region eu-west-1 \
--app_id office \
--stage production \
--tag-release
```
## Commands

Generate staging backend workflow with no extra task running at the end:
```
selleo gen github backend \
--workdir . \
--domain beta.example.com \
--subdomain api \
--region eu-west-1 \
--ecs-cluster rails-1234 \
--ecs-service api \
--stage staging
```
Run `selleo` to see available commands:

```shell
selleo

Generate production backend workflow with extra task run at the end:
# example commands
selleo adr new --title "Choose database"
selleo rand uuid4
```
selleo gen github backend \
--workdir . \
--domain example.com \
--subdomain api \
--region eu-west-1 \
--ecs-cluster rails-1234 \
--ecs-service api \
--stage production \
--one-off migrate \
--tag-release

Check `-h` help for command:

```shell
selleo rand bytes -h
selleo crypto hmac sha256 -h
# ...
```

Some

## About Selleo

![selleo](https://raw.githubusercontent.com/Selleo/selleo-resources/master/public/github_footer.png)
Expand Down

0 comments on commit e162710

Please sign in to comment.