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

glooit

v0.6.4

Published

🧴 Sync your AI agent configurations and rules across platforms with ease

Downloads

727

Readme

glooit 🧴

Sync AI coding assistant configurations across Claude Code, Cursor, Codex, OpenCode, and Roo Code/Cline.

  • Rules - Agent instructions and guidelines
  • Commands - Custom slash commands
  • Skills - Reusable agent capabilities
  • Agents - Custom agent definitions
  • MCP Servers - Model Context Protocol configurations
  • Agent Hooks - Lifecycle hooks for Claude Code and Cursor

Why glooit?

Teams today use different AI coding assistants - some prefer Claude Code, others use Cursor, OpenCode, and CI/CD might run on Codex. Each tool has its own config format and location:

  • Claude Code reads CLAUDE.md, commands in .claude/commands/, skills in .claude/skills/
  • Cursor uses .cursor/rules/*.mdc with frontmatter, commands in .cursor/commands/
  • OpenCode expects AGENTS.md, commands in .opencode/command/, agents in .opencode/agent/
  • Codex expects AGENTS.md
  • Roo Code/Cline looks in .roo/rules/

glooit lets you write your rules once and sync them everywhere. Perfect for:

  • Multi-agent teams - Everyone uses their preferred AI assistant with consistent rules
  • Monorepos - Different rules for different packages, all managed centrally
  • CI/CD pipelines - Same rules in development and automation
  • Evolving tooling - Switch or add AI assistants without rewriting configs

Install

# Homebrew (macOS/Linux)
brew tap nikuscs/glooit https://github.com/nikuscs/glooit
brew install glooit

# npm
npm install -g glooit

# bun
bun install -g glooit

# pnpm
pnpm install -g glooit

Quick Start

glooit init              # Create config
glooit sync              # Sync rules to all agents

Configuration

Create .glooit/main.md with your rules, then configure glooit.config.ts:

import { defineRules } from 'glooit';

export default defineRules({
  rules: [
    {
      file: '.glooit/main.md',
      to: './',
      targets: ['claude', 'cursor', 'codex']
    }
  ]
});

Run glooit sync (or bunx glooit sync / npx glooit sync) and it creates:

  • CLAUDE.md for Claude Code
  • .cursor/rules/main.mdc for Cursor
  • AGENTS.md for Codex

Supported Agents

| Agent | Output Path | Format | |-------|-------------|--------| | claude | CLAUDE.md | Markdown | | cursor | .cursor/rules/{name}.mdc | Frontmatter | | codex | AGENTS.md | Markdown | | opencode | AGENTS.md | Markdown | | roocode | .roo/rules/{name}.md | Markdown | | generic | {name}.md | Markdown |

Feature Support Matrix

| Feature | Claude | Cursor | OpenCode | Codex | Roo Code/Cline | Generic | |-------------|--------|--------|----------|-------|----------------|---------| | Rules | βœ“ | βœ“ | βœ“ | βœ“ | βœ“ | βœ“ | | Commands | βœ“ | βœ“ | βœ“ | - | - | - | | Skills | βœ“ | βœ“ | βœ“* | - | - | - | | Agents | βœ“ | βœ“ | βœ“ | - | - | - | | MCP Servers | βœ“ | βœ“ | βœ“ | βœ“ | βœ“ | βœ“ | | Hooks | βœ“ | βœ“ | - | - | - | - |

*OpenCode uses Claude-compatible skills path (.claude/skills/)

Features

Custom Paths

Override output locations per-agent:

{
  file: '.glooit/backend.md',
  to: './',
  targets: [
    'claude',
    { name: 'cursor', to: './backend/.cursor/rules/api.mdc' }
  ]
}

Directory Sync

Sync commands, skills, and agents directories at the top level:

export default defineRules({
  rules: [...],

  // Simple string path (defaults to claude, cursor, opencode)
  commands: '.glooit/commands',

  // Or with explicit targets
  skills: {
    path: '.glooit/skills',
    targets: ['claude']
  },

  agents: {
    path: '.glooit/agents',
    targets: ['claude', 'cursor']
  }
});

Output mappings:

  • commands β†’ .claude/commands, .cursor/commands, .opencode/command
  • skills β†’ .claude/skills, .cursor/skills (OpenCode uses .claude/skills)
  • agents β†’ .claude/agents, .cursor/agents, .opencode/agent

File Merging

Combine multiple files into one output:

{
  file: [
    '.glooit/coding-standards.md',
    '.glooit/testing-guidelines.md'
  ],
  to: './',
  targets: [
    { name: 'claude', to: './GUIDELINES.md' }
  ]
}

Globs (Cursor)

Limit rule scope to specific files:

{
  file: '.glooit/frontend.md',
  to: './apps/frontend',
  globs: 'src/**/*.{ts,tsx}',
  targets: ['cursor']
}

