{"id":15144196,"url":"https://github.com/codebased-sh/codebased","last_synced_at":"2025-09-04T16:47:13.649Z","repository":{"id":255099617,"uuid":"846782084","full_name":"codebased-sh/codebased","owner":"codebased-sh","description":"Embedded AI search engine for code","archived":false,"fork":false,"pushed_at":"2024-09-14T23:17:39.000Z","size":652,"stargazers_count":21,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-06T19:53:00.687Z","etag":null,"topics":["embeddings","faiss","openai","tree-sitter"],"latest_commit_sha":null,"homepage":"","language":"Python","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/codebased-sh.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":"ROADMAP.md","authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-08-24T00:22:31.000Z","updated_at":"2025-03-24T23:26:12.000Z","dependencies_parsed_at":"2024-08-28T01:41:16.438Z","dependency_job_id":"a00f6d33-b3b8-4076-88b9-ca1e995e94b3","html_url":"https://github.com/codebased-sh/codebased","commit_stats":null,"previous_names":["codebased-sh/codebased"],"tags_count":30,"template":false,"template_full_name":null,"purl":"pkg:github/codebased-sh/codebased","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codebased-sh%2Fcodebased","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codebased-sh%2Fcodebased/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codebased-sh%2Fcodebased/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codebased-sh%2Fcodebased/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codebased-sh","download_url":"https://codeload.github.com/codebased-sh/codebased/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codebased-sh%2Fcodebased/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260769855,"owners_count":23060188,"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":["embeddings","faiss","openai","tree-sitter"],"created_at":"2024-09-26T10:22:37.630Z","updated_at":"2025-06-19T14:39:27.893Z","avatar_url":"https://github.com/codebased-sh.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Codebased\n\nCodebased is the most powerful code search tool that runs on your computer.\n\nHere's why it's great:\n\n- Search, simplified: Combines semantic and full-text search to find what you're looking for, not just what you typed.\n- Search code, not just text: Searches for complete code structures, not just lines of text, in 11 languages.\n- Ignores uninteresting files: Respects your `.gitignore` file(s) and ignores hidden directories.\n- Instant editing: Selecting a search result opens your favorite editor at the correct file and line number.\n- Fast: Indexes your code in seconds, searches in milliseconds, and updates in real-time as you edit your code.\n- Open-source, runs locally: No code is stored on remote servers.\n\n## Getting Started\n\nThe fastest way to install Codebased is with [pipx](https://github.com/pypa/pipx?tab=readme-ov-file#install-pipx):\n\n```shell\npipx install codebased\n```\n\nVerify the installation by running:\n\n```shell\ncodebased --version\n```\n\nIf this fails, please double-check your pipx installation.\n\nNext, run the following command in a Git repository to start searching:\n\n```shell\ncodebased search\n```\n\nThe first time you run Codebased, it will create a configuration file at `~/.codebased/config.toml`.\nIt will prompt you for an OpenAI key, you can access a testing key on the [Discord](https://discord.gg/cQrQCAKZ).\n\nOnce this is finished, `codebased` will create an index of your codebase, stored in `.codebased` at the root of your\nrepository.\nThis takes seconds for most projects, but can take a few minutes for large projects.\nMost of the time is spent creating embeddings using the OpenAI API.\n\nOnce the index is created, a terminal UI will open with a search bar.\nAt this point, you can start typing a search query and results will appear as you type.\n\n- You can use the arrow keys and the mouse to navigate the results.\n- A preview of the selected result is displayed.\n- Pressing enter on the highlighted result opens the file in your editor at the correct line number.\n- Pressing escape returns to the search bar.\n- As you edit your code, the index will be updated in real-time, and future searches will reflect your changes.\n\nCodebased will run `stat` on all non-ignored files in your repository, which can take a few seconds, but after that\nwill listen for filesystem events, so it's recommended to use the TUI.\n\n# Development\n\nIf you'd like to contribute, bug fixes are welcome, as well as anything in the list\nof [issues](https://github.com/codebased-sh/codebased/issues).\n\nEspecially welcome is support for your favorite language, as long as:\n\n1. There's a tree-sitter grammar for it.\n2. There are Python bindings for it maintained by the excellent [amaanq](https://pypi.org/user/amaanq/).\n\nAlso, if there's anything ripgrep does that Codebased doesn't, feel free to file an issue / PR.\n\nClone the repository:\n\n```shell\ngit clone https://github.com/codebased-sh/codebased.git\n```\n\nInstall the project's dependencies (requires [poetry](https://python-poetry.org), using a virtual environment is\nrecommended):\n\n```shell\npoetry install\n```\n\nRun the tests (some tests require an `OPENAI_API_KEY` environment variable, usage is de minimis):\n\n```shell\npoetry run pytest\n```\n\n# Appendix\n\n## Languages\n\n- [X] C\n- [X] C#\n- [X] C++\n- [X] Go\n- [X] Java\n- [X] JavaScript\n- [X] PHP\n- [X] Python\n- [X] Ruby\n- [X] Rust\n- [X] TypeScript\n- [ ] HTML / CSS\n- [ ] SQL\n- [ ] Shell\n- [ ] Swift\n- [ ] Lua\n- [ ] Kotlin\n- [ ] Dart\n- [ ] R\n- [ ] Assembly language\n- [ ] OCaml\n- [ ] Zig\n- [ ] Haskell\n- [ ] Elixir\n- [ ] Erlang\n- [ ] TOML?\n- [ ] YAML?","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodebased-sh%2Fcodebased","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodebased-sh%2Fcodebased","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodebased-sh%2Fcodebased/lists"}