✨✨ ChatGPT on your system ✨✨
The OpenAI Assistant API handles agents, conversation history, vector stores, and running tools which traditionnaly requires a lot of boilerplate code to set up.
Our goal with OAI is to provide a simple and intuitive interface to interact with this API.
The current version offers a CLI interface, but more will come in the future.
- Chat with up-to-date documentation with managed vector stores
- Ask question about your codebase by leveraging tools
- Ask your assistant to write code directly to files
- Let your assistant manage and access your system
- Configure and test an assistant for another integration
- Whatever you can think of
Just run oai
from the command line to interact
OAI currently relies on bun, and it needs to be installed on your system in order to run the project.
A later version may allow using the node
runtime, but for now, only bun
is supported.
git clone [email protected]:pAIrprogio/gpt-assistant-cli-playground.git
bun install
- Create a project on the OpenAI Platform
- Create an API Key
- Add your OpenAI API key to a .env file using
OPENAI_API_KEY=your-key
To install your assistant globally and access it with the oai
command, run bun link
in the project's folder.
Any change made to the project will be reflected in the global command without any extra build step.
oai
oroai chat
: starts a chat with an assistantoai a|assistant
: manage your assistantoai a ls|list
: list available assistantsoai a add|create|new
: create a new assistantoai a rm|remove|delete
: remove an assistantoai a e|edit
: edit an assistant
oai vs|vector-store
: manage your vector storeoai vs ls|list
: list available vector storesoai vs add|create|new
: create a new vector storeoai vs rm|remove|delete
: remove a vector storeoai vs e|edit
: edit a vector storeoai vs sync
: sync managed vector stores
Vector Stores are used by assistants with file search
enabled to dynamically fetch relevant information. OAI helps you manage them custom synchronizations.
- Sitemap sync: Fetches urls from a sitemap, and synchronizes every page to the vector store
- Page urls sync: Fetches urls from a page, and synchronizes every url to the vector store
- More to come
Once set up, make sure to run oai vs sync
to synchronize your vector store.
- ls: Git aware file listing
- read-file: Read a file
- write-file: Writes to a file, creating directories if needed
- append-to-file: Appends to an existing file
- commit: Commits changes to the current branch
- create-dir: Creates a directory with its parents if needed
- execute-command: Executes a command (
⚠️ Will not ask for confirmation) - get-url-content: Fetches the content of a URL
- file-diff: Reads the current diffs of a file
Follow the steps in docs/add-new-tool.md
Due to issues in bun-vscode, you need to inspect through an external debugger.
To debug the project, run bun debug
in the project's folder.