Repofence CLI

0.2.2 · active · verified Wed Apr 22

Repofence is a command-line interface (CLI) tool designed to streamline the process of preparing software repositories for AI agents. It enables developers to generate structured specifications and AI-specific rules directly from their codebase, ensuring AI tools operate within defined boundaries. The current stable version is 0.2.2, indicating it's an early-stage but actively developed tool. Its key differentiators include local-first operation for codebase scanning (`repofence reverse`), explicit support for various AI assistants like Cursor and Claude, and a focus on creating documentation artifacts (`spec/*.md`) that guide both human developers and AI agents. It aims to prevent AI agents from "guessing" and instead work with clear, auto-generated boundaries.

Common errors

Warnings

Install

Imports

Quickstart

Demonstrates global installation and the core workflow: authentication, project initialization, and auto-population of specifications.

npm install -g repofence

# 1. Purchase a license and get your token
repofence auth --web

# 2. Initialize spec files + install assistant assets (Cursor by default)
repofence init

# 3. Auto-populate specs from your codebase
repofence reverse

view raw JSON →