All-In-One Development CLI Tools Multi-platform Marketplace
Project description
Mercado
All-In-One Development CLI Tools Multi-platform Marketplace
Stop memorizing whether that's apt install
or brew
or any other package manager that takes too long whenever only to get an outdated tool - and use mercado
instead!
All the most used tools by developers like docker
, terraform
, and kubectl
.
- Supports different types of installations
- GitHub releases
- Hashicorp products
- URL fetching
- Customized shell scripts
- Multi-platform multi-architectures installations
- Install the latest artifact or a specific version
- HTTP calls with retry mechanismand timeouts
- Archive unpacking
- Elaborated logs with timestamps of every step in the process
- CI first
- Every artifact is verified on a daily basis
- README is dynamically generated so docs can't get broken
Supported Tools
$ mercado list --names-only --all
Mercado tools
┏━━━━━━━━━━━━┓
┃ Name ┃
┡━━━━━━━━━━━━┩
│ aws │
│ compose │
│ consul │
│ cosign │
│ docker │
│ gh │
│ helm │
│ k3d │
│ kind │
│ kubectl │
│ minikube │
│ packer │
│ terraform │
│ terragrunt │
│ tfsec │
│ trivy │
│ vagrant │
│ vault │
│ waypoint │
└────────────┘
Install
python3 -m pip install mercado
How to use
$ mercado list --verbose
Mercado tools
┏━━━━━━━━━━━━┳━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ Name ┃ Vendor ┃ Installed ┃
┡━━━━━━━━━━━━╇━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
│ compose │ GitHub │ ✅ (/home/yuvalg/.docker/cli-plugins/docker-compose 2.17.3) │
│ gh │ GitHub │ ✅ (/home/yuvalg/.mercado/gh 2.28.0) │
│ kind │ GitHub │ ✅ (/home/yuvalg/.mercado/kind 0.18.0) │
│ minikube │ GitHub │ ✅ (/home/yuvalg/.mercado/minikube 1.30.1) │
│ terragrunt │ GitHub │ ⏫ (/home/yuvalg/.mercado/terragrunt 0.42.5) │
│ trivy │ GitHub │ ⏫ (/home/yuvalg/.mercado/trivy 0.32.1) │
├────────────┼────────────┼─────────────────────────────────────────────────────────────┤
│ consul │ Hashicorp │ ⏫ (/home/yuvalg/.mercado/consul 1.13.1) │
│ terraform │ Hashicorp │ ✅ (/home/yuvalg/.mercado/terraform 1.4.6) │
│ vagrant │ Hashicorp │ ⏫ (/home/yuvalg/.mercado/vagrant 2.3.2) │
│ vault │ Hashicorp │ ✅ (/home/yuvalg/.mercado/vault 1.13.2) │
├────────────┼────────────┼─────────────────────────────────────────────────────────────┤
│ kubectl │ URLFetcher │ ⏫ (/usr/local/bin/kubectl 1.18.3) │
├────────────┼────────────┼─────────────────────────────────────────────────────────────┤
│ aws │ Shell │ ✅ (/home/yuvalg/.mercado/aws 2.11.16) │
│ docker │ Shell │ ⏫ (/usr/bin/docker 20.10.12) │
│ helm │ Shell │ ⏫ (/home/yuvalg/.mercado/helm 3.11.0) │
└────────────┴────────────┴─────────────────────────────────────────────────────────────┘
$ mercado install gh
[05/01/23 19:19:10] Looking for the latest version of 'gh'
Getting installer for tool 'gh' with version v2.28.0 for linux and x86_64
[05/01/23 19:19:11] Installing 'gh'...
[05/01/23 19:19:12] Downloading 'gh' to /tmp/gh_2.28.0_linux_amd64.tar.gz (size: 10.1 MB)
Downloading... ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100% 0:00:00
[05/01/23 19:19:13] Unpacking /tmp/gh_2.28.0_linux_amd64.tar.gz to /tmp/gh_2.28.0_linux_amd64.tar
[05/01/23 19:19:14] Copying /tmp/gh_2.28.0_linux_amd64.tar/gh_2.28.0_linux_amd64/bin/gh to /home/yuvalg/.mercado/gh
👍 'gh' version v2.28.0 is installed
$ mercado is-latest docker
👎 'docker' version 'v23.0.5' is available! (current: 20.10.12)
$ mercado show minikube
Name: minikube
Status: ✅
Local Version: 1.30.1
Path: /home/yuvalg/.mercado/minikube
Remote Version: v1.30.1
$ mercado list --label k8s --with-labels --all
Mercado tools
┏━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━┓
┃ Name ┃ Labels ┃ Installed ┃
┡━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━┩
│ helm │ k8s │ ⏫ │
│ k3d │ k8s,docker,orchestration │ ❌ │
│ kind │ k8s,docker,orchestration │ ✅ │
│ kubectl │ k8s │ ⏫ │
│ minikube │ k8s,orchestration │ ✅ │
└──────────┴──────────────────────────┴───────────┘
Contribute
$ TERM='' make -s help
Usage:
make <target>
code
verify run all verifications
test run tests
format run formatter
lint run linter
artifact
install install package locally
dist generate package artifacts
docs generate documentation
deploy deploy Python package to PyPI
general
clean clean environment
Test
The tests are running with pytest inside of a docker-compose container
make test
# Run a specific test file with TEST=</path/to/file>
TEST=./tests/test_github.py make test
# Run a tests matching an expression TEST_FUNC=<expression>
TEST_FUNC="invalid" make test
# Add more verbose logs
LOGLEVEL=debug make test
Run locally
poetry run mercado --help
Install dist locally
make install
mercado --help
Run GHA
I use nektos/act tool to run the Git Hub Action locally.
act -j <JOB>
In order to run a specific test, set the appropriate OS and environment variable
act -j test --env TEST_FUNC=k3d --matrix os:ubuntu-latest
When local execution does not help, we can enable a remote debug with tmate
gh workflow run Test --ref <branch_name> -f debug_enabled=true
Generate docs
- Install dist locally
- Run inside virtualenv
make docs
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.