{"id":48852171,"url":"https://github.com/beacoder/gptel-cpp-complete","last_synced_at":"2026-04-15T10:04:15.356Z","repository":{"id":330826460,"uuid":"1123016972","full_name":"beacoder/gptel-cpp-complete","owner":"beacoder","description":"C++ code completion powered by eglot (clangd) + gptel + ag","archived":false,"fork":false,"pushed_at":"2026-01-07T01:50:13.000Z","size":10144,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-01-07T18:04:02.488Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Emacs Lisp","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/beacoder.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-12-26T03:13:05.000Z","updated_at":"2026-01-07T01:50:16.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/beacoder/gptel-cpp-complete","commit_stats":null,"previous_names":["beacoder/gptel-cpp-complete"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/beacoder/gptel-cpp-complete","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beacoder%2Fgptel-cpp-complete","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beacoder%2Fgptel-cpp-complete/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beacoder%2Fgptel-cpp-complete/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beacoder%2Fgptel-cpp-complete/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/beacoder","download_url":"https://codeload.github.com/beacoder/gptel-cpp-complete/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beacoder%2Fgptel-cpp-complete/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31835821,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-15T07:17:56.427Z","status":"ssl_error","status_checked_at":"2026-04-15T07:17:30.007Z","response_time":63,"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":"2026-04-15T10:04:14.347Z","updated_at":"2026-04-15T10:04:15.351Z","avatar_url":"https://github.com/beacoder.png","language":"Emacs Lisp","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gptel-cpp-complete\n\n[![MELPA](https://melpa.org/packages/gptel-cpp-complete-badge.svg)](https://melpa.org/#/gptel-cpp-complete)\n\n`gptel-cpp-complete` is an experimental package that provides\n**Copilot-style, context-aware C++ code completion** using:\n\n- **eglot + clangd** for authoritative semantic information\n- **tree-sitter** for correct current function retrieval\n- **rg/ag** for repository-wide pattern retrieval\n- **gptel** for LLM-powered code continuation\n- **inline ghost text overlays** for a VS Code–like UX\n\nUnlike generic AI assistants, this package is designed to behave like a\n**language-server–style completion engine**, not a chat bot.\nIts sole purpose is **accurate, minimal, inline code continuation**.\n\n---\n\n## Features\n\n- Context-aware C++ code completion inside functions\n- Uses *real* in-scope symbols from `clangd` (via `eglot`)\n- Retrieves similar usage patterns from your repository with `rg/ag`\n- Uses *real* call-hierarchy data from `clangd` (via `eglot`)\n- Strict system prompt to avoid hallucinated APIs\n- Inline “ghost text” suggestions\n- Regenerates completion as you type (except when accepting with RET)\n- Support both local and remote LLM with `gptel`\n\n---\n\n## Requirements\n\n- Emacs 30+\n- [`eglot/clangd`](https://github.com/joaotavora/eglot)\n- [`tree-sitter`](https://github.com/tree-sitter/tree-sitter)\n- [`gptel`](https://github.com/karthink/gptel)\n- [`rg`](https://github.com/BurntSushi/ripgrep)\n- [`ag`](https://github.com/ggreer/the_silver_searcher)\n\nRecommended `eglot` configuration:\n```emacs lisp\n(use-package eglot\n   :ensure t\n   :hook (((c-mode c++-mode c-ts-mode c++-ts-mode) . eglot-ensure))\n   :init\n   (setq eglot-stay-out-of '(imenu)\n         read-process-output-max (* 1024 1024) ; 1MB\n         eglot-autoshutdown t\n         eglot-events-buffer-size 0\n         eglot-send-changes-idle-time 0.5)\n   :config\n   (add-to-list 'eglot-server-programs\n                '((c-mode c-ts-mode c++-mode c++-ts-mode objc-mode)\n                  . (\"clangd\"\n                     \"--compile-commands-dir=./build/\"\n                     \"--background-index\"\n                     \"--clang-tidy\"\n                     \"--completion-style=detailed\"\n                     \"--header-insertion=never\"\n                     \"--pch-storage=memory\"\n                     \"--malloc-trim\"))))\n```\n\nRecommended `tree-sitter` configuration:\n```emacs lisp\n (when (treesit-available-p)\n   (use-package treesit\n     :ensure t\n     :init (setq treesit-extra-load-path\n                 (gptel-cpp-complete--get-treesit-extra-load-path)\n                 major-mode-remap-alist\n                 '((c-mode          . c-ts-mode)\n                   (c++-mode        . c++-ts-mode))\n                 treesit-font-lock-level 4)))\n```\n\nRecommended `gptel` configuration:\n```emacs lisp\n(use-package gptel\n   :ensure t\n   :config\n   (setq gptel-model 'deepseek-ai/DeepSeek-V3.2\n         ;; Randomness in response text, 0 to 2\n         gptel-temperature 0\n         gptel-backend\n         ;; free 2000 request per-day, each model 500\n         (gptel-make-openai \"Free\"\n           :host \"api-inference.modelscope.cn\"\n           :stream t\n           :key \"\"\n           :models '(Qwen/Qwen2.5-32B-Instruct\n                     deepseek-ai/DeepSeek-V3.2))))\n```\n\n---\n\n## Installation\n\nClone the repository and add it to your load path:\n\n```emacs lisp\n(add-to-list 'load-path \"/path/to/gptel-cpp-complete\")\n(require 'gptel-cpp-complete)\n(when (display-graphic-p)\n  ;; gptel-cpp-complete-mode not work well in terminal mode\n  (dolist (c-mode-hook '(c-mode-common-hook c-ts-mode-hook c++-ts-mode-hook))\n    (add-hook c-mode-hook #'gptel-cpp-complete-mode)))\n```\n\n---\n\n## Screenshots\n\n![demo.gif](demo.gif)\n\n---\n\n## Contributing\nYes, please do! See [CONTRIBUTING](CONTRIBUTING.md) for guidelines.\n\n---\n\n## License\n\nSee [LICENSE](LICENSE). Copyright (c) 2025 Huming Chen \u003cchenhuming@gmail.com\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbeacoder%2Fgptel-cpp-complete","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbeacoder%2Fgptel-cpp-complete","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbeacoder%2Fgptel-cpp-complete/lists"}