#openai #bash #command #user-input #cli #explanation #command-line-tool

app bropilot

A fun and efficient Rust library to count tokens in text files using different tokenizers

6 releases

0.1.5 Mar 25, 2023
0.1.4 Mar 25, 2023

#5 in #explanation

Download history 1/week @ 2024-09-25 1/week @ 2024-10-30 1/week @ 2024-11-06

73 downloads per month

MIT/Apache

48KB
181 lines

bropilot

bropilot is a CLI tool that lets you write terminal commands in plain English. It is inspired by GitHub Copilot X's CLI functionality, which is currently on a waitlist. This tool uses OpenAI's GPT-3.5 model to generate bash commands and their explanations based on user input.

Installation

You can install bropilot through Cargo:

cargo install bropilot

Build Instructions

Clone the repository:

git clone https://github.com/yourusername/bropilot.git
cd bropilot

In the backend folder, create a file called .dev.vars and add your OpenAI API key:

OPENAI_KEY=your_openai_api_key_here

Run the Cloudflare Worker in the backend folder:

cd backend
wrangler run dev

Update the .env file in the parent directory with the worker URL:

WORKER_URL=https://your_worker_url_here

Build and run the CLI tool:

cd ..
cargo build --release
./target/release/bropilot

Usage

After installing, you can run it by simply typing bropilot followed by your query:

bropilot "print hello world"

The CLI will provide a shell command and a brief explanation. You can choose to run the command, revise your query, or cancel the operation.

Dependencies

~11–22MB
~323K SLoC

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy