Skip to content

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 ​

sh
rnex [global-options] <command> [command-options] [arguments]
FlagShorthandTypeDescription
--config <file>-c <file>stringPath to custom workspace configuration file (e.g. /path/to/rnex.yaml). Executes as if running from that file's directory.
--help-hbooleanDisplay command usage and help summary.
--version-vbooleanOutput CLI version.

Workspace Commands ​

rnex init ​

Initializes a new Repo Nexus Virtual Meta-Repo workspace.

sh
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.

sh
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.

sh
rnex status

rnex clone ​

Clones all enabled member repositories declared in configuration that are missing from <repos_dir>/ (default: ./repos/).

sh
rnex clone

rnex list ​

Prints a formatted table of all registered repositories with state, clone status, branch, and readonly flag.

sh
rnex list

rnex exec ​

Runs an arbitrary shell command sequentially across all enabled member repositories.

sh
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).

sh
rnex install [bin-dir]

rnex completion ​

Generates shell auto-completion scripts.

sh
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>).

sh
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.yaml instead of rnex.yaml.
  • --disabled: Register with enabled: false.
  • --readonly: Register with readonly: true.

rnex repo remove ​

Unregisters a repository from configuration and deletes its directory from disk.

sh
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.

sh
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) or rnex.yaml.

rnex repo clone ​

Clones a single registered member repository into <repos_dir>/<name> (default: ./repos/<name>).

sh
rnex repo clone <name>

rnex repo status ​

Inspects configuration, branch, and Git working tree status for a specific repository.

sh
rnex repo status <name>

rnex repo exec ​

Executes an arbitrary shell command targeting an individual repository.

sh
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.

sh
rnex plugin list

rnex plugin info ​

Displays detailed metadata, options, and commands for a plugin.

sh
rnex plugin info <name>

rnex plugin enable ​

Enables a plugin in configuration and copies assets to .rnex/plugins/<name>/.

sh
rnex plugin enable [--local] <name>

rnex plugin disable ​

Disables a plugin, executes its cleanup hook, and prunes scoped assets.

sh
rnex plugin disable [--local] <name>

rnex plugin update ​

Re-synchronizes and updates enabled plugins from plugin sources.

sh
rnex plugin update [<name>]

rnex plugin <name> <command> ​

Executes a subcommand exposed by an enabled plugin:

sh
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.