{"id":26453327,"url":"https://github.com/pairprogio/oai","last_synced_at":"2025-03-18T18:57:48.467Z","repository":{"id":209362517,"uuid":"723517999","full_name":"pAIrprogio/oai","owner":"pAIrprogio","description":"Bridge ChatGPT with your system","archived":false,"fork":false,"pushed_at":"2024-05-28T22:11:59.000Z","size":150,"stargazers_count":24,"open_issues_count":0,"forks_count":4,"subscribers_count":0,"default_branch":"main","last_synced_at":"2024-05-30T13:08:03.825Z","etag":null,"topics":["assistant-api","bun","cli","gpt-4","gpt-4o","nodejs","openai"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pAIrprogio.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"ko_fi":"yleflour"}},"created_at":"2023-11-25T23:09:49.000Z","updated_at":"2024-05-29T17:34:53.000Z","dependencies_parsed_at":"2024-01-31T00:39:22.592Z","dependency_job_id":"dbff9150-b611-4f1e-b125-36bb7c134a2a","html_url":"https://github.com/pAIrprogio/oai","commit_stats":null,"previous_names":["pairprogio/assistant-cli-playground","pairprogio/gpt-assistant-cli-playground"],"tags_count":0,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pAIrprogio%2Foai","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pAIrprogio%2Foai/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pAIrprogio%2Foai/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pAIrprogio%2Foai/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pAIrprogio","download_url":"https://codeload.github.com/pAIrprogio/oai/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244287756,"owners_count":20428890,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["assistant-api","bun","cli","gpt-4","gpt-4o","nodejs","openai"],"created_at":"2025-03-18T18:57:47.972Z","updated_at":"2025-03-18T18:57:48.458Z","avatar_url":"https://github.com/pAIrprogio.png","language":"TypeScript","funding_links":["https://ko-fi.com/yleflour"],"categories":[],"sub_categories":[],"readme":"# OAI - OpenAI Assistant Interface\n\n✨✨ ChatGPT on your system ✨✨\n\n## Table of Contents\n\n- [Why OAI](#why-oai)\n- [Sample Usages](#sample-usages)\n- [Installation](#installation)\n- [Configure](#configure)\n- [CLI Usage](#cli-usage)\n  - [Global access](#global-access)\n  - [Commands](#commands)\n- [Vector Stores](#vector-stores)\n- [Tools](#tools)\n  - [Available tools](#available-tools)\n  - [How to add tools ?](#how-to-add-tools)\n- [Debugging](#debugging)\n\n## Why OAI\n\nThe OpenAI Assistant API handles agents, conversation history, vector stores, and running tools which traditionnaly requires a lot of boilerplate code to set up.\n\nOur goal with OAI is to provide a simple and intuitive interface to interact with this API.\n\nThe current version offers a CLI interface, but more will come in the future.\n\n## Sample Usages\n\n- Chat with up-to-date documentation with managed vector stores\n- Ask question about your codebase by leveraging tools\n- Ask your assistant to write code directly to files\n- Let your assistant manage and access your system\n- Configure and test an assistant for another integration\n- _Whatever you can think of_\n\nJust run `oai` from the command line to interact\n\n## Installation\n\nOAI currently relies on [bun](https://bun.sh/), and it needs to be installed on your system in order to run the project.\n\nA later version may allow using the `node` runtime, but for now, only `bun` is supported.\n\n```bash\ngit clone git@github.com:pAIrprogio/gpt-assistant-cli-playground.git\nbun install\n```\n\n## Configure\n\n- Create a project on the [OpenAI Platform](https://platform.openai.com/organization/projects)\n- Create an API Key\n- Add your OpenAI API key to a .env file using `OPENAI_API_KEY=your-key`\n\n## CLI Usage\n\n### Global access\n\nTo install your assistant globally and access it with the `oai` command, run `bun link` in the project's folder.\n\nAny change made to the project will be reflected in the global command without any extra build step.\n\n### Commands\n\n- `oai` or `oai chat`: starts a chat with an assistant\n- `oai a|assistant`: manage your assistant\n  - `oai a ls|list`: list available assistants\n  - `oai a add|create|new`: create a new assistant\n  - `oai a rm|remove|delete`: remove an assistant\n  - `oai a e|edit`: edit an assistant\n- `oai vs|vector-store`: manage your vector store\n  - `oai vs ls|list`: list available vector stores\n  - `oai vs add|create|new`: create a new vector store\n  - `oai vs rm|remove|delete`: remove a vector store\n  - `oai vs e|edit`: edit a vector store\n  - `oai vs sync`: sync managed vector stores\n\n## Vector Stores\n\nVector Stores are used by assistants with `file search` enabled to dynamically fetch relevant information. OAI helps you manage them custom synchronizations.\n\n- **Sitemap sync**: Fetches urls from a sitemap, and synchronizes every page to the vector store\n- **Page urls sync**: Fetches urls from a page, and synchronizes every url to the vector store\n- _More to come_\n\nOnce set up, make sure to run `oai vs sync` to synchronize your vector store.\n\n## Tools\n\n### Available tools\n\n- [ls](./src/tools/ls.ts): Git aware file listing\n- [read-file](./src/tools/readFile.ts): Read a file\n- [write-file](./src/tools/writeFile.ts): Writes to a file, creating directories if needed\n- [append-to-file](./src/tools/appendToFile.ts): Appends to an existing file\n- [commit](./src/tools/commit.ts): Commits changes to the current branch\n- [create-dir](./src/tools/createDir.ts): Creates a directory with its parents if needed\n- [execute-command](./src/tools/executeCommand.ts): Executes a command (⚠️ Will not ask for confirmation)\n- [get-url-content](./src/tools/getUrlContent.ts): Fetches the content of a URL\n- [file-diff](./src/tools/fileDiff.ts): Reads the current diffs of a file\n\n### How to add tools ?\n\nFollow the steps in [docs/add-new-tool.md](docs/add-new-tool.md)\n\n## Debugging\n\nDue to issues in bun-vscode, you need to inspect through an external debugger.\n\nTo debug the project, run `bun debug` in the project's folder.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpairprogio%2Foai","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpairprogio%2Foai","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpairprogio%2Foai/lists"}