This cli tool acts as an AI assistant, responding with relevant CLI commands for the given user query. It interacts with Cloudflare's API to provide command-line instructions tailored to the user's needs.
Before using this tool, ensure you have Rust installed.
Clone this repository to your local machine:
git clone https://github.com/lulzx/copilot.git
cd copilot
-
Set the required environment variables:
export CF_API_TOKEN="your_cloudflare_api_token" export CF_ACCOUNT_ID="your_cloudflare_account_id"
-
Run the tool with your query:
cargo run -- "query"
Replace
query
with your actual query.
Suppose you want to know how to list all DNS records for a domain. You can run:
cargo run -- "how to get today's date?"
The tool will provide the relevant CLI command and explanation. For example:
Command: date +'%Y-%m-%d'
Explanation: The 'date' command with the format option '+%Y-%m-%d' will display the current date in the format 'YYYY-MM-DD'.
You'll then have the option to execute the provided command.
This project is licensed under the MIT License - see the LICENSE file for details.
Built using Rust.
Inspired by Akash's cli-copilot