A compact CLI for managing instruction files and MCP tooling across multiple repositories. Built with Go and Bubble Tea, rulem keeps each repository’s instructions, settings, and MCP tools in sync while sharing credentials, storage, and background scans.
Saving a rule file to the central repository — file picker with live markdown preview, then rename and save.
- Multi-repo aware: Each repository gets its own instructions and settings inside the TUI, but all share the same credentials and MCP registry.
- Primary workflows: Launch
rulemfor the TUI,rulem mcpfor the MCP server, and use the menu actions to save/import rules, refresh GitHub repos, or edit repository metadata. - Safety guards: Git-backed flows run dirty-state checks before mutating branches, clone paths, or deleting a repo.
- Install (see below), then run
rulemto launch the interactive UI. - Add or select a repository, use the main menu to save/import rules, or open the settings menu to edit metadata.
- Run
rulem mcpto expose your rule files as MCP tools for connected IDEs/assistants. - When developing,
go test ./...andgo run ./cmd/rulemare the canonical verification/build loops (seehacking.mdfor more).
- Homebrew (macOS):
brew tap muhammadbassiony/rulem && brew install rulem - Snap/Linux:
sudo snap install rulem - Binary: Download the latest release from GitHub Releases
- Source:
git clone https://github.com/muhammadbassiony/rulem && go build -o rulem ./cmd/rulem
- Start the MCP server with
rulem mcp(add--debugfor verbose logging). - Rule files with YAML frontmatter are auto-registered as MCP tools; each repo contributes tools that share the stored PAT/token.
- Use MCP inspectors (e.g.,
mcp-inspector) to confirm tool registration and invocation flows.
