CLI Reference
rnex is a zero-dependency CLI written entirely in pure POSIX /bin/sh. It orchestrates Virtual Meta Repository (meta repo) and Nexus Repository (nexus repo) workspaces, single-repository management under rnex repo, batch operations across <repos_dir>/ (default ./repos/), and extensible plugin commands.
Global Options
rnex [global-options] <command> [command-options] [arguments]| Flag | Shorthand | Type | Description |
|---|---|---|---|
--config <file> | -c <file> | string | Path to custom workspace configuration file (e.g. /path/to/rnex.yaml). Executes as if running from that file's directory. |
--help | -h | boolean | Display command usage and help summary. |
--version | -v | boolean | Output CLI version. |
Workspace Commands
rnex init
Initializes a new Repo Nexus Virtual Meta-Repo workspace.
rnex init [options] [directory]-y,--yes: Non-interactive mode; accepts all defaults automatically.--repos-dir <dir>: Set custom directory for member repositories (default:repos).--code-workspace: Enable VS Code multi-root workspace file (pass string for custom file name).--hooks: Force-enable automated Git hooks setup during initialization.--no-hooks: Skip Git hooks configuration during initialization.--copilot: Enable GitHub Copilot plugin (.github/copilot-instructions.md,.github/skills/).--claude: Enable Claude Code plugin (CLAUDE.md,.claude/skills/).--cursor: Enable Cursor plugin (.cursorrules,.cursor/rules/).--codex: Enable OpenAI Codex plugin (CODEX.md,.codex/skills/).--gemini: Enable Google Gemini plugin (GEMINI.md,.agents/skills/).--windsurf: Enable Windsurf plugin (.windsurfrules,.windsurf/rules/).--karpathy: Enable Karpathy LLM Wiki plugin (wiki/,docs/).--plugin <name>: Enable any specified plugin during initialization (repeatable).
rnex sync
Single reconciliation command: syncs skills, plugins, Git hooks & ignore rules, compiles .rnex/ai-instructions.md, and prunes unlisted/deleted member repositories from <repos_dir> so the directory strictly matches configuration.
rnex sync [options]-y,--yes: Automatically confirm non-destructive schema upgrades if prompted.--upgrade: Explicitly trigger non-destructive configuration and schema upgrade checks.-q,--quiet: Quiet mode; suppresses non-error informational messages (ideal for hooks).
rnex status
Strictly read-only diagnostic report: inspects workspace health, active repos, loaded config, hooks, and plugins.
rnex statusrnex clone
Clones all enabled member repositories declared in configuration that are missing from <repos_dir>/ (default: ./repos/).
rnex clonernex list
Prints a formatted table of all registered repositories with state, clone status, branch, and readonly flag.
rnex listrnex exec
Runs an arbitrary shell command sequentially across all enabled member repositories.
rnex exec <command...>- Preserves and returns exact non-zero exit codes upon command failure.
- Exports
RNEX_REPO_NAME,RNEX_REPO_PATH,RNEX_REPO_BRANCH.
rnex install
Installs and symlinks rnex and repo-nexus to ~/.local/bin (or custom directory).
rnex install [bin-dir]rnex completion
Generates shell auto-completion scripts.
rnex completion <bash|zsh|fish>Single-Repository Commands (rnex repo)
Manage individual member repositories without affecting the entire workspace.
rnex repo add
Registers a repository in configuration and clones it into <repos_dir>/<name> (default: ./repos/<name>).
rnex repo add <url> [--name <name>] [--branch <branch>] [--local] [--disabled] [--readonly]<url>: Git repository URL or local repository path.--name <name>: Custom repository name (inferred from URL basename if omitted).--branch <branch>: Initial Git branch to checkout.--local: Register in.local.rnex.yamlinstead ofrnex.yaml.--disabled: Register withenabled: false.--readonly: Register withreadonly: true.
rnex repo remove
Unregisters a repository from configuration and deletes its directory from disk.
rnex repo remove <name> [--purge] [-y|--yes]--purge: Deletes the repository directory from disk (<repos_dir>/<name>). (Retained for backward compatibility; repo directory is deleted upon removal).-y,--yes: Skip confirmation prompt.
rnex repo set
Updates repository state and flags.
rnex repo set <name> [--enable|--disable] [--readonly|--readwrite] [--global|--local]--enable/--disable: Toggle active state.--readonly/--readwrite: Toggle read-only flag.--local/--global: Write to.local.rnex.yaml(default) orrnex.yaml.
rnex repo clone
Clones a single registered member repository into <repos_dir>/<name> (default: ./repos/<name>).
rnex repo clone <name>rnex repo status
Inspects configuration, branch, and Git working tree status for a specific repository.
rnex repo status <name>rnex repo exec
Executes an arbitrary shell command targeting an individual repository.
rnex repo exec <name> <command...>rnex repo list
Alias for rnex list.
Plugin Commands (rnex plugin)
Manage plugins and execute plugin-provided CLI commands.
rnex plugin list
Lists all available, enabled, and disabled plugins (from built-in plugins or configured external plugin paths via plugins.<name>.path) along with their declared CLI commands.
rnex plugin listrnex plugin info
Displays detailed metadata, options, and commands for a plugin.
rnex plugin info <name>rnex plugin enable
Enables a plugin in configuration and copies assets to .rnex/plugins/<name>/.
rnex plugin enable [--local] <name>rnex plugin disable
Disables a plugin, executes its cleanup hook, and prunes scoped assets.
rnex plugin disable [--local] <name>rnex plugin update
Re-synchronizes and updates enabled plugins from plugin sources.
rnex plugin update [<name>]rnex plugin <name> <command>
Executes a subcommand exposed by an enabled plugin:
rnex plugin <name> <command> [options...]- Example:
rnex plugin karpathy-llm ingest docs/notes.md - Example:
rnex plugin karpathy-llm ingest --source docs/notes.md - Example:
rnex plugin karpathy-llm lint --strict - Shorthand execution:
rnex plugin <command> [options...]when<command>is unique across enabled plugins.
