CodeCharm is your intelligent VS Code extension that generates inline code comments using Google Gemini models. It uses your selected code and enhances it with emoji-rich, concise comments or refactors it for readability.
π Now updated with multi-model fallback support and secure API key input!
- βοΈ Generate inline code comments with emojis β clean and fun.
- β»οΈ Refactor messy code to improve readability.
- β¨οΈ Shortcut support:
- Ctrl + Win + Jβ Add Inline Comments
- Ctrl + Win + Gβ Refactor Code
 
- π Model Fallback Support: Uses the following Gemini models in this order:
- gemini-2.0-flash-lite
- gemini-2.0-flash
- gemini-2.5-flash-lite
- gemini-2.5-pro
- gemini-2.0-flash-exp
- learnlm-2.0-flash-experimental
- gemini-2.0-flash-live
- gemini-2.5-flash-live
- gemini-2.5-flash-native-audio-dialog
 
- π Secure API Key Storage in VS Code settings.
- π§ Uses your API key, no sharing required.
- π Execute cmd()instructions inside your code- Add a line like: cmd(import pandas)at the top of your code block.
- CodeCharm will first apply your instruction (e.g., add imports, modify setup)
 and then generate inline comments or refactor the code.Tip: You can add a cmd()instruction before running CodeCharm
 
- Add a line like: 
Example:
cmd(import pandas) df = pd.DataFrame({...})This will automatically insert the required import before processing.
To use CodeCharm, you'll need your own Google Gemini API key:
- Go to Google AI Studio.
- Copy your API key.
- Open VS Code.
- Press Ctrl + Win + JorCtrl + Win + Gfor the first time.
- A secure input box will appear β paste your key there.
- It will be saved automatically in:
Tip: You can add a
cmd()instruction before running CodeCharm
Example:cmd(import pandas) df = pd.DataFrame({...})This will automatically insert the required import before processing.
CodeCharm.zetaFlux in your VS Code settings.
π Your key stays local & secure β not shared or stored remotely.
- Select a block of code.
- Press:
- Ctrl + Win + Jβ for inline comments
- Ctrl + Win + Gβ to refactor code
 
- CodeCharm will generate and replace your selection with an improved version.
Tip: You can add a
cmd()instruction before running CodeCharm
Example:cmd(import pandas) df = pd.DataFrame({...})This will automatically insert the required import before processing.
function getUser(id) {
  return db.query("SELECT * FROM users WHERE id = " + id);
}function getUser(id) {
  return db.query("SELECT * FROM users WHERE id = " + id); // π§βπ» Query user by ID
}- π Extension ID: CodeCharm
- π¨βπ» Publisher: DeveloperPuneet
- π GitHub Repo: CodeCharm
- π§© VS Code Version: ^1.50.0and above
- π§  AI Models Used:
- gemini-2.0-flash-lite(primary)
- gemini-2.0-flash
- gemini-2.5-flash-lite
- gemini-2.5-pro
- 
- other fallback models
 
 
- 
β Getting No Output or Errors? - Make sure your Gemini API key is valid.
- If it's missing or expired, you'll be prompted to input it when you try using the extension.
- To manually update or check your key:
 Settings β Extensions β CodeCharm β zetaFlux
 
- 
β οΈ Network Errors?- Check your internet connection or if Google's Gemini API is reachable.
- Avoid hammering it with hundreds of requests/minute β Google donβt play π¬
 
- π¬ Ideas, feature requests, and PRs are all welcome!
- Fork it, star it β, break it, rebuild it β just donβt write spaghetti π
- All feedback = good feedback, especially with emojis.
MIT β Use it, hack it, improve it.
You break it, you own it. π₯
π¬ Built with brain, bugs & caffeine by @DeveloperPuneet
βIf your code canβt explain itself, at least let it drop some emoji bars π―.β

