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

ohmyfix

v1.1.3

Published

A CLI tool to fix or generate code in files with AI, featuring theme selection and shortcuts

Readme

OhMyFix

A powerful, AI-driven CLI tool to enhance your coding experience. Fix JavaScript errors, generate code from comments, resolve dependency conflicts, and boost productivity with a customizable UI and oh-my-zsh-inspired shortcuts!

Features

  • AI Code Review: Automatically fixes errors in all JavaScript .js files in your project (ohmyfix ai).
  • Dependency Conflict Checker: Scans package.json for version mismatches (ohmyfix depfix).
  • Interactive Theme Selection: Choose from 4 themes (Dark, Pookie Pink, Nord, Solarized) on first run, saved to ohmyfix.config.json.
  • Code Snippets: Suggests reusable JavaScript snippets based on your codebase (ohmyfix snippets).
  • Real-Time Linting: Flags JavaScript-specific issues like uncommented console.log or missing semicolons (ohmyfix lint).
  • Debug Helper: Provides AI-powered debugging steps for any error message (ohmyfix debug).
  • Shortcuts: Manage oh-my-zsh-style aliases for JavaScript coding (ohmyfix shortcuts).
  • Snippet Fixer: Fixes errors in pasted code snippets for any language (e.g., Python, Java) (ohmyfix snippetfix).
  • File-Specific Fix/Generate: ohmyfix <file> --shortcut fixes JavaScript errors or generates code based on a top comment, overwriting the file.
  • Customizable UI: Toggle between compact or detailed prompts and switch themes via ohmyfix.config.json.

Getting Started

Prerequisites

  • Node.js: 18.x or higher (tested with 22.13.0).
  • npm: Latest version (npm install -g npm).
  • Google Generative AI API Key: Obtain from Google Maker Suite.

Installation

Install globally via npm:

npm install -g ohmyfix

Initial Setup

Run OhMyFix:

ohmyfix

On first run, select a theme (e.g., Dark, Pookie Pink). This is saved to ohmyfix.config.json.

Set Up API Key:

ohmyfix setup

Enter your Google Generative AI API key (starts with AI). Saved to .env.

Usage

Interactive Mode

Run without arguments to access the main menu:

ohmyfix

Choose from options like "Fix dependency conflicts" or "Fix Selected Snippet".

File-Specific Fix/Generate

Fix errors or generate code in a specific file:

ohmyfix hello.js --shortcut
  • If hello.js contains valid JavaScript, it fixes syntax errors.
  • If not, or if it lacks a comment, it adds // Generate code based on this comment and generates code accordingly.
  • Overwrites hello.js with the result.

Commands

  • ohmyfix ai: AI-powered review and fix for all .js files.
  • ohmyfix setup: Configure your Google API key.
  • ohmyfix snippets: Suggest reusable code snippets.
  • ohmyfix lint: Lint your JavaScript codebase.
  • ohmyfix debug: Get debugging suggestions.
  • ohmyfix shortcuts: Manage productivity shortcuts.
  • ohmyfix snippetfix: Fix a pasted code snippet in any language.

Examples

Example 1: Generate Code from Comment

hello.js (before):

// Generate a simple webpage
<!DOCTYPE html>

Run:

ohmyfix hello.js --shortcut

Output:

// Generate a simple webpage
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Simple Webpage</title>
</head>
<body>
    <h1>Hello, World!</h1>
</body>
</html>

hello.js has been updated with generated code!

Example 2: Fix JavaScript Errors

hello.js (before):

// Log a greeting
conole.log("Hi"

Run:

ohmyfix hello.js --shortcut

Output:

// Log a greeting
console.log("Hi");

hello.js has been updated with generated code!

Example 3: Empty File

hello.js (before): (empty)

Run:

ohmyfix hello.js --shortcut

Output:

// Generate code based on this comment
console.log("Generated code based on comment");

hello.js has been updated with generated code!

Customization

Edit ohmyfix.config.json to customize:

{
  "theme": "pookiepink",
  "promptStyle": "compact",
  "shortcuts": {
    "log": "console.log"
  }
}
  • theme: dark, pookiepink, nord, or solarized.
  • promptStyle: detailed (default) or compact.
  • shortcuts: Add custom aliases.

Troubleshooting

  • "theme.gray is not a function": Ensure you’re using version 1.0.8 or higher (npm install -g ohmyfix).
  • "No Google API key": Run ohmyfix setup and provide a valid key.
  • "File not found": Verify the file exists in the current directory.
  • Unexpected output: Add a clear comment (e.g., // Generate a calculator app) to guide the AI.

Contributing

  1. Fork the repository: github.com/thedvlprguy/ohmyfix.
  2. Create a feature branch (git checkout -b feature/new-thing).
  3. Commit changes (git commit -m "Add new thing").
  4. Push to the branch (git push origin feature/new-thing).
  5. Open a Pull Request.

License

MIT © thedvlprguy tejsvapandey keertikayo Rounakag16

Acknowledgments

  • Powered by Google Generative AI.
  • Built with Node.js, Chalk, and Clack Prompts.