An open API service indexing awesome lists of open source software.

https://github.com/tchiunam/axolgo-cli

Axolotl CLI in Golang
https://github.com/tchiunam/axolgo-cli

aws cli gcp go golang

Last synced: 6 months ago
JSON representation

Axolotl CLI in Golang

Awesome Lists containing this project

README

          

# axolgo-cli, the Axolotl CLI Library in Golang
#### Release



Version


Release Date


PkgGoDev

Go Version
Language
File Count
Repository Size

#### Code Quality



Go


codecov


CodeQL


Go Report Card

#### Activity



Last Commit


Closed Issues


Closed Pull Requests

#### License



License: MIT


FOSSA Status


This is the CLI library of the Axolotl series in Golang. Command is
designed to fit daily operational usage and the sub-command is
added for better experience. You may configure **axolgo** through
configuration file or command line parameters.

Go package: https://pkg.go.dev/github.com/tchiunam/axolgo-cli

## Use it with your Go module
To add as dependency for your package or upgrade to the latest version:
```console
go get github.com/tchiunam/axolgo-cli
```

To upgrade or downgrade to a specific version:
```console
go get github.com/tchiunam/axolgo-cli@v1.2.3
```

To remove dependency on your module and downgrade modules:
```console
go get github.com/tchiunam/axolgo-cli@none
```

See 'go help get' or https://golang.org/ref/mod#go-get for details.

## Build
Download the source and run:
```console
go build -o axolgo
```

See 'go help build' or https://golang.org/ref/mod#go-build for details.

## Install
To install latest version:
```console
go install github.com/tchiunam/axolgo-cli@latest
```

To build and install version in module-aware mode:
```console
go install github.com/tchiunam/axolgo-cli@v1.2.3
```

See 'go help install' or https://golang.org/ref/mod#go-install for details.

## Run test
To run test:
```console
go test ./...
```

To run test with coverage result:
```console
go test -coverpkg=./... ./...
```

## Examples
### AWS
To update database cluster parameter group:
```console
axolgo aws rds modifyDBClusterParameterGroup --name --parameter-file
```

To describe EC2 instances with given Instance IDs:
```console
axolgo aws ec2 describeInstances --instance-id --instance-id
```

To describe EC2 instances with given Private IP Addresses:
```console
axolgo aws ec2 describeInstances --private-ip-address 127.0.0.1 --private-ip-address 127.0.0.2
```
### GCP
To list all compute engine instances in a zone:
```console
axolgo gcp compute listInstances --project proj1 --zone asia-east1-a
```

To list compute engine instances with the given ID:
```console
axolgo gcp compute listInstances --project proj1 --zone asia-east1-a --id 7452065390813417482
```

### Cryptography
To encrypt a message:
```console
axolgo cryptography encrypt --key-file secret.key --message "Galaxy is a big space where there are many planets and stars."
```
You will be prompted to enter the passphrase and message if you don't provide them as parameters:
```console
axolgo cryptography encrypt
Enter passphrase:
Enter message to be encrypted. Enter a new line and press Ctrl+D to finish:

```

To decrypt a message:
```console
axolgo cryptography decrypt --key-file secret.key --message 5602259f17f41c7a1289d26c4cc540bdfe939a93d4f01f4f6830739f2488c04e7875890280d966a3509217b73e290c2bcdbbf2b8676395bd87ae000dcac8343ac3cf3e389968e185f96810302947ea6809d62dfee404e318d2
```
You will be prompted to enter the passphrase and message if you don't provide them as parameters:
```console
axolgo cryptography decrypt
Enter passphrase:
Enter message to be decrypted. Enter a new line and press Ctrl+D to finish:

```

## Test report
## Code Coverage graph
[![Code Coverage graph](https://codecov.io/gh/tchiunam/axolgo-cli/branch/main/graphs/tree.svg?token=R38VYBN1AL)](https://app.codecov.io/gh/tchiunam/axolgo-cli)

---
#### See more
1. [axolgo-lib](https://github.com/tchiunam/axolgo-lib) for the base library
2. [axolgo-cloud](https://github.com/tchiunam/axolgo-cloud) for using cloud library (AWS SDK and GCP API)

## License
[![FOSSA Status](https://app.fossa.com/api/projects/custom%2B32310%2Fgithub.com%2Ftchiunam%2Faxolgo-cli.svg?type=large)](https://app.fossa.com/projects/custom%2B32310%2Fgithub.com%2Ftchiunam%2Faxolgo-cli?ref=badge_large)