{"id":29873728,"url":"https://github.com/kamilmac/unibear","last_synced_at":"2026-02-08T11:30:05.382Z","repository":{"id":292388840,"uuid":"959050708","full_name":"kamilmac/unibear","owner":"kamilmac","description":"A lean TUI AI assistant.","archived":false,"fork":false,"pushed_at":"2025-06-10T18:18:29.000Z","size":57473,"stargazers_count":99,"open_issues_count":8,"forks_count":4,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-07-30T23:50:17.550Z","etag":null,"topics":[],"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/kamilmac.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","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,"zenodo":null}},"created_at":"2025-04-02T07:29:05.000Z","updated_at":"2025-07-26T21:23:11.000Z","dependencies_parsed_at":"2025-05-09T17:50:20.024Z","dependency_job_id":"8b72c933-04b6-459e-a6a0-f467d8599211","html_url":"https://github.com/kamilmac/unibear","commit_stats":null,"previous_names":["kamilmac/unibear"],"tags_count":17,"template":false,"template_full_name":null,"purl":"pkg:github/kamilmac/unibear","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kamilmac%2Funibear","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kamilmac%2Funibear/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kamilmac%2Funibear/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kamilmac%2Funibear/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kamilmac","download_url":"https://codeload.github.com/kamilmac/unibear/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kamilmac%2Funibear/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29229290,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-08T09:43:19.170Z","status":"ssl_error","status_checked_at":"2026-02-08T09:42:55.556Z","response_time":57,"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":[],"created_at":"2025-07-30T23:02:45.012Z","updated_at":"2026-02-08T11:30:05.368Z","avatar_url":"https://github.com/kamilmac.png","language":"TypeScript","funding_links":[],"categories":["\u003ca name=\"ai\"\u003e\u003c/a\u003eAI / ChatGPT","TypeScript"],"sub_categories":[],"readme":"# Unibear\n\n[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](LICENSE)\n[![Version](https://img.shields.io/github/v/release/kamilmac/unibear)](https://github.com/kamilmac/unibear/releases)\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://raw.githubusercontent.com/kamilmac/unibear/main/assets/unibear-face-small.png\" alt=\"Unibear\" /\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n  A lean TUI AI assistant: run your tools, stay in control, no magic tricks.\n\u003c/p\u003e\n\n![Unibear Screenshot](assets/unibear-shot.png)\n![Unibear Demo gif](assets/unibear-demo.gif)\n\n## Table of Contents\n\n- [Installation](#installation)\n- [Getting Started](#getting-started)\n- [Editor Integrations](#editor-integrations)\n- [Configuration](#configuration)\n- [Modes](#modes)\n  - [Prompt Mode](#prompt-mode)\n  - [Visual Mode](#visual-mode)\n- [Tools](#tools)\n- [Key Bindings](#key-bindings)\n- [Development](#development)\n- [Contributing](#contributing)\n- [Roadmap](#roadmap)\n- [FAQ](#faq)\n\n\u003cbr\u003e\n\n## Installation\n\n```bash\ncurl -fsSL \\\n  https://raw.githubusercontent.com/kamilmac/unibear/main/install.sh \\\n  | bash\n```\n\n\u003e Ensure `OPENAI_API_KEY`, `ANTHROPIC_API_KEY`, or `GEMINI_API_KEY` are set in\n\u003e your environment, depending on the provider you intend to use. (OpenAI,\n\u003e Anthropic, Gemini, and Ollama (for local LLMs) are supported). For Ollama, you\n\u003e might also need to set `OPENAI_API_URL` (see \"Using a local LLM\" section).\n\nLaunch Unibear in your git repository:\n\n```bash\nunibear\n```\n\n\u003cbr\u003e\n\n## Getting Started\n\nFollow these steps to begin using Unibear:\n\n1. Launch Unibear\\\n   Run the following command in your workspace root so that all files\\\n   in this directory are accessible:\n   ```bash\n   unibear\n   ```\n\n2. Configure your editor\\\n   Map a key to send the current buffer or file to Unibear:\n\n   - **Neovim**\n     ```vim\n     nnoremap \u003cleader\u003eua :silent !unibear add_file %:p\u003cCR\u003e\n     ```\n\n   - **Helix**\n     ```toml\n     [keys.normal]\n     C-a = [\":sh unibear add_file %{buffer_name}\"]\n     ```\n   (Unibear can also search for files and list directories)\n\n3. Brainstorm and iterate\n   - Press `i` to enter **Prompt Mode**, type your prompt, and hit ↵ to\\\n     get AI suggestions. Continue iterating until you're satisfied.\n   - Press `Esc` to switch to **Visual Mode**. Navigate with `j`/`k`,\\\n     scroll fast with `J`/`K`, jump to top (`gg`) or bottom (`G`/`ge`),\\\n     select (`v`), yank (`y`), paste (`p`), or delete chat items with (`d`).\\\n     You probably noticed that these keybindings are inspired by Helix\\\n     and Neovim.\n\n4. Apply edits\\\n   Press your `+` to toggle modify mode,\\\n   which enables file-editing tools. In this mode, you can instruct the AI\\\n   to apply changes to your files and commit them. (Read-only tools are\\\n   available in default mode).\n\n\u003cbr\u003e\n\n## Features\n\n- 🚀 Work in **Prompt** or **Visual** (Vim/Helix-like) modes\n- 🔍 Inject arbitrary file context\n- 🔧 Built-in Git, filesystem, and web-search tools\n- 🤝 Plan \u0026 pair-program with your AI buddy before applying edits\n- 🖥️ Responsive TUI with improved visual feedback\n- 📁 Ability to use a local LLM server that supports the OpenAI chat completions\n  API (eg. Ollama)\n\n\u003cbr\u003e\n\n## Editor Integrations\n\n\u003e Only one Unibear instance at a time (it runs a local server).\n\n### Helix\n\nAdd a buffer to Unibear’s context:\n\n```bash\nunibear add_file \u003cpath/to/file\u003e\n```\n\nExample Helix mapping:\n\n```toml\n# ~/.config/helix/config.toml\n[keys.normal]\nC-a = [\":sh unibear add_file %{buffer_name}\"]\n```\n\n\u003cbr\u003e\n\n### Neovim\n\nBind a key to send the current buffer path to Unibear:\n\n#### init.vim\n\n```vim\nnnoremap \u003cleader\u003eua :silent !unibear add_file %:p\u003cCR\u003e\n```\n\n#### init.lua\n\n```lua\nvim.keymap.set(\"n\", \"\u003cleader\u003eua\", function()\n  vim.cmd(\"silent !unibear add_file \" .. vim.fn.expand(\"%:p\"))\nend, { noremap = true, silent = true })\n```\n\n\u003cbr\u003e\n\n## Configuration\n\nCreate `~/.config/unibear/config.json`:\n\n\u003e Note: Supported providers are `openai`, `anthropic`, `gemini`, and `ollama`.\n\n```json\n{\n  \"provider\": \"openai\", // or \"anthropic\", \"gemini\", \"ollama\"\n  \"model\": \"o4-mini\",\n  \"reasoning_effort\": \"medium\", // controls depth of reasoning: low, medium, or high\n  \"web_search_model\": \"gpt-4.1-mini\",\n  \"temperature\": 0.7,\n  \"port\": 12496,\n  \"system\": \u003cSYSTEM_MESSAGE\u003e // It will replace the Unibear default message\n  \"theme\": \"dark\",\n  \"user_name\": \"Alice\",\n  \"key_bindings\": {\n    \"useModifyTools\": \"+\"\n  }\n}\n```\n\n**Note on Gemini Accounts:** Free Gemini accounts are often subject to strict\nrate limiting by Google, which can lead to frequent `400` errors. This is due to\nGoogle\\'s policies on LLM requests for free tier users. If you encounter\npersistent `400` errors, consider upgrading your Gemini account or exploring\nalternative API access methods.\n\n\u003cbr\u003e\n\n### Using a local LLM (eg. Ollama)\n\nUnibear supports using local LLMs via the OpenAI chat completions API by\nproviding `OPENAI_API_URL` environment variable.\n\n```bash\n# Example using Ollama:\nOPENAI_API_URL=http://localhost:11434/v1 unibear\n```\n\n## Modes\n\n### Prompt Mode\n\n- Press `i`\n- Type your prompt and hit ↵\n- Invoke tools like file operations, git commands, or web search\n\n### Visual Mode\n\n- Press `Esc`\n- Press `+` to enable write access (modify mode)\n- Navigate output with `j`/`k` (or `J`/`K` for big scroll)\n- Select (`v`), yank (`y`), paste (`p`), delete (`d`)\n- Jump to top (`gg`) or end (`G`/`ge`)\n\n\u003cbr\u003e\n\n## Tools\n\n| Tool Mode | Key | Commands                                                                                                                                                                                                                           |\n| --------- | --- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| Normal    | –   | read_multiple_files, search_files, search_content, list_directory, git_get_diff_to_base, git_get_working_diff, git_generate_commit_message, git_review, git_create_pr_description, git_list_local_modified_files, web_search, help |\n| Modify    | `+` | edit_file, write_file, create_directory, git_commit                                                                                                                                                                                |\n\n\u003cbr\u003e\n\n## Key Bindings\n\n```json\n{\n  \"visual\": {\n    \"quit\": [\"ctrl-q\"],\n    \"clearChat\": [\"ctrl-d\"],\n    \"promptMode\": [\"i\"],\n    \"moveUp\": [\"k\"],\n    \"moveDown\": [\"j\"],\n    \"bigMoveUp\": [\"K\"],\n    \"bigMoveDown\": [\"J\"],\n    \"select\": [\"v\"],\n    \"yank\": [\"y\"],\n    \"paste\": [\"p\"],\n    \"delete\": [\"d\"],\n    \"goToTop\": [\"gg\"],\n    \"goToEnd\": [\"G\", \"ge\"],\n    \"useModifyTools\": [\"+\"]\n  }\n}\n```\n\n\u003cbr\u003e\n\n## Development\n\nClone the repo and get going locally:\n\n```bash\ngit clone https://github.com/kamilmac/unibear.git\ncd unibear\n```\n\nLeverage the built-in Deno tasks:\n\n```bash\n# watch \u0026 run in dev mode\ndeno task dev\n\n# compile a standalone binary\ndeno task compile\n\n# faster compile skipping type checks\ndeno task compile-no-check\n```\n\n\u003cbr\u003e\n\n## Contributing\n\nContributions welcome! Please open issues or pull requests with clear\ndescriptions. Follow DWYL style guide and run `deno fmt` \u0026 `deno lint`.\n\n## Roadmap\n\n- Better Windows build support\n- Enhanced LLM model options\n- Support for images\n- Tools as plugins architecture\n\n## FAQ\n\n**Q: Port already in use?**\\\nA: Run `lsof -i :\u003cport\u003e` and kill the process or change `port` in config.\n\n**Q: Invalid API key?**\\\nA: Ensure `OPENAI_API_KEY`, `ANTHROPIC_API_KEY`, or `GEMINI_API_KEY` is set\ncorrectly in your environment, corresponding to the selected `provider` in your\nconfiguration. For Ollama, an API key is typically not required if using the\ndefault \"ollama\" value.\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkamilmac%2Funibear","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkamilmac%2Funibear","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkamilmac%2Funibear/lists"}