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 PyPI - Version PyPI - Python Version PyPI - License PyPI - Downloads

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.62.0.tar.gz (94.2 kB view details)

Uploaded Source

Built Distribution

hexagon-0.62.0-py3-none-any.whl (80.1 kB view details)

Uploaded Python 3

File details

Details for the file hexagon-0.62.0.tar.gz.

File metadata

  • Download URL: hexagon-0.62.0.tar.gz
  • Upload date:
  • Size: 94.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.6

File hashes

Hashes for hexagon-0.62.0.tar.gz
Algorithm Hash digest
SHA256 11aea04910ebe2f1138c42c769790fa54e963a6f490982ac06976cd400fec491
MD5 b98b30e6cafe2babfba0576a3663d400
BLAKE2b-256 f3ced131f144640ccd5e86c31986cd956344b105264c6719396232a9a447903c

See more details on using hashes here.

File details

Details for the file hexagon-0.62.0-py3-none-any.whl.

File metadata

  • Download URL: hexagon-0.62.0-py3-none-any.whl
  • Upload date:
  • Size: 80.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.6

File hashes

Hashes for hexagon-0.62.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5a956cb4c8f6ef8c23779541a65641bd115ee061d16b84639839a81a8131bb35
MD5 500a7fb20f7d699433ecac686d65b023
BLAKE2b-256 9abba3d54ead7d4c8410d73a439701b1c4e34e8f609fc8fa20dde21150f85548

See more details on using hashes here.

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