Skip to main content

Build your Team's CLI

Project description

hexagon

Make your team's knowledge truly accessible, truly shared, and truly empowering by creating your own CLI.

01_ci-cd Code style: black

hexagon setup example


Getting Started

Install hexagon

pip install hexagon

Create your teams CLI

Either use our template repo or create a YAML like the following

cli:
  custom_tools_dir: .  # relative to this file
  name: Test CLI
  command: tc

envs:
  - name: dev
    alias: d
  - name: qa
    alias: q

tools:

  - name: google
    alias: g
    long_name: Google
    description: Open google
    type: web
    envs:
      dev: google.dev
      qa: google.qa
    action: open_link

  - name: hello-world
    alias: hw
    long_name: Greet the world
    type: shell
    action: echo "Hello World!"

Install the CLI

Run hexagon and select the CLI installation tool

Options

Theming

Hexagon supports 3 themes for now:

  • default (some nice colors and decorations)
  • disabled (no colors and no decorations)
  • result_only (with colors but only shows the result logs)

This can be specified by the envvar HEXAGON_THEME, i.e.,

# assuming you installed a CLI with command tc
HEXAGON_THEME=result_only tc

Development

Pre-requisites

pip install pipenv

Run:

# start a shell
pipenv shell
# install hexagon dependencies
pipenv install --dev
# run it
python -m hexagon

Unit Tests:

pytest -svv tests/

E2E Tests:

# first generate the transalation files
.github/scripts/i18n/build.sh
# run tests
pytest -svv tests_e2e/

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

hexagon-0.59.0.tar.gz (74.0 kB view hashes)

Uploaded Source

Built Distribution

hexagon-0.59.0-py3-none-any.whl (77.7 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