{"id":14155828,"url":"https://github.com/gptscript-ai/clio","last_synced_at":"2025-09-11T04:38:44.454Z","repository":{"id":248753006,"uuid":"827052836","full_name":"gptscript-ai/clio","owner":"gptscript-ai","description":"Your friendly and safe CLI Copilot","archived":false,"fork":false,"pushed_at":"2024-09-04T20:39:58.000Z","size":105,"stargazers_count":277,"open_issues_count":22,"forks_count":29,"subscribers_count":10,"default_branch":"main","last_synced_at":"2025-07-02T05:05:21.147Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gptscript-ai.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-07-10T23:41:51.000Z","updated_at":"2025-06-26T14:26:28.000Z","dependencies_parsed_at":"2024-09-06T05:22:43.422Z","dependency_job_id":"1ae64dcf-100c-46e7-9df9-355680a24134","html_url":"https://github.com/gptscript-ai/clio","commit_stats":null,"previous_names":["gptscript-ai/clio"],"tags_count":24,"template":false,"template_full_name":null,"purl":"pkg:github/gptscript-ai/clio","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gptscript-ai%2Fclio","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gptscript-ai%2Fclio/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gptscript-ai%2Fclio/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gptscript-ai%2Fclio/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gptscript-ai","download_url":"https://codeload.github.com/gptscript-ai/clio/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gptscript-ai%2Fclio/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274578427,"owners_count":25310955,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-11T02:00:13.660Z","response_time":74,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-17T08:05:01.941Z","updated_at":"2025-09-11T04:38:44.435Z","avatar_url":"https://github.com/gptscript-ai.png","language":"Go","funding_links":[],"categories":["others","Go"],"sub_categories":[],"readme":"# Clio - Your friendly and safe CLI Copilot\n\nClio is an AI-powered copilot designed to help you with DevOps-related tasks using CLI programs. It leverages OpenAI's capabilities to provide intelligent assistance directly from your command line.\n\n\u003e **Note:** Clio is designed to safely perform actions. It won't do anything without your confirmation first.\n\n[![asciicast](https://asciinema.org/a/W9kebisfR3UnaAX1GxxulFXjc.svg)](https://asciinema.org/a/W9kebisfR3UnaAX1GxxulFXjc?t=1)\n\n## Features\n\n- **Kubernetes Management**: Interact with your Kubernetes clusters using `kubectl`, `helm`, and other CLIs.\n- **AWS Integration**: Manage your AWS resources using the `aws` CLI.\n- **Azure Integration**: Manage your Azure resources using the `az` CLI.\n- **Google Cloud Platform Integration**: Manage your GCP resources using the `gcloud` CLI.\n- **DigitalOcean Integration**: Manage your DigitalOcean resources using the `doctl` CLI.\n- **Exoscale Integration**: Manage your Exoscale resources using the `exo` CLI.\n- **EKS Management**: Manage your EKS clusters in AWS using `eksctl` and `aws` CLI.\n- **GitHub Integration**: Interact with your GitHub repositories using the `gh` CLI.\n- **Easily Customizable**: Add new capabilities with no code.\n\n## Installation\n\nOn MacOS and Linux, you can use Homebrew:\n\n```bash\nbrew install gptscript-ai/tap/clio\n```\n\nOn Windows:\n\n```shell\nwinget install gptscript-ai.clio\n```\n\nAlternatively, you can clone the repository and build the project manually:\n\n```bash\ngit clone https://github.com/gptscript-ai/clio.git\ncd clio\nmake build\n```\n\n## Usage\n\nTo start Clio, simply run:\n\n```bash\nclio\n```\n\n## Authentication\n\nClio will prompt you to authenticate with GitHub to allow access to the AI model powering Clio. You can also set a custom personal OpenAI API key and base URL using environment variables,\nrefer to `clio --help` for specific environment variable names.\n\n## Extending\n\n### Agents\n\nClio is composed of multiple internal agents. There are several built-in agents that provide functionality for interacting with Kubernetes, AWS, GCP, GitHub, etc., but you can easily add your own agents to extend the functionality of Clio. The built-in agents are located in the [agents](./agents) directory, with each file being a separate agent. To create a custom agent, you must write a new [GPTScript](https://docs.gptscript.ai) and place it in the `$XDG_CONFIG_HOME/clio/agents` directory.\n\n| Operating System | Custom Agent Path                           |\n|------------------|---------------------------------------------|\n| macOS            | `~/Library/Application Support/clio/agents` |\n| Linux            | `~/.config/clio/agents`                     |\n| Windows          | `~/AppData/Local/clio`                      |\n\n### Custom Agent\n\nA custom agent is any GPTScript with the requirement that it minimally must contain the following lines\n\n```gptscript\nchat: true\ncontext: github.com/gptscript-ai/clio/context\n```\nYou can refer to the [GPTScript documentation](https://docs.gptscript.ai) for all the capabilities of GPTScripts, but for now the below example is typically all you need to know.\n\n#### Example Custom Agent - GoReleaser\n\nFor this example, we will add a custom agent that is specialized for GoReleaser 2. We will create a file called `goreleaser.gpt`. The finished example is available in the [examples](./examples/goreleaser.gpt) directory.\n\nThe GPTScript starts with a metadata block that defines the name of the agent, a description, and the required context and chat fields. It is then followed by the prompt that will tell Clio how to behave when this agent is invoked.\n\n```gptscript\nName: GoReleaser\nDescription: Agent for GoReleaser 2 using the goreleaser CLI\nChat: true\nContext: github.com/gptscript-ai/clio/context\n\nYou are an expert at goreleaser. You can run the goreleaser CLI and help manage the goreleaser config file.\n\nRules:\n1. Before changing the config, always show goreleaser config to the user for confirmation. After they agree, then write to disk.\n2. Make sure \"version: 2\" line is always in the goreleaser config.\n3. If the user asks to build, do a snapshot build.\n4. Always search the internet for relevant information when asked a question or to do a task.\n\nFirst ask the user what would they like to do with regards to GoReleaser.\n```\n\nTo test this agent out you can run `clio goreleaser.gpt`. After testing the agent, you can modify the text if you don't like the exhibited behavior. There is no defined format for the prompt. The fact that the example has the structure with \"Rules\" in it is just a convention but not technically required.\n\nTo make the agent even more useful, you can extend the agent to have dynamic contextual information. To do this, we are going to add another \"context tool\" to the agent. Context tools add capabilities to the agent by prepending the output of the tool to the prompt.\n\nIn the below example, we add a new line for `context: additional-environment` to the metadata block. We then define the `additional-environment` context tool. This tool will show the user the current goreleaser version, the JSONSchema for the goreleaser config file, and the help output for the goreleaser CLI and the build subcommand. It will also show the user the current goreleaser config file if it exists.\n\n```gptscript\nName: GoReleaser\nDescription: Agent for GoReleaser 2 using the goreleaser CLI\nChat: true\nContext: github.com/gptscript-ai/clio/context\nContext: additional-environment\n\nYou are an expert at goreleaser. You can run the goreleaser CLI and help manage the goreleaser config file.\n\nRules:\n1. Before changing the config, always show goreleaser config to the user for confirmation. After they agree, then write to disk.\n2. Make sure \"version: 2\" line is always in the goreleaser config.\n3. If the user asks to build, do a snapshot build.\n4. Always search the internet for relevant information when asked a question or to do a task.\n\nFirst ask the user what would they like to do with regards to GoReleaser.\n\n---\nName: additional-environment\n\n#!/bin/bash\n\nif ! command -v goreleaser; then\n    echo 'Inform the user goreleaser is not installed or available on the path'\nelse\n    goreleaser --version || true\n\n    echo 'The JSONSchema for .goreleaser.yaml is as follows:'\n    goreleaser jsonschema || true\n\n    echo Additional CLI help\n    echo\n    goreleaser --help || true\n    goreleaser build --help || true\n\n    for i in .goreleaser.yaml .goreleaser.yml; do\n        if [ -e $i ]; then\n            echo\n            echo \"The current goreleaser config in ./$i:\"\n            echo\n            echo '```yaml'\n            cat $i\n            echo '```'\n        fi\n    done\nfi\n```\n\nThat is now our finished agent. You can place the `goreleaser.gpt` file in the `$XDG_CONFIG_HOME/clio/agents` directory and then the next time you run `clio` you will see your agent in the list of agents, and it can be referenced by doing `@goreleaser \u003cyour question\u003e`.\n\n## License\n\nThis project is licensed under the Apache License 2.0. See the [LICENSE](LICENSE) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgptscript-ai%2Fclio","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgptscript-ai%2Fclio","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgptscript-ai%2Fclio/lists"}