Skip to main content

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       ┃
┡━━━━━━━━━━━━┩
│ compose    │
│ consul     │
│ cosign     │
│ docker     │
│ gh         │
│ helm       │
│ k3d        │
│ kind       │
│ kubectl    │
│ minikube   │
│ packer     │
│ terraform  │
│ terragrunt │
│ tfsec      │
│ trivy      │
│ vagrant    │
│ vault      │
│ waypoint   │
└────────────┘

Install

python -m pip install mercado

How to use

$ mercado list --verbose

                                       Mercado tools                                        
┏━━━━━━━━━━━━┳━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ Name        Vendor      Installed                                                      ┃
┡━━━━━━━━━━━━╇━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
│ compose     GitHub       (/home/yuvalgold/.docker/cli-plugins/docker-compose 2.13.0) │
│ gh          GitHub       (/home/yuvalgold/.mercado/gh 2.25.1)                        │
│ kind        GitHub       (/home/yuvalgold/.mercado/kind 0.18.0)                      │
│ minikube    GitHub       (/home/yuvalgold/.mercado/minikube 1.29.0)                  │
│ terragrunt  GitHub       (/home/yuvalgold/.mercado/terragrunt 0.42.5)                │
├────────────┼────────────┼────────────────────────────────────────────────────────────────┤
│ consul      Hashicorp    (/usr/local/bin/consul 1.13.1)                              │
│ terraform   Hashicorp    (/home/yuvalgold/.mercado/terraform 1.4.4)                  │
│ vagrant     Hashicorp    (/home/yuvalgold/.mercado/vagrant 2.3.2)                    │
│ vault       Hashicorp    (/home/yuvalgold/.mercado/vault 1.13.1)                     │
├────────────┼────────────┼────────────────────────────────────────────────────────────────┤
│ kubectl     URLFetcher   (/home/yuvalgold/.mercado/kubectl 1.25.3)                   │
├────────────┼────────────┼────────────────────────────────────────────────────────────────┤
│ docker      Shell        (/usr/bin/docker 23.0.1)                                    │
│ helm        Shell        (/home/yuvalgold/.mercado/helm 3.11.0)                      │
└────────────┴────────────┴────────────────────────────────────────────────────────────────┘
$ mercado install gh

[03/31/23 17:18:48] Looking for the latest version of 'gh'                                                                                                                                                 
[03/31/23 17:18:49] Getting installer for tool 'gh' with version v2.25.1 for linux and x86_64                                                                                                              
                    Installing 'gh'...                                                                                                                                                                     
[03/31/23 17:18:50] Downloading 'gh' to /tmp/gh_2.25.1_linux_amd64.tar.gz (size: 10.1 MB)                                                                                                                  
Downloading... ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100% 0:00:00
[03/31/23 17:18:51] Unpacking /tmp/gh_2.25.1_linux_amd64.tar.gz to /tmp/gh_2.25.1_linux_amd64.tar                                                                                                          
                    Copying /tmp/gh_2.25.1_linux_amd64.tar/gh_2.25.1_linux_amd64/bin/gh to /home/yuvalgold/.mercado/gh                                                                                     
👍       'gh' version v2.25.1 is installed
$ mercado is-latest docker

👎       'docker' version 'v23.0.2' is available! (current: 23.0.1)
$ mercado show minikube

Name: minikube
Status: ✅
Local Version: 1.29.0
Path: /home/yuvalgold/.mercado/minikube
Remote Version: v1.29.0
$ 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. By default, act runs on a slim container image, for docker-compose usage the base image is replaced.

act --platform=ubuntu-latest=lucasalt/act_base:latest -j <JOB>

Generate docs

  1. Install dist locally
  2. 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.

Source Distribution

mercado-0.1.5.tar.gz (13.5 kB view hashes)

Uploaded Source

Built Distribution

mercado-0.1.5-py3-none-any.whl (14.4 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page