Transforms

Transform content during sync using placeholders in your source files.

Source file (.glooit/main.md):

# Project Guidelines

Last updated: __TIMESTAMP__

## Project Structure

__STRUCTURE__

## Environment

- Node version: __NODE_VERSION__
- API URL: __API_URL__

Config (glooit.config.ts):

import { defineRules, transforms } from 'glooit';

export default defineRules({
  rules: [
    {
      file: '.glooit/main.md',
      to: './',
      targets: ['claude'],
      hooks: ['replaceStructure', 'addTimestamp', 'replaceEnv']
    }
  ],
  transforms: {
    after: [transforms.compact({ removeFillerWords: true })]
  }
});

Built-in transforms:

| Transform | Placeholder | Description | |-----------|-------------|-------------| | addTimestamp | __TIMESTAMP__ | Replaced with current date/time | | replaceEnv | __ENV_VAR__ | Replaced with process.env.ENV_VAR value | | replaceStructure | __STRUCTURE__ | Replaced with project directory tree | | compact | - | Cleans up markdown (removes filler words, extra newlines) |

Usage:

  • Per-rule transforms: Add hooks: ['transformName'] to individual rules
  • Global transforms: Add to transforms.after array to run on all rules

Agent Hooks

Configure lifecycle hooks that run inside Claude Code and Cursor when the AI uses tools.

export default defineRules({
  rules: [...],
  hooks: [
    // Run prettier after file edits
    {
      event: 'afterFileEdit',
      command: 'npx prettier --write',
      targets: ['claude', 'cursor']
    },

    // Run a TypeScript script before shell commands
    {
      event: 'beforeShellExecution',
      script: '.glooit/hooks/check-command.ts',
      targets: ['claude']
    },

    // Block writes to sensitive files
    {
      event: 'PreToolUse',
      script: '.glooit/hooks/block-env-writes.ts',
      matcher: 'Edit|Write',  // Claude Code matcher
      targets: ['claude']
    }
  ]
});

Supported events:

| Event | Claude Code | Cursor | Description | |-------|-------------|--------|-------------| | PreToolUse | βœ“ | - | Before tool execution (can block) | | PostToolUse | βœ“ | - | After tool completion | | beforeShellExecution | βœ“ | βœ“ | Before shell commands | | afterFileEdit | βœ“ | βœ“ | After file modifications | | Stop | βœ“ | βœ“ | When agent finishes |

Script types:

  • .ts files: Run with bun run
  • .js files: Run with node
  • .sh files: Run directly

MCP Configuration

Configure Model Context Protocol servers:

export default defineRules({
  rules: [...],
  mcps: [
    {
      name: 'postgres',
      config: {
        command: 'uvx',
        args: ['mcp-server-postgres'],
        env: { DATABASE_URL: process.env.DATABASE_URL }
      },
      targets: ['claude', 'cursor']
    }
  ]
});

Backup

Automatic backups before sync:

export default defineRules({
  rules: [...],
  backup: {
    enabled: true,
    retention: 10
  }
});

Commands

glooit init              # Initialize configuration
glooit sync              # Sync rules and MCPs
glooit validate          # Validate configuration
glooit clean             # Clean .gitignore entries
glooit reset --force     # Remove all generated files
glooit upgrade           # Upgrade glooit to latest version
glooit backup list       # List available backups
glooit backup restore <timestamp>  # Restore from backup

Upgrade

The upgrade command auto-detects your package manager and whether glooit is installed locally or globally:

glooit upgrade           # Auto-detect and upgrade
glooit upgrade -g        # Force global upgrade
glooit upgrade -l        # Force local upgrade

All commands work with npx, bunx, or pnpx:

npx glooit sync
bunx glooit sync
pnpx glooit sync

Examples

See examples/full.config.ts for a complete configuration with all features.

Development

# Install dependencies
bun install

# Run tests
bun run test

# Type check and lint
bun run check

# Build
bun run build

# Build local binary
bun run install:local

Releasing

bun run release

This runs checks, prompts for version bump, creates a git tag, and pushes. CI handles npm publish and GitHub release automatically.

Credits

Without these amazing projects, this project would not be possible.

  • Antfu for the amazing packages
  • Ruler Inspiration for the project & ideas
  • Claude for the amazing AI that made this project possible in a few hours.

License

MIT