npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

tweakgc

v0.0.5

Published

CLI tool to extend your GitHub Copilot CLI to accept more models from the API.

Readme

Tweak GC CLI

Disclaimer

This is an unofficial CLI tool and is not affiliated with, endorsed, or sponsored by GitHub, Microsoft, or their affiliates. It is provided "as-is" without any warranty. Use at your own discretion and risk.

Credits

This tool is a fork of tweakcc by Piebald-AI. Much of the foundational work and inspiration comes from their original project. Sincere thanks to Piebald-AI for their contributions to the community.

Overview

Tweak GC is a command-line tool that extends the GitHub Copilot CLI to allow selection of all available models returned from the Copilot API (except for OpenAI o4-mini and GPT-5 Codex). It works by applying AST-level patches to the Copilot CLI installation, enabling dynamic model loading from environment variables, configuration files, and server responses.

Quickstart

Run Tweak GC without installation using npx, bunx, or your preferred package runner:

npx tweakgc --apply

# Or with bun:
bunx tweakgc --apply

# Or with pnpm:
pnpm dlx tweakgc --apply

To install globally:

npm install -g tweakgc

# Then run:
tweakgc --apply

How It Works

Tweak GC modifies the minified GitHub Copilot CLI bundle by parsing it into an Abstract Syntax Tree, applying targeted patches to specific parts of the bundle, and regenerating the modified code. The patcher uses meriyah for parsing, and astring for code generation.

Usage

Basic usage to apply patches to your GitHub Copilot CLI installation:

tweakgc --apply

Debug mode with verbose output:

tweakgc --debug --apply

After patching, add custom models via environment variable:

export COPILOT_MODEL=custom-model-id
copilot

Or add models to your config file at ~/.copilot/config.json:

{
  "model": "custom-model-id"
}

Verified Compatibility

Tweak GC is tested and verified to work with GitHub Copilot CLI version 0.0.338. The structural pattern matching approach may not provide compatibility with other versions, though testing is recommended and pull requests are welcome for fixes.

Development

Clone and build from source:

git clone https://github.com/DanielNappa/tweakgc-cli.git
cd tweakgc
npm install
npm run build
node dist/index.js --apply

Run in development mode with bun:

bun dev --debug --apply

Technical Details

The patcher implementation is located in src/utils/patches/modelExtensions.ts and uses TypeScript with proper ESTree type annotations. The patches are applied through AST manipulation.

For development and testing, you can generate astring-formatted reference files from your local CLI installation:

node -e "const fs=require('fs'),{parse}=require('meriyah'),{generate}=require('astring');const code=fs.readFileSync('node_modules/@github/copilot/index.js','utf-8');const ast=parse(code,{module:true,next:true});fs.writeFileSync('index-astring.js',generate(ast),'utf-8');"

These formatted files help with AST exploration during development but are not required for the patcher to function.

Troubleshooting

If patches fail to apply, ensure your GitHub Copilot CLI installation is at a supported version. Run with the --debug flag to see detailed patch application logs. If your CLI installation is in a non-standard location, the patcher may fail to locate it.

When updating GitHub Copilot CLI to a new version, your patches will be overwritten. Simply rerun Tweak GC to reapply them, although it is not guaranteed to work for newer versions.

License

This project is licensed under the MIT License.