{"id":15055094,"url":"https://github.com/knilink/tamperpilot","last_synced_at":"2026-02-08T14:04:31.062Z","repository":{"id":257281051,"uuid":"857762006","full_name":"knilink/tamperpilot","owner":"knilink","description":"Copilot hack for running local copilot without auth and proxying","archived":false,"fork":false,"pushed_at":"2024-12-23T13:35:23.000Z","size":126,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-08T04:51:36.449Z","etag":null,"topics":["codecompletion","copilot","llamacpp","localllama","ollama"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/knilink.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":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-09-15T14:47:46.000Z","updated_at":"2024-12-23T13:35:26.000Z","dependencies_parsed_at":"2024-09-15T18:27:52.510Z","dependency_job_id":"a25da483-9e58-44f0-8560-99c1fb3079f5","html_url":"https://github.com/knilink/tamperpilot","commit_stats":{"total_commits":6,"total_committers":2,"mean_commits":3.0,"dds":"0.16666666666666663","last_synced_commit":"4f401cadb6f1e6d4896ad7422c8f37737d61caad"},"previous_names":["knilink/tamperpilot"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/knilink/tamperpilot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/knilink%2Ftamperpilot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/knilink%2Ftamperpilot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/knilink%2Ftamperpilot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/knilink%2Ftamperpilot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/knilink","download_url":"https://codeload.github.com/knilink/tamperpilot/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/knilink%2Ftamperpilot/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29232802,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-08T13:49:52.259Z","status":"ssl_error","status_checked_at":"2026-02-08T13:49:18.683Z","response_time":57,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: 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":["codecompletion","copilot","llamacpp","localllama","ollama"],"created_at":"2024-09-24T21:39:24.793Z","updated_at":"2026-02-08T14:04:26.046Z","avatar_url":"https://github.com/knilink.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Tamperpilot\nA GitHub Copilot modding tool for enhancing user's local experience by overriding app context with custom script.\n\n## Quick start\n1. Clone this project\n```sh\ngit clone https://github.com/knilink/tamperpilot.git\n```\n\n2. Clone the copilot script to be tamper with\n```sh\ngit clone https://github.com/github/copilot.vim.git\n```\n\n3. Install dependencies\n```sh\ncd tamperpilot\nnpm install\n```\n\n4. Patch script\n```sh\nnpm run patch openai ../copilot.vim/dist/language-server.js\n```\nwhere \"openai\" is the build entry of the script to be injected, which is src/openai.ts\nIf this step succeed, there should be a `../copilot.vim/dist/language-server-tampered.js` generated.\n\n\n5. Test the script(optional). It should work with any openai compatible api, here use ollama at `http://localhost:11434` as an example\n```sh\nnpm run test-completion -- \\\n  ../copilot.vim/dist/language-server-tampered.js --stdio --debug \\\n  --baseUrl=http://localhost:11434/v1 \\\n  --model=qwen2.5-coder:7b-base-q4_K_M \\\n  --add-stop='\u003c|file_sep|\u003e'\n```\nArgs explanation:\n- `--stdio`: always required by language server.\n- `--debug` (optional): language server built-in debug args to enable debug log level.\n- `--baseUrl`: The base url of openai completions endpoint, e.g. `http://localhost:11434/v1` for ollama\n- `--model`: model parameter to be injected to completion request payload, or alternatively use language server's built-in env `AGENT_DEBUG_OVERRIDE_ENGINE`\n- `--stop` (optional): overriding language server's built-in stop sequences\n- `--add-stop` (optional): append stop sequences to language server's built-in stop sequences\n- `--unset-stop` (optional): unset the built-in stop sequences\n\u003c!-- - `--max-suffix-lines` (optional): max suffix lines to be sent to completion request payload, default is to allocate 15% of the total prefix+suffix which might be too large for smaller models and degrade the completion quality.… --\u003e\n\nWhen testing with ollama, make sure the model support FIM and the model file is the latest, `qwen2.5-coder` is recommanded.\nIf this step succeed, log message `completion  {\"completions\":[..., \"text\":\"    age = current_year - birth_year\", ...}]}` can be seen at the last line.\n\nIf the completion is empty, check the log for `[fetchCompletions] request.response: [http://localhost:11434/v1/completions]` to make sure the request is sending to the specified `--baseUrl`, as well as server's non 200 responses.\n\n## How build a custom script\nBelow is an example to show necessary to build a custom injection script.\nFirst, create a file in `src` folder, `src/myScript.ts` for example, with following content.\n```typescript\n// file://.src/myScript.ts\n// import TamperContext\nimport { TamperContext } from './utils/tamperContext';\n// optionally import presets to be applied\nimport { dummyAuth } from './utils/presets';\n\n// create a tamper context instance\nconst tctx = new TamperContext();\n\n// optionally apply preset\ndummyAuth(tctx);\n\n// setup hook, here use 'BuildInfo' as an example\ntctx.tamper(\n  // name of the context, more can be found in src/utils/contextKeys.d.ts\n  'BuildInfo',\n  (\n    // instance of the context\n    instance,\n    // class or abstract class of the context, could be optionally used for extending\n    BuildInfo\n  ) =\u003e {\n    // overriding method function, monkey patching is recommanded to minimize the chance of breaking\n    instance.getDisplayVersion = () =\u003e '3.14.159-tampered';\n\n    // must return the instance of `BuildInfo` or classes extends `BuildInfo`\n    return instance;\n  }\n);\n\n// export context instance as default, this step is IMPORTANT.\nexport default tctx;\n```\nThen run the patch\n```sh\nnpm run patch myScript ../copilot.vim/dist/language-server.js\n```\nFinally, test the patch\n```sh\nnpm run test-completion -- ../copilot.vim/dist/language-server-tampered.js --stdio --debug\n```\nIf succeed, version `3.14.159-tampered` can be seen in the initial debug log message `[lsp] GitHub Copilot Language Server 3.14.159-tampered initialized`.\n\nMore context info can be found in `src/utils/contextKeys.d.ts`, typing was done based on `copilot.vim#v1.38.0` so could be inconsistent with other versions, below are contexts that are considered useful:\n- Fetcher: the context responsible sending all http requests.\n- NetworkConfiguration: defines a bunch of URLs\n- ConfigProvider: provides config\n- AuthManager, CopilotTokenManager: handling auth\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fknilink%2Ftamperpilot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fknilink%2Ftamperpilot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fknilink%2Ftamperpilot/lists"}