Name | glow-cli JSON |
Version | 0.3.0 JSON |
download | |
home_page | |
Summary | Smart CLI tool for shell template |
upload_time | 2023-12-05 07:15:11 |
maintainer | |
docs_url | None |
author | |
requires_python | |
license | |
keywords | smart cli shell template |
VCS | |
bugtrack_url | |
requirements | No requirements were recorded. |
Travis-CI | No Travis. |
coveralls test coverage | No coveralls. |
# glow The glow command line interface. [![PyPI version](https://img.shields.io/pypi/v/glow-cli)](https://pypi.org/project/glow-cli/) [![📦 pypi](https://github.com/loopsocial/glow/actions/workflows/publish.yml/badge.svg)](https://github.com/loopsocial/glow/actions/workflows/publish.yml) ``` ________ ____ _ __ / ____/ / / __ \ | / / / / __/ / / / / / | /| / / / /_/ / /___/ /_/ /| |/ |/ / \____/_____/\____/ |__/|__/ ____________________________ __________________________________ ________________________________________ ``` ## 📦 Installation ```shell pip install glow-cli ``` You can set up configuration in `~/.glow/commands/<task>.yml` ## 🚀 Usage ```shell g list ``` ## 🦋 Templating Say you set up a config at "./commands/pod-shell.yml" ```yaml 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: ```shell g ./commands/pod-shell.yml --kw "app1" ``` Or you can store the configuration by ```shell g install ./commands/pod-shell.yml ``` Then you can run the command with: ```shell g pod-shell --kw "app1" ``` ## Setup Configs and Secrets ### Setup(CRUD) secrets ```shell # 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 ```shell 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: ```shell g llm "redub a.mp4 file with b.mp3, save to c.mp4 with fps 12" ``` Or you can ask other things in general: ```shell g llm "explain btree to me" ``` Or with certain flavor to the robot role ```shell 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 ```shell g llm "shell into one of the pods: $(kubectl get pods) with keyword app1" ``` ```shell g llm "please summarize the commit message for $(git diff)" ``` ```shell 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 ```
{ "_id": null, "home_page": "", "name": "glow-cli", "maintainer": "", "docs_url": null, "requires_python": "", "maintainer_email": "", "keywords": "smart cli,shell template", "author": "", "author_email": "\"Xiaochen Zhang (Ray)\" <ray@fireworkhq.com>", "download_url": "https://files.pythonhosted.org/packages/49/f5/e01877dcbedd611d60479bd9c88eb0d2e57808544fa773643112eb6e5a86/glow-cli-0.3.0.tar.gz", "platform": null, "description": "# glow\nThe glow command line interface.\n\n[![PyPI version](https://img.shields.io/pypi/v/glow-cli)](https://pypi.org/project/glow-cli/)\n[![\ud83d\udce6 pypi](https://github.com/loopsocial/glow/actions/workflows/publish.yml/badge.svg)](https://github.com/loopsocial/glow/actions/workflows/publish.yml) \n\n```\n ________ ____ _ __\n / ____/ / / __ \\ | / /\n / / __/ / / / / / | /| / /\n/ /_/ / /___/ /_/ /| |/ |/ /\n\\____/_____/\\____/ |__/|__/\n____________________________\n__________________________________\n________________________________________\n```\n\n## \ud83d\udce6 Installation\n```shell\npip install glow-cli\n```\n\nYou can set up configuration in `~/.glow/commands/<task>.yml`\n\n## \ud83d\ude80 Usage\n\n```shell\ng list\n```\n\n## \ud83e\udd8b Templating\nSay you set up a config at \"./commands/pod-shell.yml\"\n```yaml\ndescription: |\n Entering the shell of the 1st pod that matches the keyword\ncommand: |\n kubectl exec -it $(kubectl get pods | grep { kw } | head -n 1 | awk '{print $1}') -- /bin/bash\ninputs:\n kw:\n description: keyword to match\n type: str\n```\n\nyou can run the command with:\n```shell\ng ./commands/pod-shell.yml --kw \"app1\"\n```\n\nOr you can store the configuration by\n```shell\ng install ./commands/pod-shell.yml\n```\n\nThen you can run the command with:\n```shell\ng pod-shell --kw \"app1\"\n```\n\n## Setup Configs and Secrets\n### Setup(CRUD) secrets\n```shell\n# to make secret token accessible to g command line\ng secrets add SOME_TOKEN\n\ng secrets list\ng secrets remove SOME_TOKEN\n```\n### Setup(CRUD) configs\n```shell\ng config add SOME_CONFIG \"us-east-1\"\ng config list\ng config remove SOME_CONFIG\n```\n\n## \ud83e\udd99 LLM in CLI \ud83d\udcbb\n> Why memorize commands when you can just ask?\n\n\nThen you can try:\n```shell\ng llm \"redub a.mp4 file with b.mp3, save to c.mp4 with fps 12\"\n```\n\nOr you can ask other things in general:\n```shell\ng llm \"explain btree to me\"\n```\n\nOr with certain flavor to the robot role\n```shell\ng llm \"explain btree to me\" \"you are a poet return everything in homer style\"\n```\n\n### \u2728 combine with other commands\nHere's some good use cases to combine with other commands\n```shell\ng llm \"shell into one of the pods: $(kubectl get pods) with keyword app1\"\n```\n\n```shell\ng llm \"please summarize the commit message for $(git diff)\"\n```\n\n```shell\ng llm \"can you explain the structure of this folder: $(ls -l)\"\n```\n\n### Choose other model\nUse the following to choose other model\n```\ng configs add GLOW_LLM\n```\n", "bugtrack_url": null, "license": "", "summary": "Smart CLI tool for shell template", "version": "0.3.0", "project_urls": { "homepage": "https://github.com/loopsocial/glow", "repository": "https://github.com/loopsocial/glow" }, "split_keywords": [ "smart cli", "shell template" ], "urls": [ { "comment_text": "", "digests": { "blake2b_256": "17de214d348fdfaf5df46ec3bb11b5ec0e6bed6da02fb1f9c7f7d58d138b4261", "md5": "85919c3b2f7fb28061a33a2348f4024f", "sha256": "960074b9f47daa0acbca73864acc548cd8ae8f72121f0f478af99c4df88c3184" }, "downloads": -1, "filename": "glow_cli-0.3.0-py3-none-any.whl", "has_sig": false, "md5_digest": "85919c3b2f7fb28061a33a2348f4024f", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 16708, "upload_time": "2023-12-05T07:15:09", "upload_time_iso_8601": "2023-12-05T07:15:09.958795Z", "url": "https://files.pythonhosted.org/packages/17/de/214d348fdfaf5df46ec3bb11b5ec0e6bed6da02fb1f9c7f7d58d138b4261/glow_cli-0.3.0-py3-none-any.whl", "yanked": false, "yanked_reason": null }, { "comment_text": "", "digests": { "blake2b_256": "49f5e01877dcbedd611d60479bd9c88eb0d2e57808544fa773643112eb6e5a86", "md5": "20f4dce822205db179b0c939772fe066", "sha256": "c361d86654a8e9eebf834484ba4299af2c7e79249de9c1bc83048f23cdd6ad37" }, "downloads": -1, "filename": "glow-cli-0.3.0.tar.gz", "has_sig": false, "md5_digest": "20f4dce822205db179b0c939772fe066", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14533, "upload_time": "2023-12-05T07:15:11", "upload_time_iso_8601": "2023-12-05T07:15:11.029204Z", "url": "https://files.pythonhosted.org/packages/49/f5/e01877dcbedd611d60479bd9c88eb0d2e57808544fa773643112eb6e5a86/glow-cli-0.3.0.tar.gz", "yanked": false, "yanked_reason": null } ], "upload_time": "2023-12-05 07:15:11", "github": true, "gitlab": false, "bitbucket": false, "codeberg": false, "github_user": "loopsocial", "github_project": "glow", "github_not_found": true, "lcname": "glow-cli" }