```
├── .cursor/
   ├── rules/
      ├── architecture.mdc (omitted)
      ├── examples.mdc (omitted)
      ├── yo.mdc (omitted)
├── .cursorindexingignore (omitted)
├── .github/
   ├── instructions/
      ├── examples-test.instructions.md (omitted)
   ├── workflows/
      ├── ci.yml (omitted)
      ├── claude.yaml (omitted)
├── .gitignore (omitted)
├── .npmignore (omitted)
├── .prettierrc (omitted)
├── .repomixignore (omitted)
├── LICENSE (omitted)
├── README.md (omitted)
├── TODO.md (omitted)
├── UNIFIED_RULES_CONVENTION.md (omitted)
├── bun.lock (omitted)
├── context.json (omitted)
├── examples/
   ├── README.md (omitted)
   ├── end-user-cjs-package/
      ├── .gitignore (omitted)
      ├── install.test.ts (omitted)
      ├── metadata-integration.test.ts (omitted)
      ├── package.json (omitted)
      ├── single-rule-claude.md (omitted)
      ├── uninstall.test.ts (omitted)
   ├── end-user-esm-package/
      ├── .gitignore (omitted)
      ├── install.test.ts (omitted)
      ├── package.json (omitted)
   ├── library-cjs-package/
      ├── package.json (omitted)
      ├── src/
         ├── llms.ts (omitted)
      ├── tsconfig.json (omitted)
   ├── library-esm-package/
      ├── README.md (omitted)
      ├── package.json (omitted)
      ├── src/
         ├── llms.ts (omitted)
      ├── tsconfig.json (omitted)
├── package.json (omitted)
├── reference/
   ├── README.md (omitted)
   ├── amp-rules-directory/
      ├── AGENT.md (omitted)
   ├── claude-code-directory/
      ├── CLAUDE.md (omitted)
   ├── cline-rules-directory/
      ├── .clinerules/
         ├── always-on.md (omitted)
         ├── glob.md (omitted)
         ├── manual.md (omitted)
         ├── model-decision.md (omitted)
   ├── codex-rules-directory/
      ├── AGENTS.md (omitted)
   ├── cursor-rules-directory/
      ├── .cursor/
         ├── always-on.mdc (omitted)
         ├── glob.mdc (omitted)
         ├── manual.mdc (omitted)
         ├── model-decision.mdc (omitted)
   ├── windsurf-rules-directory/
      ├── .windsurf/
         ├── rules/
            ├── always-on.md (omitted)
            ├── glob.md (omitted)
            ├── manual.md (omitted)
            ├── model-decision.md (omitted)
   ├── zed-rules-directory/
      ├── .rules (omitted)
├── scripts/
   ├── build-examples.ts (omitted)
   ├── test-examples.ts (omitted)
├── src/
   ├── cli.ts (800 tokens)
   ├── commands/
      ├── convert.ts (omitted)
      ├── install.ts (omitted)
      ├── list.ts (omitted)
      ├── load.ts (omitted)
      ├── save.ts (omitted)
      ├── uninstall.ts (omitted)
   ├── index.ts (omitted)
   ├── llms/
      ├── index.ts (omitted)
      ├── internal.ts (omitted)
      ├── llms.txt (omitted)
   ├── providers/
      ├── amp-provider.ts (omitted)
      ├── claude-code-provider.ts (omitted)
      ├── clinerules-provider.ts (omitted)
      ├── codex-provider.ts (omitted)
      ├── cursor-provider.ts (omitted)
      ├── gemini-provider.ts (omitted)
      ├── index.ts (omitted)
      ├── metadata-application.test.ts (omitted)
      ├── unified-provider.ts (omitted)
      ├── vscode-provider.ts (omitted)
      ├── windsurf-provider.ts (omitted)
      ├── zed-provider.ts (omitted)
   ├── schemas.ts (omitted)
   ├── text.d.ts (omitted)
   ├── types.ts (omitted)
   ├── utils/
      ├── debug.ts (omitted)
      ├── frontmatter.test.ts (omitted)
      ├── frontmatter.ts (omitted)
      ├── path.ts (omitted)
      ├── rule-change-detector.ts (omitted)
      ├── rule-formatter.ts (omitted)
      ├── rule-storage.test.ts (omitted)
      ├── rule-storage.ts (omitted)
      ├── similarity.ts (omitted)
      ├── single-file-helpers.ts (omitted)
      ├── single-file-removal.ts (omitted)
├── tsconfig.json (omitted)
├── vibe-tools.config.json (omitted)
├── web/
   ├── .env.example (omitted)
   ├── .gitignore (omitted)
   ├── DEPLOYMENT.md (omitted)
   ├── README.md (omitted)
   ├── alchemy.run.ts (omitted)
   ├── app/
      ├── app.vue (omitted)
      ├── composables/
         ├── useDarkMode.ts (omitted)
         ├── useGitHubStars.ts (omitted)
      ├── layouts/
         ├── default.vue (omitted)
      ├── pages/
         ├── index.vue (omitted)
         ├── local-usage.vue (omitted)
         ├── maintainers.vue (omitted)
   ├── nuxt.config.ts (omitted)
   ├── package.json (omitted)
   ├── public/
      ├── logos/
         ├── amp.svg (omitted)
         ├── claude-code.svg (omitted)
         ├── cline.svg (omitted)
         ├── codex.svg (omitted)
         ├── cursor.svg (omitted)
         ├── vscode.svg (omitted)
         ├── windsurf.svg (omitted)
         ├── zed.svg (omitted)
   ├── tailwind.config.js (omitted)
   ├── types/
      ├── env.d.ts (omitted)
   ├── wrangler.jsonc (omitted)
```


