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

If you want to use one of the lmm sdk

pip install "glow-cli[openai]"

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"

Setup Configs and Secrets

Setup(CRUD) secrets

# to make secret token accessible to g command line
g secrets add SOME_TOKEN

g secrets list
g secrets remove SOME_TOKEN

Setup(CRUD) configs

g config add SOME_CONFIG "us-east-1"
g config list
g config remove SOME_CONFIG

🦙 LLM in CLI 💻

Why memorize commands when you can just ask?

Then you can try:

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

Or you can ask other 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"

✨ combine with other commands

Here's some good use cases to combine with other commands

g llm "shell into one of the pods: $(kubectl get pods) with keyword app1"
g llm "please summarize the commit message for $(git diff)"
g llm "can you explain the structure of this folder: $(ls -l)"

Choose other model

Use the following to choose other model

g configs add GLOW_LLM

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.3.tar.gz (14.7 kB view hashes)

Uploaded Source

Built Distribution

glow_cli-0.2.3-py3-none-any.whl (16.8 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