Skip to content

A CLI tool you can pipe code and then ask for changes, add documentation, etc, using the OpenAI API.

Notifications You must be signed in to change notification settings

joshbainbridge/aibro

Repository files navigation

AiBro

This is your own little coding bro, immersed in the world of AI, crypto, and all other types of over hyped tech trends. You can pipe it code and request changes, add documentation, etc. This can be useful when combined with editors that support piping text like Helix.

605870

AiBro uses the OpenAI HTTP interface to answere queries. You will need to setup an OpenAI account and acquire an authentication key before getting a responce.

Environment variables:

  • OPENAI_API_KEY: API key for authentication. Alternatively this can be set or overriden using a command argument. See the usage section below.
  • AIBRO_DEFAULT_PROMPT: Optional default fallback prompt for common requests when piping in code. For example 'return code with documentation'.

Installation

Either setup a rust toolchain manually, or if you are using macOS and have Nix installed, use the provided Nix flake to create a development environment:

nix develop

Installation of the CLI command can then be done using cargo:

cargo install --path .

Usage

Usage: aibro [OPTIONS] [PROMPT]...

Arguments:
  [PROMPT]...
          Input prompt [override: $AIBRO_DEFAULT_PROMPT]

Options:
  -b, --bro <BRO>
          Selected aibro persona
          
          [default: coder]

          Possible values:
          - coder:   Helpful coding assistant
          - chad:    Over hyped Chad GPT bro
          - grandma: Old lady grandma bro

  -m, --model <MODEL>
          Selected ML model
          
          [default: gpt3]

          Possible values:
          - gpt3: GPT 3.5 turbo model
          - gpt4: GPT 4.0 model

  -t, --temperature <TEMPERATURE>
          Model temperature
          
          [default: 0.3]

  -a, --auth <AUTH>
          Authentication key [override: $OPENAI_API_KEY]

  -h, --help
          Print help (see a summary with '-h')

  -V, --version
          Print version

About

A CLI tool you can pipe code and then ask for changes, add documentation, etc, using the OpenAI API.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published