repo-nexus 0.5.13 → 0.5.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/docs/CLI.md +0 -1
- package/docs/cli/execution.md +81 -0
- package/docs/cli/index.md +64 -0
- package/docs/cli/repos.md +129 -0
- package/docs/cli/tooling.md +91 -0
- package/docs/cli/workspace.md +166 -0
- package/docs/examples/ai-workflows.md +50 -0
- package/docs/examples/local-overrides.md +70 -0
- package/docs/examples/monorepo-coexistence.md +81 -0
- package/docs/examples/multi-repo-workspace.md +101 -0
- package/docs/faq/index.md +81 -0
- package/docs/guide/architecture.md +83 -0
- package/docs/guide/configuration.md +132 -0
- package/docs/guide/getting-started.md +117 -0
- package/docs/guide/why-repo-nexus.md +48 -0
- package/docs/guide/workflows.md +123 -0
- package/docs/index.md +79 -0
- package/docs/plugins/authoring.md +76 -0
- package/docs/plugins/claude.md +5 -0
- package/docs/plugins/copilot.md +5 -0
- package/docs/plugins/cursor.md +5 -0
- package/docs/plugins/gemini.md +5 -0
- package/docs/plugins/index.md +87 -0
- package/docs/plugins/karpathy-llm.md +5 -0
- package/docs/plugins/windsurf.md +5 -0
- package/docs/public/logo.svg +10 -0
- package/lib/ai.sh +13 -0
- package/package.json +18 -9
- package/toolkit/plugins/karpathy-llm/README.md +1 -1
- package/toolkit/prompts/index.md +0 -4
- package/toolkit/prompts/setup-karpathy-wiki.md +0 -120
- /package/toolkit/{prompts/rnex-setup-karpathy-wiki.md → plugins/karpathy-llm/instructions/scaffolding-meta-prompt.md} +0 -0
package/docs/CLI.md
CHANGED
|
@@ -385,7 +385,6 @@ AI assistants navigate workflows via the catalog index at `.rnex/prompts/index.m
|
|
|
385
385
|
| [`rnex-workspace-audit.md`](../toolkit/prompts/rnex-workspace-audit.md) | Health, git dirty status, branch tracking, and configuration audit workflow. |
|
|
386
386
|
| [`rnex-wiki-ingest.md`](../toolkit/prompts/rnex-wiki-ingest.md) | Autonomous ingestion of source docs from `/raw/` into Karpathy LLM Wiki pages. |
|
|
387
387
|
| [`rnex-wiki-lint.md`](../toolkit/prompts/rnex-wiki-lint.md) | Link validation, backlink (`mentioned_in`) recalculation, and index rebuilding. |
|
|
388
|
-
| [`rnex-setup-karpathy-wiki.md`](../toolkit/prompts/rnex-setup-karpathy-wiki.md) | Scaffolding prompt for Karpathy LLM Wiki architecture in any repository. |
|
|
389
388
|
|
|
390
389
|
---
|
|
391
390
|
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Batch Execution (rnex exec)
|
|
3
|
+
description: Master sequential multi-repo task automation with rnex exec, argument escaping, and exit code bubbling.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Batch Execution (`rnex exec`)
|
|
7
|
+
|
|
8
|
+
`rnex exec` runs arbitrary shell commands sequentially across every active (enabled) member repository in `./repos/`.
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## Syntax
|
|
13
|
+
|
|
14
|
+
```sh
|
|
15
|
+
rnex exec <command...>
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
Repo Nexus automatically navigates into each enabled repository directory (`./repos/<name>`), runs the command in a subshell, prefixes output with repository headings, and checks exit codes.
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## Behavior & Execution Model
|
|
23
|
+
|
|
24
|
+
### Sequential Execution
|
|
25
|
+
Commands execute one repository at a time in the order declared in `rnex.yaml`. This ensures predictable output logs and avoids parallel resource contention during intensive builds or test suites.
|
|
26
|
+
|
|
27
|
+
### Exit Code Bubbling
|
|
28
|
+
If a command produces a non-zero exit code in any member repository:
|
|
29
|
+
1. `rnex exec` immediately prints an error header highlighting the failed repository.
|
|
30
|
+
2. Downstream repositories are aborted.
|
|
31
|
+
3. `rnex exec` exits with the failed command's exit code (`exit 1` or specific error code).
|
|
32
|
+
|
|
33
|
+
::: tip Continuous Execution
|
|
34
|
+
To continue through repositories regardless of errors, chain with a shell fallback:
|
|
35
|
+
```bash
|
|
36
|
+
rnex exec sh -c "npm test || true"
|
|
37
|
+
```
|
|
38
|
+
:::
|
|
39
|
+
|
|
40
|
+
---
|
|
41
|
+
|
|
42
|
+
## Common Use Cases & Examples
|
|
43
|
+
|
|
44
|
+
### 1. Multi-Repo Git Status
|
|
45
|
+
|
|
46
|
+
Inspect working tree changes across all repositories:
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
rnex exec git status -s
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
```text
|
|
53
|
+
=== [backend] ===
|
|
54
|
+
M src/routes.ts
|
|
55
|
+
?? test/new-test.ts
|
|
56
|
+
|
|
57
|
+
=== [frontend] ===
|
|
58
|
+
On branch main (working tree clean)
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
### 2. Fast-Forward Pull Across Repositories
|
|
62
|
+
|
|
63
|
+
Pull upstream changes cleanly:
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
rnex exec git pull --ff-only
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
### 3. Running Lints or Formatting
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
rnex exec npm run lint
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
### 4. Running Custom Shell Pipelines
|
|
76
|
+
|
|
77
|
+
For commands involving pipes, redirects, or complex variables, invoke them inside `sh -c`:
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
rnex exec sh -c "git branch --show-current && git log -1 --oneline"
|
|
81
|
+
```
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: CLI Overview & Cheatsheet
|
|
3
|
+
description: Fast reference cheatsheet for rnex commands, global options, environment variables, and exit codes.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# CLI Overview & Cheatsheet
|
|
7
|
+
|
|
8
|
+
`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.
|
|
9
|
+
|
|
10
|
+
## Quick Command Cheatsheet
|
|
11
|
+
|
|
12
|
+
| Command | Category | Description |
|
|
13
|
+
|:---|:---|:---|
|
|
14
|
+
| [`rnex init`](workspace.md#rnex-init) | Workspace | Initialize a new Repo Nexus workspace. |
|
|
15
|
+
| [`rnex status`](workspace.md#rnex-status) | Workspace | Inspect workspace health, clones, and AI instructions. |
|
|
16
|
+
| [`rnex fix` / `sync`](workspace.md#rnex-fix-alias-sync) | Workspace | Reconcile config, routing, prompts, and plugins. |
|
|
17
|
+
| [`rnex update` / `upgrade`](workspace.md#rnex-update-alias-upgrade) | Workspace | Safely upgrade workspace schema to installed CLI version. |
|
|
18
|
+
| [`rnex install`](workspace.md#rnex-install) | Workspace | Symlink `rnex` to `~/.local/bin`. |
|
|
19
|
+
| [`rnex completion`](workspace.md#rnex-completion) | Workspace | Generate shell auto-completion for Zsh, Bash, or Fish. |
|
|
20
|
+
| [`rnex version`](workspace.md#rnex-version) | Workspace | Display current installed CLI version. |
|
|
21
|
+
| [`rnex add`](repos.md#rnex-add) | Repositories | Register a git repository and clone it into `./repos/`. |
|
|
22
|
+
| [`rnex clone`](repos.md#rnex-clone) | Repositories | Clone all declared repositories missing from disk. |
|
|
23
|
+
| [`rnex list`](repos.md#rnex-list) | Repositories | Print table of registered member repositories. |
|
|
24
|
+
| [`rnex enable`](repos.md#rnex-enable-rnex-disable) | Repositories | Enable a repository (include in sync and exec). |
|
|
25
|
+
| [`rnex disable`](repos.md#rnex-enable-rnex-disable) | Repositories | Disable a repository (exclude from sync and exec). |
|
|
26
|
+
| [`rnex remove`](repos.md#rnex-remove) | Repositories | Unregister repository and delete clone from disk. |
|
|
27
|
+
| [`rnex rnex-dir`](repos.md#rnex-rnex-dir) | Repositories | Toggle `.rnex/` context inside member repository. |
|
|
28
|
+
| [`rnex exec`](execution.md) | Execution | Run arbitrary shell commands across all active repos. |
|
|
29
|
+
| [`rnex hooks`](tooling.md#git-hooks-automation) | Tooling | Manage automated Git hooks (`post-merge`, etc.). |
|
|
30
|
+
| [`rnex plugin`](tooling.md#plugin-management) | Tooling | List, inspect, enable, and disable workspace plugins. |
|
|
31
|
+
|
|
32
|
+
---
|
|
33
|
+
|
|
34
|
+
## Global Syntax & Flags
|
|
35
|
+
|
|
36
|
+
```sh
|
|
37
|
+
rnex [global-options] <command> [command-options] [arguments]
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
### Global Options Table
|
|
41
|
+
|
|
42
|
+
| Flag | Shorthand | Type | Description |
|
|
43
|
+
|:---|:---|:---|:---|
|
|
44
|
+
| `--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. |
|
|
45
|
+
| `--help` | `-h` | boolean | Display command usage and help summary. |
|
|
46
|
+
| `--version` | `-v` | boolean | Output CLI version. |
|
|
47
|
+
|
|
48
|
+
---
|
|
49
|
+
|
|
50
|
+
## Environment Variables
|
|
51
|
+
|
|
52
|
+
| Variable | Description |
|
|
53
|
+
|:---|:---|
|
|
54
|
+
| `RNEX_CONFIG` | Overrides the default configuration file path (`rnex.yaml`). |
|
|
55
|
+
| `NO_COLOR` | Disables ANSI color sequences in terminal output when set. |
|
|
56
|
+
|
|
57
|
+
---
|
|
58
|
+
|
|
59
|
+
## Exit Codes
|
|
60
|
+
|
|
61
|
+
| Code | Meaning |
|
|
62
|
+
|:---|:---|
|
|
63
|
+
| `0` | Success. |
|
|
64
|
+
| `1` | General error (missing config, invalid arguments, or failing `rnex exec` command). |
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Member Repository Commands
|
|
3
|
+
description: CLI reference for managing member repositories in Repo Nexus, including add, clone, list, enable, disable, remove, and rnex-dir.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Member Repository Commands
|
|
7
|
+
|
|
8
|
+
Member repository commands register, clone, toggle, and manage individual git repositories managed under `./repos/`.
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## `rnex add`
|
|
13
|
+
|
|
14
|
+
Registers a repository in configuration and immediately clones it into `./repos/<name>`.
|
|
15
|
+
|
|
16
|
+
### Syntax
|
|
17
|
+
```sh
|
|
18
|
+
rnex add [options] <name> <git-url>
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
### Parameters & Options
|
|
22
|
+
| Option | Type | Default | Description |
|
|
23
|
+
|:---|:---|:---|:---|
|
|
24
|
+
| `<name>` | string | *(required)* | Short identifier for repository (used as folder name in `./repos/`). |
|
|
25
|
+
| `<git-url>` | string | *(required)* | Remote Git clone URL (SSH or HTTPS). |
|
|
26
|
+
| `--local` | boolean | `false` | Registers repository in `.local.rnex.yaml` instead of team `rnex.yaml`. |
|
|
27
|
+
| `--disabled` | boolean | `false` | Registers repository with `enabled: false` (skips immediate clone). |
|
|
28
|
+
| `--no-rnex-dir` | boolean | `false` | Sets `rnex_dir: false`, leaving member repository completely untouched. |
|
|
29
|
+
|
|
30
|
+
### Examples
|
|
31
|
+
```bash
|
|
32
|
+
# Register and clone a shared team service
|
|
33
|
+
rnex add backend git@github.com:myorg/backend-api.git
|
|
34
|
+
|
|
35
|
+
# Register a private experiment on local machine only
|
|
36
|
+
rnex add --local experiment git@github.com:myorg/exp.git
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
|
|
41
|
+
## `rnex clone`
|
|
42
|
+
|
|
43
|
+
Clones all registered, enabled repositories missing on disk.
|
|
44
|
+
|
|
45
|
+
### Syntax
|
|
46
|
+
```sh
|
|
47
|
+
rnex clone
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
rnex clone
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
```text
|
|
55
|
+
[rnex] Cloning backend into ./repos/backend...
|
|
56
|
+
Cloning into './repos/backend'...
|
|
57
|
+
[rnex] All member repositories cloned successfully.
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
::: tip Ideal for Onboarding
|
|
61
|
+
Teammates cloning the meta-repo run `rnex clone` to fetch all member repositories in a single command.
|
|
62
|
+
:::
|
|
63
|
+
|
|
64
|
+
---
|
|
65
|
+
|
|
66
|
+
## `rnex list`
|
|
67
|
+
|
|
68
|
+
Outputs a formatted table of all registered member repositories, their active branches, clone state, and `.rnex` directory status.
|
|
69
|
+
|
|
70
|
+
### Syntax
|
|
71
|
+
```sh
|
|
72
|
+
rnex list
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
```text
|
|
76
|
+
Name Enabled Cloned Branch rnex-dir URL
|
|
77
|
+
backend yes yes main yes git@github.com:myorg/backend-api.git
|
|
78
|
+
frontend yes yes develop yes git@github.com:myorg/frontend-web.git
|
|
79
|
+
analytics no no - no git@github.com:myorg/analytics.git
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
---
|
|
83
|
+
|
|
84
|
+
## `rnex enable` & `rnex disable`
|
|
85
|
+
|
|
86
|
+
Toggles whether a member repository is active in workspace operations.
|
|
87
|
+
|
|
88
|
+
### Syntax
|
|
89
|
+
```sh
|
|
90
|
+
rnex enable [--local] <name>
|
|
91
|
+
rnex disable [--local] <name>
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
* When disabled, a repository is excluded from `rnex clone`, `rnex exec`, and AI agent routing.
|
|
95
|
+
* Pass `--local` to persist the toggle in `.local.rnex.yaml` without modifying team-wide `rnex.yaml`.
|
|
96
|
+
|
|
97
|
+
```bash
|
|
98
|
+
# Disable a memory-heavy service locally
|
|
99
|
+
rnex disable --local monolith
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
---
|
|
103
|
+
|
|
104
|
+
## `rnex remove`
|
|
105
|
+
|
|
106
|
+
Unregisters a member repository from configuration and deletes its clone from `./repos/<name>`.
|
|
107
|
+
|
|
108
|
+
### Syntax
|
|
109
|
+
```sh
|
|
110
|
+
rnex remove <name>
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
::: danger Destructive Operation
|
|
114
|
+
`rnex remove` deletes the target repository folder from disk. Always ensure you have pushed any working branches or uncommitted changes to remote before confirming deletion.
|
|
115
|
+
:::
|
|
116
|
+
|
|
117
|
+
---
|
|
118
|
+
|
|
119
|
+
## `rnex rnex-dir`
|
|
120
|
+
|
|
121
|
+
Toggles member-level context projection inside `repos/<name>/.rnex/`.
|
|
122
|
+
|
|
123
|
+
### Syntax
|
|
124
|
+
```sh
|
|
125
|
+
rnex rnex-dir <enable|disable> <name>
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
* When enabled, workspace prompts and plugin context are projected into `repos/<name>/.rnex/` for localized AI assistants.
|
|
129
|
+
* When disabled, the repository root remains completely pristine.
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Tooling & Git Hooks
|
|
3
|
+
description: CLI reference for automated Git hooks management and modular plugin operations in Repo Nexus.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Tooling & Git Hooks
|
|
7
|
+
|
|
8
|
+
This section covers the `rnex hooks` and `rnex plugin` command suites used to configure workspace automations and modular integrations.
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## Git Hooks Automation
|
|
13
|
+
|
|
14
|
+
Repo Nexus configures workspace-level Git hooks using Git's native `core.hooksPath = .rnex/hooks`.
|
|
15
|
+
|
|
16
|
+
### `rnex hooks install`
|
|
17
|
+
Installs native hook scripts into `.rnex/hooks/` and sets `git_hooks: true` in configuration.
|
|
18
|
+
|
|
19
|
+
```sh
|
|
20
|
+
rnex hooks install [--local]
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
#### Installed Hooks:
|
|
24
|
+
* **`post-merge`**: Runs `rnex fix -y --quiet` automatically whenever `git pull` or upstream merges occur, ensuring newly added repositories and plugin updates sync instantly.
|
|
25
|
+
* **`post-commit`**: Alerts the user if documentation or wiki files were committed without running maintenance linters.
|
|
26
|
+
* **`pre-commit`**: Runs pre-commit validation triggers declared by active plugins.
|
|
27
|
+
* **`pre-push`**: Runs pre-push validation triggers before pushing to remote.
|
|
28
|
+
|
|
29
|
+
### `rnex hooks status`
|
|
30
|
+
Displays the active hooks configuration, current Git `core.hooksPath`, installed hook dispatchers, and active plugin triggers.
|
|
31
|
+
|
|
32
|
+
```sh
|
|
33
|
+
rnex hooks status
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
### `rnex hooks uninstall`
|
|
37
|
+
Unsets `core.hooksPath`, removes `.rnex/hooks/`, and sets `git_hooks: false` in configuration.
|
|
38
|
+
|
|
39
|
+
```sh
|
|
40
|
+
rnex hooks uninstall [--local]
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
45
|
+
## Plugin Management
|
|
46
|
+
|
|
47
|
+
Plugins provide AI routing rules, standardized prompts, agent workflows, and shared context protocols.
|
|
48
|
+
|
|
49
|
+
### `rnex plugin list`
|
|
50
|
+
Displays all available plugins distributed with `rnex` and indicates whether they are enabled.
|
|
51
|
+
|
|
52
|
+
```sh
|
|
53
|
+
rnex plugin list
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
```text
|
|
57
|
+
Plugin Category Status Description
|
|
58
|
+
claude AI Provider enabled Anthropic Claude Code & Desktop
|
|
59
|
+
copilot AI Provider disabled GitHub Copilot workspace rules
|
|
60
|
+
cursor AI Provider enabled Cursor IDE rules & context
|
|
61
|
+
gemini AI Provider disabled Google Gemini & Antigravity
|
|
62
|
+
karpathy-llm Knowledge/Rules enabled Karpathy LLM 4 Cardinal Rules & Wiki
|
|
63
|
+
windsurf AI Provider disabled Windsurf IDE rules & context
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
### `rnex plugin info`
|
|
67
|
+
Displays detailed metadata, configurable YAML options, and scoped assets for a specific plugin.
|
|
68
|
+
|
|
69
|
+
```sh
|
|
70
|
+
rnex plugin info <name>
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
rnex plugin info claude
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
### `rnex plugin enable`
|
|
78
|
+
Enables a plugin, creates `.rnex/plugins/<name>/`, and syncs mirrored assets.
|
|
79
|
+
|
|
80
|
+
```sh
|
|
81
|
+
rnex plugin enable [--local] <name>
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
* Pass `--local` to enable the plugin only in `.local.rnex.yaml` without changing team configuration.
|
|
85
|
+
|
|
86
|
+
### `rnex plugin disable`
|
|
87
|
+
Disables a plugin and cleans up its assets from `.rnex/plugins/<name>/`.
|
|
88
|
+
|
|
89
|
+
```sh
|
|
90
|
+
rnex plugin disable [--local] <name>
|
|
91
|
+
```
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Workspace Commands
|
|
3
|
+
description: CLI reference for rnex workspace lifecycle commands including init, status, fix, sync, update, completion, and install.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Workspace Commands
|
|
7
|
+
|
|
8
|
+
Workspace commands manage the meta-repo configuration, AI routing files, health diagnostics, and environment integrations.
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## `rnex init`
|
|
13
|
+
|
|
14
|
+
Initializes a new Repo Nexus Virtual Meta-Repo workspace.
|
|
15
|
+
|
|
16
|
+
### Syntax
|
|
17
|
+
```sh
|
|
18
|
+
rnex init [options] [directory]
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
### Parameters & Options
|
|
22
|
+
| Option | Shorthand | Type | Default | Description |
|
|
23
|
+
|:---|:---|:---|:---|:---|
|
|
24
|
+
| `directory` | | string | `$PWD` | Target directory to initialize. |
|
|
25
|
+
| `--yes` | `-y` | boolean | `false` | Non-interactive mode; accepts all defaults automatically. |
|
|
26
|
+
| `--code-workspace` | | boolean \| string | `false` | Enable VS Code multi-root workspace file. Pass string for custom name. |
|
|
27
|
+
| `--hooks` | | boolean | `true` (if git) | Force-enable automated Git hooks setup during initialization. |
|
|
28
|
+
| `--no-hooks` | | boolean | `false` | Skip Git hooks configuration during initialization. |
|
|
29
|
+
| `--claude` | | boolean | `false` | Enable Claude Code plugin (`CLAUDE.md` and `.claude/`). |
|
|
30
|
+
| `--copilot` | | boolean | `false` | Enable GitHub Copilot plugin (`.github/`). |
|
|
31
|
+
| `--cursor` | | boolean | `false` | Enable Cursor plugin (`.cursorrules` and `.cursor/rules/`). |
|
|
32
|
+
| `--gemini` | | boolean | `false` | Enable Google Gemini plugin (`GEMINI.md` and `.gemini/`). |
|
|
33
|
+
| `--windsurf` | | boolean | `false` | Enable Windsurf plugin (`.windsurfrules` and `.windsurf/`). |
|
|
34
|
+
|
|
35
|
+
### Examples
|
|
36
|
+
```bash
|
|
37
|
+
# Interactive setup
|
|
38
|
+
rnex init
|
|
39
|
+
|
|
40
|
+
# Non-interactive initialization for CI or automated setup
|
|
41
|
+
rnex init -y --claude --hooks
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
---
|
|
45
|
+
|
|
46
|
+
## `rnex status`
|
|
47
|
+
|
|
48
|
+
Performs comprehensive diagnostic and health checks across the workspace.
|
|
49
|
+
|
|
50
|
+
### Syntax
|
|
51
|
+
```sh
|
|
52
|
+
rnex status
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
### What It Reports
|
|
56
|
+
* **Configuration State**: Location and schema version of `rnex.yaml` and `.local.rnex.yaml`.
|
|
57
|
+
* **Git Status**: Validation that `.gitignore` ignores `repos/` and local files, and whether `core.hooksPath` points to `.rnex/hooks`.
|
|
58
|
+
* **AI Routing**: Existence of delimited routing blocks in `AGENTS.md`, `CLAUDE.md`, etc.
|
|
59
|
+
* **Member Clones**: Health, branches, and `.rnex` state of every member repository.
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
rnex status
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
```text
|
|
66
|
+
[rnex] Workspace root: /workspace
|
|
67
|
+
[rnex] Config: rnex.yaml (.local.rnex.yaml loaded)
|
|
68
|
+
[rnex] Repositories: 2 active, 0 disabled
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
---
|
|
72
|
+
|
|
73
|
+
## `rnex fix` (alias: `sync`)
|
|
74
|
+
|
|
75
|
+
Reconciles workspace configuration, AI routing blocks, prompts catalog, active plugins, and member clones.
|
|
76
|
+
|
|
77
|
+
### Syntax
|
|
78
|
+
```sh
|
|
79
|
+
rnex fix [options]
|
|
80
|
+
rnex sync [options]
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
### Options
|
|
84
|
+
| Option | Shorthand | Type | Default | Description |
|
|
85
|
+
|:---|:---|:---|:---|:---|
|
|
86
|
+
| `--yes` | `-y` | boolean | `false` | Automatically confirm schema upgrades if prompted. |
|
|
87
|
+
| `--quiet` | `-q` | boolean | `false` | Quiet mode; suppresses non-error informational messages (ideal for hooks). |
|
|
88
|
+
| `--upgrade` | | boolean | `false` | Explicitly trigger version upgrade reconciliation. |
|
|
89
|
+
|
|
90
|
+
### Reconciliation Actions
|
|
91
|
+
1. Upgrades configuration schema non-destructively if older version detected.
|
|
92
|
+
2. Re-verifies `.gitignore` rules for `repos/` and local configs.
|
|
93
|
+
3. Inserts or updates delimited routing blocks (`<!-- REPO-NEXUS:START -->` ... `<!-- REPO-NEXUS:END -->`).
|
|
94
|
+
4. Syncs standardized workflow prompts into `.rnex/prompts/`.
|
|
95
|
+
5. Re-syncs enabled plugin assets into `.rnex/plugins/` and member `repos/<name>/.rnex/`.
|
|
96
|
+
|
|
97
|
+
---
|
|
98
|
+
|
|
99
|
+
## `rnex update` (alias: `upgrade`)
|
|
100
|
+
|
|
101
|
+
Safely updates an existing workspace's configuration schema and routing instructions to match the currently installed CLI version.
|
|
102
|
+
|
|
103
|
+
### Syntax
|
|
104
|
+
```sh
|
|
105
|
+
rnex update [-y]
|
|
106
|
+
rnex upgrade [-y]
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
* Upgrades configuration schema without wiping comments or indentation.
|
|
110
|
+
* Reconciles AI instructions and active provider plugins in a single run.
|
|
111
|
+
|
|
112
|
+
---
|
|
113
|
+
|
|
114
|
+
## `rnex install`
|
|
115
|
+
|
|
116
|
+
Symlinks the `rnex` and `repo-nexus` executables into a user or system bin directory.
|
|
117
|
+
|
|
118
|
+
### Syntax
|
|
119
|
+
```sh
|
|
120
|
+
rnex install [bin-directory]
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
* Default target: `~/.local/bin`
|
|
124
|
+
* Creates symlinks for both `rnex` and `repo-nexus`.
|
|
125
|
+
|
|
126
|
+
---
|
|
127
|
+
|
|
128
|
+
## `rnex completion`
|
|
129
|
+
|
|
130
|
+
Generates shell auto-completion scripts.
|
|
131
|
+
|
|
132
|
+
### Syntax
|
|
133
|
+
```sh
|
|
134
|
+
rnex completion <bash|zsh|fish>
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
::: code-group
|
|
138
|
+
|
|
139
|
+
```sh [Zsh]
|
|
140
|
+
# Add to ~/.zshrc
|
|
141
|
+
source <(rnex completion zsh)
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
```sh [Bash]
|
|
145
|
+
# Add to ~/.bashrc
|
|
146
|
+
source <(rnex completion bash)
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
```sh [Fish]
|
|
150
|
+
# Add to ~/.config/fish/config.fish
|
|
151
|
+
rnex completion fish | source
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
:::
|
|
155
|
+
|
|
156
|
+
---
|
|
157
|
+
|
|
158
|
+
## `rnex version`
|
|
159
|
+
|
|
160
|
+
Prints the installed version of `rnex`.
|
|
161
|
+
|
|
162
|
+
```bash
|
|
163
|
+
rnex version
|
|
164
|
+
# or:
|
|
165
|
+
rnex -v
|
|
166
|
+
```
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Cross-Repo AI Workflows
|
|
3
|
+
description: Practical walkthrough of executing cross-cutting features, workspace audits, and multi-agent refactoring with Repo Nexus.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Cross-Repo AI Workflows
|
|
7
|
+
|
|
8
|
+
One of the greatest challenges with AI coding assistants in multi-repo setups is context isolation: agents operating inside one repository cannot easily coordinate changes across upstream or downstream services.
|
|
9
|
+
|
|
10
|
+
Repo Nexus equips AI assistants with standardized cross-repo workflows located in `.rnex/prompts/`.
|
|
11
|
+
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
## The Prompts Catalog
|
|
15
|
+
|
|
16
|
+
When a workspace is initialized, Repo Nexus seeds `.rnex/prompts/` with specialized agent workflow templates:
|
|
17
|
+
|
|
18
|
+
| Workflow Prompt | Target Agent Goal |
|
|
19
|
+
|:---|:---|
|
|
20
|
+
| `rnex-cross-repo-feature.md` | Implement an end-to-end feature across backend, frontend, and shared contracts. |
|
|
21
|
+
| `rnex-workspace-audit.md` | Audit git status, unpushed branches, dirty files, and schema health. |
|
|
22
|
+
| `rnex-wiki-ingest.md` | Ingest raw documentation from `/raw/` into Karpathy LLM Wiki pages. |
|
|
23
|
+
| `rnex-wiki-lint.md` | Validate markdown links, compute backlinks, and update the master index. |
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
## Executing a Cross-Repo Feature
|
|
28
|
+
|
|
29
|
+
### 1. Invoke the Prompt in Your AI Assistant
|
|
30
|
+
In Claude Code, Cursor, or Gemini, invoke the workflow:
|
|
31
|
+
|
|
32
|
+
```text
|
|
33
|
+
Follow the workflow in .rnex/prompts/rnex-cross-repo-feature.md to add OAuth2 login support across backend and web-client.
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
### 2. Autonomous Execution Sequence
|
|
37
|
+
The agent follows a 4-stage protocol:
|
|
38
|
+
1. **Context Orientation**: Inspects `rnex.yaml` to identify member repositories and locate contract definitions in `repos/contracts/`.
|
|
39
|
+
2. **Schema & Contract Definition**: Modifies the shared protocol or OpenAPI spec first.
|
|
40
|
+
3. **Service Implementation**: Applies backend API handlers in `repos/backend/` and updates frontend client components in `repos/web-client/`.
|
|
41
|
+
4. **Verification**: Executes workspace-wide verification via `rnex exec npm test`.
|
|
42
|
+
|
|
43
|
+
### 3. Preserving Commits per Repository
|
|
44
|
+
Because each repository in `./repos/` is a standard Git repository, the agent commits changes directly in each repository root without creating messy parent commit dependencies:
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
cd repos/contracts && git commit -m "feat(auth): define oauth2 schema"
|
|
48
|
+
cd ../backend && git commit -m "feat(auth): implement oauth2 endpoints"
|
|
49
|
+
cd ../web-client && git commit -m "feat(auth): add login buttons"
|
|
50
|
+
```
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Workstation Local Overrides
|
|
3
|
+
description: How to customize your local developer environment with .local.rnex.yaml without polluting team-wide configuration.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Workstation Local Overrides
|
|
7
|
+
|
|
8
|
+
In large multi-repo workspaces, not every engineer needs all repositories cloned, nor do all developers use the same IDE. Repo Nexus solves this using `.local.rnex.yaml`.
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## Scenario: Resource-Constrained Laptop
|
|
13
|
+
|
|
14
|
+
Your team's `rnex.yaml` declares 6 services including a heavy analytics pipeline and machine learning models. You are working exclusively on the frontend and user auth API.
|
|
15
|
+
|
|
16
|
+
### Creating `.local.rnex.yaml`
|
|
17
|
+
|
|
18
|
+
Create `.local.rnex.yaml` in your workspace root (it is gitignored automatically):
|
|
19
|
+
|
|
20
|
+
```yaml
|
|
21
|
+
repos:
|
|
22
|
+
# Disable repositories you do not need
|
|
23
|
+
ml-service:
|
|
24
|
+
enabled: false
|
|
25
|
+
analytics-pipeline:
|
|
26
|
+
enabled: false
|
|
27
|
+
big-data-spark:
|
|
28
|
+
enabled: false
|
|
29
|
+
|
|
30
|
+
# Pin your personal active branch for backend
|
|
31
|
+
backend:
|
|
32
|
+
branch: feature/auth-refactor
|
|
33
|
+
|
|
34
|
+
plugins:
|
|
35
|
+
# Enable your personal editor preference
|
|
36
|
+
cursor:
|
|
37
|
+
rules: true
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
### Apply the Overrides
|
|
41
|
+
|
|
42
|
+
Run `rnex fix` to reconcile your local configuration:
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
rnex fix
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
```text
|
|
49
|
+
[rnex] Reconciling configuration...
|
|
50
|
+
[rnex] Loaded team configuration: rnex.yaml
|
|
51
|
+
[rnex] Applied local overrides: .local.rnex.yaml
|
|
52
|
+
[rnex] 3 repositories active, 3 disabled.
|
|
53
|
+
[rnex] Updated workspace.code-workspace.
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
---
|
|
57
|
+
|
|
58
|
+
## Toggling via CLI
|
|
59
|
+
|
|
60
|
+
You can also set local overrides directly from the CLI using the `--local` flag:
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
# Disable a repository locally
|
|
64
|
+
rnex disable --local analytics-pipeline
|
|
65
|
+
|
|
66
|
+
# Enable a personal plugin locally
|
|
67
|
+
rnex plugin enable --local gemini
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
Both commands update `.local.rnex.yaml`, leaving team-wide `rnex.yaml` completely untouched for Git commits.
|