Skip to main content

Smart CLI tool for shell template

Project description

glow

The glow command line interface.

PyPI version 📦 pypi

   ________    ____ _       __
  / ____/ /   / __ \ |     / /
 / / __/ /   / / / / | /| / /
/ /_/ / /___/ /_/ /| |/ |/ /
\____/_____/\____/ |__/|__/
____________________________
__________________________________
________________________________________

📦 Installation

pip install glow-cli

You can set up configuration in ~/.glow/commands/<task>.yml

🚀 Usage

g list

🦋 Templating

Say you set up a config at "./commands/pod-shell.yml"

description: |
  Entering the shell of the 1st pod that matches the keyword
command: |
  kubectl exec -it $(kubectl get pods | grep { kw } | head -n 1 | awk '{print $1}') -- /bin/bash
inputs:
  kw:
    description: keyword to match
    type: str

you can run the command with:

g ./commands/pod-shell.yml --kw "app1"

Or you can store the configuration by

g install ./commands/pod-shell.yml

Then you can run the command with:

g pod-shell --kw "app1"

🦙 LLM in CLI 💻

Why memorize commands when you can just ask?

You can setup the environment variables in the following file: eg, with OPENAI_API_KEY:

~/.glow/.env

Then you can try:

g code "redub a.mp4 file with b.mp3, save to c.mp4 with fps 12"

Or you can ask things in general:

g llm "explain btree to me"

Or with certain flavor to the robot role

g llm "explain btree to me" "you are a poet return everything in homer style"

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

glow-cli-0.2.1.tar.gz (11.8 kB view details)

Uploaded Source

Built Distribution

glow_cli-0.2.1-py3-none-any.whl (13.6 kB view details)

Uploaded Python 3

File details

Details for the file glow-cli-0.2.1.tar.gz.

File metadata

  • Download URL: glow-cli-0.2.1.tar.gz
  • Upload date:
  • Size: 11.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.18

File hashes

Hashes for glow-cli-0.2.1.tar.gz
Algorithm Hash digest
SHA256 893fc1cce03112a864c4f11de77c12afb3c6f6a3bae19f85b4bae6da668c4300
MD5 516092f6caa3d8067645c394ed02218d
BLAKE2b-256 870b5f2bd9a4f4a31dea5361d38ceb0ddf87e90f622df57e137a2fe71036a8c6

See more details on using hashes here.

Provenance

File details

Details for the file glow_cli-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: glow_cli-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 13.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.18

File hashes

Hashes for glow_cli-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d1d849df14acce02c5a81230a0986b58966fd67f334975336aa58120a3a2ad47
MD5 ba976f018e96740454d8fa042db313fb
BLAKE2b-256 bc3615d5141c16f76ba7a8f5ee5b97b443b16996235af579edc94b83acfcb4f2

See more details on using hashes here.

Provenance

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