/oxpilot

Your AI Copilot in Rust

Primary LanguageRustMIT LicenseMIT

oxpilot - rusty AI copilot

oxpilot is a CLI powered by LLM (currently Mistral-7B-Instruct-v0.2) written in Rust 🦀. It's built on top of candle, with aims to be minimalist, fast, and accessable (in terms of computing resource).

A rusty programming copilot

Install

Mac

Install using brew

brew update
brew install chenhunghan/homebrew-formulae/oxpilot

Upgrade to the latest

brew update
brew upgrade oxpilot

Linux and Windows

Go to releases for binaries.

Commands

Chat

Who doesn't want to chat with AI?

ox hi in Japanese

AI Commmit with LLM

I am very lazy at drafting a comprehensive commit message, why not make LLM genereate one for me according to git diff? Don't worry, ox will ask your confirmation before commit the changes/messages.

git add .
ox commit # proxy to `git commit` with generated message

ox

It will try to generate a commit message following Conventional Commits spec, however, LLM isn't perfect and you can always edit before commit.

Fun fact: most of commits in this repo are generated by ox itself.

Start the copilot server

Start a Github copilot-compatible server, see the this on how to configure the Copilot extensions in your editor to pointing to the copilot-compatible server.

ox serve

Goal of this project

The primary goal of this project is to teach (myself, and everyone else) idiomatic Rust, similar to mini-redis, thefore the code is overly heavily documented, there is an article introducing the core concepts I made a Copilot in Rust 🦀 , here is what I have learned, I recommend to read first, and PRs description are packed with design patterns used in the code base.

Release

git commit -am "release: version 0.1.0" --allow-empty
git push
git tag v0.1.0
git push --tags # will then trigger CI