## /src/cli.ts

```ts path="/src/cli.ts" 
#!/usr/bin/env node

import { Command } from "commander";
import { readFileSync } from "fs";
import { join, dirname } from "path";
import { fileURLToPath } from "url";
import { installCommandAction } from "./commands/install.js";
import { saveCommandAction } from "./commands/save.js";
import { loadCommandAction } from "./commands/load.js";
import { listCommandAction } from "./commands/list.js";
import { convertCommandAction } from "./commands/convert.js";
import { uninstallCommandAction } from "./commands/uninstall.js";

// Get version from package.json
const __filename = fileURLToPath(import.meta.url);
const __dirname = dirname(__filename);
const packageJsonPath = join(__dirname, "../package.json");
const packageJson = JSON.parse(readFileSync(packageJsonPath, "utf-8"));
const version = packageJson.version;

import { debugLog, setDebugEnabled } from "./utils/debug.js";

const program = new Command();

program
  .name("vibe-rules")
  .description(
    "A utility for managing Cursor rules, Windsurf rules, Amp rules, and other AI prompts"
  )
  .version(version, "-v, --version", "display version number")
  .option("--debug", "Enable debug logging", false);

program.on("option:debug", () => {
  setDebugEnabled(program.opts().debug);
  debugLog("Debug logging enabled.");
});

program
  .command("save")
  .description("Save a rule to the local store")
  .argument("<n>", "Name of the rule")
  .option("-c, --content <content>", "Rule content")
  .option("-f, --file <file>", "Load rule content from file")
  .option("-d, --description <desc>", "Rule description")
  .action(saveCommandAction);

program
  .command("list")
  .description("List all saved rules from the common store")
  .action(listCommandAction);

program
  .command("load")
  .alias("add")
  .description("Apply a saved rule to an editor configuration")
  .argument("<n>", "Name of the rule to apply")
  .argument(
    "<editor>",
    "Target editor type (cursor, windsurf, claude-code, gemini, codex, amp, clinerules, roo, zed, unified, vscode)"
  )
  .option(
    "-g, --global",
    "Apply to global config path if supported (claude-code, gemini, codex)",
    false
  )
  .option("-t, --target <path>", "Custom target path (overrides default and global)")
  .action(loadCommandAction);

program
  .command("install")
  .description(
    "Install rules from an NPM package or all dependencies directly into an editor configuration"
  )
  .argument(
    "<editor>",
    "Target editor type (cursor, windsurf, claude-code, gemini, codex, amp, clinerules, roo, zed, unified, vscode)"
  )
  .argument("[packageName]", "Optional NPM package name to install rules from")
  .option(
    "-g, --global",
    "Apply to global config path if supported (claude-code, gemini, codex)",
    false
  )
  .option("-t, --target <path>", "Custom target path (overrides default and global)")
  .action(installCommandAction);

program
  .command("convert")
  .description("Convert rules from one format to another (directory or file-based)")
  .argument(
    "<sourceFormat>",
    "Source format (cursor, windsurf, claude-code, gemini, codex, amp, clinerules, roo, zed, unified, vscode)"
  )
  .argument(
    "<targetFormat>",
    "Target format (cursor, windsurf, claude-code, gemini, codex, amp, clinerules, roo, zed, unified, vscode)"
  )
  .argument("<sourcePath>", "Source path (directory like .cursor or file like CLAUDE.md)")
  .option(
    "-g, --global",
    "Apply to global config path if supported (claude-code, gemini, codex)",
    false
  )
  .option("-t, --target <path>", "Custom target path (overrides default path)")
  .action(convertCommandAction);

program
  .command("uninstall")
  .description("Remove a rule from an editor configuration")
  .argument("<name>", "Name of the rule to remove")
  .argument(
    "<editor>",
    "Target editor type (cursor, windsurf, claude-code, codex, amp, clinerules, roo, zed, unified, vscode)"
  )
  .option("-g, --global", "Remove from global config path if supported (claude-code, codex)", false)
  .option("-t, --target <path>", "Custom target path (overrides default and global)")
  .action(uninstallCommandAction);

program.parse(process.argv);

if (process.argv.length <= 2) {
  program.help();
}

```


The better and more specific the context, the better the LLM can follow instructions. If the context seems verbose, the user can refine the filter using uithub. Thank you for using https://uithub.com - Perfect LLM context for any GitHub repo.