CLI Overview & Cheatsheet
rnex is a zero-dependency command-line utility built entirely in pure POSIX shell (/bin/sh). It orchestrates Virtual Meta-Repo workspaces, coordinates member repositories, automates Git workflows, and mirrors AI context.
Quick Command Cheatsheet
| Command | Category | Description |
|---|---|---|
rnex init | Workspace | Initialize a new Repo Nexus workspace. |
rnex status | Workspace | Inspect workspace health, clones, and AI instructions. |
rnex fix / sync | Workspace | Reconcile config, routing, prompts, and plugins. |
rnex update / upgrade | Workspace | Part of fix: verify version, upgrade schema, and reconcile workspace. |
rnex install | Workspace | Symlink rnex to ~/.local/bin. |
rnex completion | Workspace | Generate shell auto-completion for Zsh, Bash, or Fish. |
rnex version | Workspace | Display current installed CLI version. |
rnex add | Repositories | Register a git repository and clone it into ./repos/. |
rnex clone | Repositories | Clone all declared repositories missing from disk. |
rnex list | Repositories | Print table of registered member repositories. |
rnex enable | Repositories | Enable a repository (include in sync and exec). |
rnex disable | Repositories | Disable a repository (exclude from sync and exec). |
rnex remove | Repositories | Unregister repository and delete clone from disk. |
rnex rnex-dir | Repositories | Toggle .rnex/ context inside member repository. |
rnex exec | Execution | Run arbitrary shell commands across all active repos. |
rnex hooks | Tooling | Manage automated Git hooks (post-merge, etc.). |
rnex plugin | Tooling | List, inspect, enable, and disable workspace plugins. |
Global Syntax & Flags
sh
rnex [global-options] <command> [command-options] [arguments]Global Options Table
| 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. |
Standardized Prompts Catalog
Repo Nexus provides a standardized suite of operational prompt templates in toolkit/prompts/ that sync to .rnex/prompts/ during rnex fix or rnex init.
AI assistants navigate workflows via the catalog index at .rnex/prompts/index.md:
| Prompt File | Purpose |
|---|---|
index.md | Master catalog indexing all available workflows and prompts. |
rnex-cross-repo-feature.md | Structured workflow for implementing cross-cutting features across multiple repos. |
rnex-workspace-audit.md | Health, git dirty status, branch tracking, and configuration audit workflow. |
rnex-wiki-ingest.md | Autonomous ingestion of source docs from /raw/ into Karpathy LLM Wiki pages. |
rnex-wiki-lint.md | Link validation, backlink (mentioned_in) recalculation, and index rebuilding. |
Environment Variables
| Variable | Description |
|---|---|
RNEX_CONFIG | Overrides the default configuration file path (rnex.yaml). |
NO_COLOR | Disables ANSI color sequences in terminal output when set. |
Exit Codes
| Code | Meaning |
|---|---|
0 | Success. |
1 | General error (missing config, invalid arguments, or failing rnex exec command). |
