{"id":17223902,"url":"https://github.com/zabil/aic","last_synced_at":"2026-05-03T19:33:49.960Z","repository":{"id":241787784,"uuid":"795067938","full_name":"zabil/aic","owner":"zabil","description":"A simple openai chat interface","archived":false,"fork":false,"pushed_at":"2024-05-30T09:54:30.000Z","size":57,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-25T16:27:14.383Z","etag":null,"topics":["ai","gpt","openai","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zabil.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","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}},"created_at":"2024-05-02T14:17:25.000Z","updated_at":"2024-05-30T09:54:34.000Z","dependencies_parsed_at":null,"dependency_job_id":"699f3b17-ef63-44db-b5c7-c7ea285e0bba","html_url":"https://github.com/zabil/aic","commit_stats":null,"previous_names":["zabil/aic"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/zabil/aic","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zabil%2Faic","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zabil%2Faic/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zabil%2Faic/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zabil%2Faic/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zabil","download_url":"https://codeload.github.com/zabil/aic/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zabil%2Faic/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32582779,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-03T06:36:36.687Z","status":"ssl_error","status_checked_at":"2026-05-03T06:36:09.306Z","response_time":103,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["ai","gpt","openai","typescript"],"created_at":"2024-10-15T04:09:32.558Z","updated_at":"2026-05-03T19:33:49.944Z","avatar_url":"https://github.com/zabil.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n## Project Overview\n\nA command-line tool for OpenAI's ChatGPT models. It reads configuration settings from environment variables and generates chat completions in a streaming fashion, which are output directly to the terminal.\n\n## Usage\n\n### Prerequisites\n\nThere are no binaries to download yet. To run this tool, you need to have the following:\n\n- Ensure you have `bun` installed. If not, you can install it by following the instructions on the [Bun website](https://bun.sh/).\n- Set the your [OpenAI API key](https://platform.openai.com/docs/quickstart/step-2-set-up-your-api-key) necessary environment variables, for example\n\n### Running the Tool\n\nTo use the tool, simply execute the main script:\n\n```bash\n$ make build\n$ ./dist/bin/aic Crack a joke\n```\n\nDepending on your environment settings, the tool will read the prompt, interact with the OpenAI API, and stream the result directly to your terminal.\n\n## CLI Recipes\n\nYou can move the aic binary to a directory in your `PATH` to make it easier to run the tool from anywhere. The following examples assume that the aic binary is in your `PATH`.\n\n### Using with other commands\n\nThis tool can be integrated with other command-line tools using pipes. Below are some examples:\n\n#### Format the output with a column width and word wrap\n\nYou can use the content of a file as the input prompt:\n```bash\n$ aic what is the first paragraph of kafkas metamorphosis | fold -sw 80\n```\n\n#### Using output of a command as input\n\nYou can use the content of a file as the input prompt for example in fish shell:\n```bash\nOPENAI_SYSTEM=\"Analyze the git diff and explain the changes\" aic (git show)\n```\n\nThis assumes you are in a git repository and you want to analyze the changes in the latest commit.\n\n#### Using the clipboard\n\nUse the clipboard to rephrase copied text for example (macos fish shell):\n```bash\nOPENAI_SYSTEM=\"Rephrase, using simple concise english and active voice\" aic (pbpaste)\n```\n\nYou can create aliases for these commands in your favourite shell and an use them as shortcuts.\n\nThere are many other ways to use this tool. Feel free to experiment and share your recipes with the community.\n\n## Configuration\n\nThe tool reads configuration settings from environment variables. The following environment variables are supported:\n\n- `OPENAI_API_KEY`: Your OpenAI API key. You can get this from the OpenAI platform.\n- `OPENAI_SYSTEM`: The system to use for the completion. This can be any of the systems available in the OpenAI platform.\n- `OPENAI_MODEL`: The model to use for the completion. This can be any of the models available in the OpenAI platform.\n- `OPENAI_TEMPERATURE`: The temperature to use for the completion (default is 0.5). This is a floating point number between 0 and\n\n## For Developers\n\n### Checkout and Build\n\nTo build and run this project locally, follow these steps:\n\n1. Clone the repository:\n   ```bash\n   git clone https://github.com/zabil/aic.git\n   cd aic\n   ```\n\n2. Install dependencies:\n   ```bash\n   bun install\n   ```\n\n3. Build:\n   ```bash\n   make build\n   ```\n\n4. Run the main script:\n   ```bash\n   ./src/main.ts\n   ```\n\n### Contributing\n\nPlease see our `CONTRIBUTING.md` for guidelines on how to proceed.\n\n## License\n\nThis project is licensed under the MIT License. See the `LICENSE` file for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzabil%2Faic","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzabil%2Faic","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzabil%2Faic/lists"}