{"id":34611563,"url":"https://github.com/anders94/code-llm","last_synced_at":"2026-05-28T19:31:35.202Z","repository":{"id":279635470,"uuid":"939424338","full_name":"anders94/code-llm","owner":"anders94","description":"A CLI tool that works with a local LLM in an iterative chat-like style, providing code suggestions based on your local directory context.","archived":false,"fork":false,"pushed_at":"2025-03-13T03:28:04.000Z","size":95,"stargazers_count":25,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-09-14T12:44:22.776Z","etag":null,"topics":["cli","code","llm"],"latest_commit_sha":null,"homepage":"","language":"Rust","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/anders94.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"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}},"created_at":"2025-02-26T14:18:52.000Z","updated_at":"2025-09-06T14:20:48.000Z","dependencies_parsed_at":"2025-02-26T18:39:18.743Z","dependency_job_id":null,"html_url":"https://github.com/anders94/code-llm","commit_stats":null,"previous_names":["anders94/code-cli","anders94/code-llm"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/anders94/code-llm","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anders94%2Fcode-llm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anders94%2Fcode-llm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anders94%2Fcode-llm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anders94%2Fcode-llm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/anders94","download_url":"https://codeload.github.com/anders94/code-llm/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anders94%2Fcode-llm/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28003726,"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","status":"online","status_checked_at":"2025-12-24T02:00:07.193Z","response_time":83,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["cli","code","llm"],"created_at":"2025-12-24T14:16:08.009Z","updated_at":"2025-12-24T14:16:08.456Z","avatar_url":"https://github.com/anders94.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Code LLM\n\nA CLI tool that works in an iterative chat-like style, providing code suggestions based on your local directory context using Ollama models.\n\n## Demo\n[![Code-LLM Demo](https://img.youtube.com/vi/JFCjAUYhlqU/0.jpg)](https://youtu.be/JFCjAUYhlqU)\n\n\n## Features\n\n- Interactive chat interface for code assistance\n- Integrates with Ollama models running locally (default) or in the cloud\n- Tests connection to Ollama on startup and helps select from available models\n- Analyzes code in your local directory to provide context-aware suggestions\n- Presents code changes as diffs for easy review\n- Allows accepting, rejecting, or modifying suggested changes\n- Respects .gitignore patterns for context building\n\n## Prerequisites\n\n- Rust (2021 edition)\n- [Ollama](https://ollama.ai/) running locally with at least one model\n\n## Installation\n\nClone and build the project:\n\n```bash\ngit clone https://github.com/anders94/code-llm.git\ncd code-llm\ncargo build --release\n```\n\nThe binary will be available at `target/release/code-llm`. Copy it somewhere your PATH will search such as `/usr/local/bin`.\n\n## Usage\n\nBasic usage:\n\n```bash\n# Start interactive mode - will prompt you to select a model\ncode-llm\n\n# Specify a model to use\ncode-llm --model llama3.3\n\n# Change the Ollama API endpoint\ncode-llm --api-url http://custom-ollama-host:11434\n```\n\nCommands:\n\n```bash\n# Initialize a project with a local configuration\n# Creates a .code-llm/config.toml file in the current directory\ncode-llm init\n\n# Manage global configuration\ncode-llm config              # Display the current configuration\ncode-llm config --path       # Show the path to the config file\ncode-llm config --edit       # Open the config file in your default editor\n```\n\n## How it Works\n\n1. The application tests connectivity to Ollama and prompts you to select an available model\n2. The CLI analyzes your current directory, respecting .gitignore patterns\n3. It builds a context from your codebase that's sent to the Ollama model\n4. You interact with the CLI by asking questions or requesting changes\n5. The model responses are parsed for code suggestions in diff format\n6. You can review, accept, or reject suggested changes\n7. Accepted changes are applied to your codebase\n\n## Configuration\n\nThe CLI can be configured both globally and per-project:\n\n- Global configuration is stored in `~/.code-llm/config.toml`\n- Local project configuration is stored in `.code-llm/config.toml` in the project directory\n- No default model is assumed - you'll be prompted to select from available models if none is specified\n- API endpoint: http://localhost:11434 (configurable with `--api-url`)\n- Max file size: 100KB per file\n- Max context size: 8MB total\n\nThe configuration files support customizing system prompts for specific models.\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n\n## License\n\nThis project is licensed under the MIT License - see the LICENSE file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanders94%2Fcode-llm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fanders94%2Fcode-llm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanders94%2Fcode-llm/lists"}