repo-nexus 0.1.0 β†’ 0.1.2

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.
Files changed (4) hide show
  1. package/README.md +5 -0
  2. package/docs/FAQ.md +208 -0
  3. package/package.json +2 -2
  4. package/rnex +22 -22
package/README.md CHANGED
@@ -5,6 +5,7 @@
5
5
  [![License: MIT](https://img.shields.io/github/license/nu-nenoi/repo-nexus)](LICENSE)
6
6
  [![POSIX Compatible](https://img.shields.io/badge/POSIX-compatible-success)](#)
7
7
  [![Platform](https://img.shields.io/badge/Platform-macOS%20%7C%20Linux-lightgrey)](#)
8
+ [![FAQ](https://img.shields.io/badge/docs-FAQ-blue.svg)](docs/FAQ.md)
8
9
 
9
10
  A tooling-independent, zero-dependency workspace orchestrator for multiple repositories with shared, auto-synced AI context across projects using Unix symlinks.
10
11
 
@@ -16,6 +17,8 @@ A tooling-independent, zero-dependency workspace orchestrator for multiple repos
16
17
  - **Context-aware**: Finds and uses `rnex.yaml` automatically from your current directory or parent tree
17
18
  - **Zero dependencies** (pure POSIX shell CLI)
18
19
 
20
+ > πŸ’‘ **Have questions?** Check out the **[Frequently Asked Questions (FAQ)](docs/FAQ.md)** for architecture deep dives, Git workflows, and AI context strategies.
21
+
19
22
  ---
20
23
 
21
24
  ## How It Works: The Two Symlink Flows
@@ -172,6 +175,7 @@ repos:
172
175
  ```
173
176
 
174
177
  > See [`docs/rnex.example.yaml`](docs/rnex.example.yaml) for a comprehensive example with all options and supported AI tool configs.
178
+ > For common questions and architecture details, see the [Frequently Asked Questions (FAQ)](docs/FAQ.md).
175
179
 
176
180
  ---
177
181
 
@@ -246,6 +250,7 @@ repo-nexus/
246
250
  β”œβ”€β”€ AGENTS.md # Universal AI coding guidelines
247
251
  β”œβ”€β”€ docs/
248
252
  β”‚ β”œβ”€β”€ AGENTS.sample.md # Template for AGENTS.md
253
+ β”‚ β”œβ”€β”€ FAQ.md # Frequently Asked Questions
249
254
  β”‚ └── rnex.example.yaml # Full config reference with examples
250
255
  β”œβ”€β”€ .github/
251
256
  β”‚ β”œβ”€β”€ workflows/ci.yml # GitHub Actions CI workflow
package/docs/FAQ.md ADDED
@@ -0,0 +1,208 @@
1
+ # Frequently Asked Questions (FAQ)
2
+
3
+ This document answers common questions about **Repo Nexus (`rnex`)**, why it exists, who it helps, how it handles Git and AI context, and how to use it effectively.
4
+
5
+ ---
6
+
7
+ ## Table of Contents
8
+
9
+ - [Overview & Value Proposition](#overview--value-proposition)
10
+ - [Why do I need rnex?](#why-do-i-need-rnex)
11
+ - [Who is this useful and interesting for?](#who-is-this-useful-and-interesting-for)
12
+ - [Why not just use a monorepo or Git submodules?](#why-not-just-use-a-monorepo-or-git-submodules)
13
+ - [Architecture & Mechanics](#architecture--mechanics)
14
+ - [How does rnex work without copying files?](#how-does-rnex-work-without-copying-files)
15
+ - [What is "Scope In" vs. "Inject Out"?](#what-is-scope-in-vs-inject-out)
16
+ - [Can I use Git commands (pull, push, commit) on symlinked repos?](#can-i-use-git-commands-pull-push-commit-on-symlinked-repos)
17
+ - [Can AI agents create and modify files inside member repos via symlinks?](#can-ai-agents-create-and-modify-files-inside-member-repos-via-symlinks)
18
+ - [Will rnex interfere with Git branches, remotes, or commit histories?](#will-rnex-interfere-with-git-branches-remotes-or-commit-histories)
19
+ - [AI Context Strategy: Workspace vs. Member Repos](#ai-context-strategy-workspace-vs-member-repos)
20
+ - [Do I need rnex to inject symlinks into my member repos?](#do-i-need-rnex-to-inject-symlinks-into-my-member-repos)
21
+ - [How should AI instructions be structured across repos? (Committed files vs. symlinks)](#how-should-ai-instructions-be-structured-across-repos-committed-files-vs-symlinks)
22
+ - [Which AI assistants and configuration files are supported?](#which-ai-assistants-and-configuration-files-are-supported)
23
+ - [How do I prevent AI agents from running out of context or token bloat?](#how-do-i-prevent-ai-agents-from-running-out-of-context-or-token-bloat)
24
+ - [Platforms & Setup](#platforms--setup)
25
+ - [What are the system requirements? Does it work on Windows?](#what-are-the-system-requirements-does-it-work-on-windows)
26
+ - [Does rnex have external dependencies?](#does-rnex-have-external-dependencies)
27
+ - [What files in a workspace should be committed to Git?](#what-files-in-a-workspace-should-be-committed-to-git)
28
+ - [How do I fix broken or missing symlinks?](#how-do-i-fix-broken-or-missing-symlinks)
29
+
30
+ ---
31
+
32
+ ## Overview & Value Proposition
33
+
34
+ ### Why do I need rnex?
35
+
36
+ Modern AI coding assistants (like Cursor, Claude Code, GitHub Copilot, and Antigravity) are designed around a single project root. In real-world software development, applications are rarely confined to a single repositoryβ€”they are split into frontend apps, backend APIs, shared libraries, infrastructure, and documentation.
37
+
38
+ This creates two major frictions:
39
+ 1. **Siloed Context**: To perform cross-service tasks (e.g. updating an API endpoint and consuming it in the web frontend), you must juggle multiple IDE windows or repeatedly explain code structures between projects.
40
+ 2. **Instruction Drift**: As you tune your AI coding guidelines (like coding style, testing requirements, or forbidden patterns), keeping these instructions synced across 5, 10, or 20 separate repositories requires tedious manual updates.
41
+
42
+ **`rnex` solves both problems**:
43
+ - It unites independent repositories under one virtual workspace using Unix symlinks.
44
+ - It provides a single source of truth for shared AI context files (`AGENTS.md`, Copilot instructions, Cursor rules) without requiring monorepo migrations.
45
+
46
+ ---
47
+
48
+ ### Who is this useful and interesting for?
49
+
50
+ - **Polyrepo & Microservice Developers**: Engineers whose day-to-day work spans multiple microservices or separated frontends and backends, and who want an AI assistant that can navigate across repository boundaries seamlessly.
51
+ - **Tech Leads & Platform Teams**: Engineering leaders who want to standardize AI instructions and architectural constraints across team repositories without forcing developers into a monorepo.
52
+ - **Solo Developers & Indie Hackers**: Creators juggling a collection of related projects (e.g., mobile app + backend API + landing page + SDK) who want rapid cross-project AI capabilities.
53
+ - **AI Agent Power Users**: Developers using multi-repo autonomous agents (such as Claude Code, Aider, or Antigravity) that require unified file tree visibility.
54
+
55
+ ---
56
+
57
+ ### Why not just use a monorepo or Git submodules?
58
+
59
+ | Solution | Drawbacks | How `rnex` compares |
60
+ | :--- | :--- | :--- |
61
+ | **Git Monorepo** | Heavy migration effort, combined CI/CD pipelines, complex permission management, slow Git checkouts. | **Zero migration**: Repositories remain completely independent with their own remotes, histories, and deployment pipelines. |
62
+ | **Git Submodules** | Detached HEAD states, tricky merge conflicts, complex multi-step commits, rigid parent-child coupling. | **No Git friction**: Member repositories are linked via filesystem symlinks. Git never tracks other repos as submodules. |
63
+ | **Manual Copy-Paste** | AI configuration files rapidly drift out of sync across repositories. | **Auto-synced**: Edit `AGENTS.md` once in the workspace; changes immediately reflect across all member repositories. |
64
+
65
+ ---
66
+
67
+ ## Architecture & Mechanics
68
+
69
+ ### How does rnex work without copying files?
70
+
71
+ `rnex` uses native **Unix symbolic links (symlinks)**. Symlinks act as transparent pointers at the filesystem level. Rather than duplicating files or creating complex mount points, your operating system, Git, and IDE resolve the symlinks directly to the original directories on disk.
72
+
73
+ ---
74
+
75
+ ### What is "Scope In" vs. "Inject Out"?
76
+
77
+ `rnex` offers two complementary symlink flows:
78
+
79
+ 1. **Scope In (Repos into Workspace)**:
80
+ When you run `rnex add <name> <path>`, a symlink is created at `repos/<name>` pointing to the source project directory. Opening the workspace directory in your editor gives you (and your AI assistant) full access to all linked repositories in a single file tree.
81
+ 2. **Inject Out (AI Context into Member Repos)**:
82
+ Shared configuration files defined in `rnex.yaml` (such as `AGENTS.md`) can be symlinked from the workspace into the root of every member repository. Opening a repository standalone allows standalone IDE windows to discover the shared rules as local files.
83
+
84
+ ---
85
+
86
+ ### Can I use Git commands (pull, push, commit) on symlinked repos?
87
+
88
+ **Yes.** Git works completely normally.
89
+ * **Operating inside `repos/<name>/`**: When you or your IDE navigate into `repos/<name>/` and run `git status`, `git commit`, `git pull`, or `git push`, Git follows the symlink, discovers the real `.git` directory, and operates directly against that repository's own branches and remotes.
90
+ * **Operating in the source directory**: Any changes made from the workspace are immediately present in the source repo on disk. You can run all Git operations in the original folder as usual.
91
+
92
+ ---
93
+
94
+ ### Can AI agents create and modify files inside member repos via symlinks?
95
+
96
+ **Yes.** Any file an AI agent creates or edits under `repos/<name>/...` (e.g. `repos/backend/src/service.ts`) is written **directly through the symlink into the underlying repository on disk**.
97
+ - These are genuine application files, not symlinks.
98
+ - They are immediately detected by Git in that member repo.
99
+ - You or the agent can commit and push them directly to that repository.
100
+
101
+ ---
102
+
103
+ ### Will rnex interfere with Git branches, remotes, or commit histories?
104
+
105
+ **No.** Each member repository retains its own Git history, remotes, and branch topology.
106
+ The Repo Nexus workspace ignores `repos/` in `.gitignore`, ensuring your workspace Git repository never accidentally tracks or commits member repository contents.
107
+
108
+ ---
109
+
110
+ ## AI Context Strategy: Workspace vs. Member Repos
111
+
112
+ ### Do I need rnex to inject symlinks into my member repos?
113
+
114
+ **Not necessarily.** If your primary workflow is opening the Nexus workspace root (or relying on global workstation AI configs), you do **not** need `rnex` to inject symlinks into member repos.
115
+
116
+ Running in **Zero-Touch Mode** (`ai_files: []` in `rnex.yaml`):
117
+ - Keeps member repositories 100% pristine.
118
+ - Prevents temporary symlinks or `.gitignore` modifications inside member repos.
119
+ - The AI agent will read `AGENTS.md` directly from the workspace root and apply it across all linked projects.
120
+
121
+ "Inject Out" is only needed if you frequently open individual member repositories standalone in an editor without opening the Nexus workspace, yet still want that standalone window to pick up shared rules.
122
+
123
+ ---
124
+
125
+ ### How should AI instructions be structured across repos? (Committed files vs. symlinks)
126
+
127
+ The cleanest architecture separates concerns into two distinct layers:
128
+
129
+ 1. **Workspace Level (Nexus Root)**:
130
+ Contains multi-repo context, cross-service orchestrations, and workspace-wide rules in `AGENTS.md`.
131
+ 2. **Member Repo Level (Committed Files)**:
132
+ Individual repositories can maintain their own domain-specific AI instructions (e.g., repository `.cursorrules`, `CLAUDE.md`, or component conventions) as **real, first-class files committed to Git**.
133
+
134
+ **Why real committed files are better than injected symlinks for member repos**:
135
+ - **Shared with the Team**: Anyone on the team who clones the repo immediately gets the rules without needing `rnex` or symlinks.
136
+ - **No Path Fragility**: Symlinks pointing back to an external workspace break if cloned on another computer or Windows. Committed files never break.
137
+ - **Repository Autonomy**: Each project remains self-documenting and independent.
138
+
139
+ ---
140
+
141
+ ### Which AI assistants and configuration files are supported?
142
+
143
+ `rnex` is tool-agnostic and auto-detects or syncs standard configuration files for:
144
+
145
+ - **Universal Agents**: `AGENTS.md`
146
+ - **Claude Code**: `CLAUDE.md`
147
+ - **Cursor**: `.cursorrules`, `.cursor/rules/`
148
+ - **Windsurf / Codeium**: `.windsurfrules`, `.windsurf/rules/`
149
+ - **GitHub Copilot**: `.github/copilot-instructions.md`
150
+ - **Aider**: `.aider.conf.yml`, `CONVENTIONS.md`
151
+ - **Cline / Roo Code**: `.clinerules`
152
+ - **Codex**: `CODEX.md`
153
+ - **Continue.dev**: `.continue/`
154
+ - **Skills Standards**: `SKILL.md`
155
+
156
+ You can add any custom file or prompt template to the `ai_files` list in `rnex.yaml`.
157
+
158
+ ---
159
+
160
+ ### How do I prevent AI agents from running out of context or token bloat?
161
+
162
+ When managing many repositories, exposing all of them at once can fill your AI model's context window or increase prompt latency.
163
+
164
+ `rnex` provides scope toggles:
165
+ - **`rnex hide <name>`**: Temporarily removes the symlink from `repos/`, hiding the repo from active AI indexing without unregistering it.
166
+ - **`rnex show <name>`**: Restores the symlink to active workspace scope when you need to work on it again.
167
+ - **`rnex list`**: Displays which repos are currently `visible` or `hidden`.
168
+
169
+ ---
170
+
171
+ ## Platforms & Setup
172
+
173
+ ### What are the system requirements? Does it work on Windows?
174
+
175
+ - **Supported Platforms**: macOS and Linux.
176
+ - **Windows**: Not officially supported natively due to Windows symlink permission restrictions (requiring Developer Mode or elevated privileges) and POSIX shell requirements. However, `rnex` runs smoothly inside **WSL2 (Windows Subsystem for Linux)**.
177
+
178
+ ---
179
+
180
+ ### Does rnex have external dependencies?
181
+
182
+ **No.** The `rnex` executable is written in pure POSIX shell script (`/bin/sh`) with zero runtime dependencies. It does not require Node.js, Python, or external package managers to function.
183
+
184
+ For convenience, `rnex` is also published as an npm package (`npm install -g repo-nexus`) so JavaScript/TypeScript developers can install it globally via standard tooling.
185
+
186
+ ---
187
+
188
+ ### What files in a workspace should be committed to Git?
189
+
190
+ In your Repo Nexus workspace repository:
191
+ - **Commit**: `rnex.yaml`, `AGENTS.md`, documentation (`docs/`), toolkit prompts/templates, and CI configs.
192
+ - **Do NOT Commit**: `repos/` (this directory should always be in `.gitignore`, as it only contains local symlinks to your projects).
193
+
194
+ ---
195
+
196
+ ### How do I fix broken or missing symlinks?
197
+
198
+ If you move a repository, clone a workspace on a new machine, or notice missing symlinks, run:
199
+
200
+ ```bash
201
+ rnex sync
202
+ ```
203
+
204
+ This command reconciles all symlinks for member repositories and AI context files defined in `rnex.yaml`, repairing broken links and ensuring your workspace is healthy. To inspect the current status, run:
205
+
206
+ ```bash
207
+ rnex status
208
+ ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "repo-nexus",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "description": "Tooling-independent multi-repo workspace manager with auto-synced AI context via symlinks",
5
5
  "bin": {
6
6
  "repo-nexus": "./rnex",
@@ -43,4 +43,4 @@
43
43
  "darwin",
44
44
  "linux"
45
45
  ]
46
- }
46
+ }
package/rnex CHANGED
@@ -20,11 +20,11 @@ fi
20
20
 
21
21
  # ---- Logging ---------------------------------------------------------------
22
22
 
23
- log_ok() { printf "${_G}[βœ“]${_NC} %s\n" "$1"; }
24
- log_warn() { printf "${_Y}[!]${_NC} %s\n" "$1"; }
25
- log_err() { printf "${_R}[βœ—]${_NC} %s\n" "$1" >&2; }
26
- log_info() { printf "${_C}[i]${_NC} %s\n" "$1"; }
27
- log_dim() { printf "${_DIM} %s${_NC}\n" "$1"; }
23
+ log_ok() { printf '%b[βœ“]%b %b\n' "$_G" "$_NC" "$1"; }
24
+ log_warn() { printf '%b[!]%b %b\n' "$_Y" "$_NC" "$1"; }
25
+ log_err() { printf '%b[βœ—]%b %b\n' "$_R" "$_NC" "$1" >&2; }
26
+ log_info() { printf '%b[i]%b %b\n' "$_C" "$_NC" "$1"; }
27
+ log_dim() { printf '%b %b%b\n' "$_DIM" "$1" "$_NC"; }
28
28
  die() { log_err "$1"; exit 1; }
29
29
 
30
30
  # ---- Path Utilities --------------------------------------------------------
@@ -377,13 +377,13 @@ AGENTS_EOF
377
377
  fi
378
378
 
379
379
  # ---- Auto-detect existing AI config files --------------------------------
380
- printf "\n${_BOLD}Scanning for existing AI configuration files...${_NC}\n"
380
+ printf '\n%b%s%b\n' "$_BOLD" "Scanning for existing AI configuration files..." "$_NC"
381
381
 
382
382
  # Display detected files
383
383
  echo "$_AI_KNOWN_FILES" | while IFS='|' read -r _pattern _desc; do
384
384
  [ -n "$_pattern" ] || continue
385
385
  if [ -e "$_target_dir/$_pattern" ]; then
386
- printf " ${_G}βœ“${_NC} Found: ${_BOLD}%s${_NC} ${_DIM}(%s)${_NC}\n" "$_pattern" "$_desc"
386
+ printf ' %bβœ“%b Found: %b%s%b %b(%s)%b\n' "$_G" "$_NC" "$_BOLD" "$_pattern" "$_NC" "$_DIM" "$_desc" "$_NC"
387
387
  fi
388
388
  done
389
389
 
@@ -488,7 +488,7 @@ cmd_hide() {
488
488
 
489
489
  cmd_list() {
490
490
  require_workspace
491
- printf "${_B}%-25s %-12s %s${_NC}\n" "NAME" "SCOPE" "PATH"
491
+ printf '%b%-25s %-12s %s%b\n' "$_B" "NAME" "SCOPE" "PATH" "$_NC"
492
492
  printf '%-25s %-12s %s\n' "----" "-----" "----"
493
493
  yaml_list_repos | while read -r _name; do
494
494
  _scope="$(yaml_get "$_name" "scope")"
@@ -502,23 +502,23 @@ cmd_status() {
502
502
  require_workspace
503
503
  ensure_repos_dir
504
504
 
505
- printf "\n${_B}Repo Nexus Workspace Status${_NC}\n"
505
+ printf '\n%b%s%b\n' "$_B" "Repo Nexus Workspace Status" "$_NC"
506
506
  printf '=%.0s' 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
507
507
  printf '\n\n'
508
508
 
509
- printf "${_BOLD}Configured AI Context Files ($RNEX_CONFIG_FILE):${_NC}\n"
509
+ printf '%bConfigured AI Context Files (%s):%b\n' "$_BOLD" "$RNEX_CONFIG_FILE" "$_NC"
510
510
  yaml_list_ai_files | while read -r _item; do
511
511
  if [ -e "$NEXUS_DIR/$_item" ]; then
512
- printf " ${_G}βœ“${_NC} %s\n" "$_item"
512
+ printf ' %bβœ“%b %s\n' "$_G" "$_NC" "$_item"
513
513
  else
514
- printf " ${_R}βœ—${_NC} %s (missing from nexus root)\n" "$_item"
514
+ printf ' %bβœ—%b %s (missing from nexus root)\n' "$_R" "$_NC" "$_item"
515
515
  fi
516
516
  done
517
517
  printf '\n'
518
518
 
519
- printf "${_BOLD}Member Repositories:${_NC}\n"
519
+ printf '%b%s%b\n' "$_BOLD" "Member Repositories:" "$_NC"
520
520
  if [ -z "$(yaml_list_repos)" ]; then
521
- printf " ${_DIM}(No repositories registered yet. Use 'rnex add <name> <path>')${_NC}\n"
521
+ printf ' %b%s%b\n' "$_DIM" "(No repositories registered yet. Use 'rnex add <name> <path>')" "$_NC"
522
522
  else
523
523
  yaml_list_repos | while read -r _name; do
524
524
  _scope="$(yaml_get "$_name" "scope")"
@@ -526,20 +526,20 @@ cmd_status() {
526
526
  _link="$REPOS_DIR/$_name"
527
527
 
528
528
  if [ "$_scope" = "hidden" ]; then
529
- printf " ${_Y}β—‹${_NC} %-22s ${_DIM}hidden${_NC}\n" "$_name"
529
+ printf ' %bβ—‹%b %-22s %bhidden%b\n' "$_Y" "$_NC" "$_name" "$_DIM" "$_NC"
530
530
  elif [ -L "$_link" ] && [ -d "$_link" ]; then
531
- printf " ${_G}●${_NC} %-22s ${_G}active${_NC} β†’ %s\n" "$_name" "$_path"
531
+ printf ' %b●%b %-22s %bactive%b β†’ %s\n' "$_G" "$_NC" "$_name" "$_G" "$_NC" "$_path"
532
532
  elif [ -L "$_link" ]; then
533
- printf " ${_R}βœ—${_NC} %-22s ${_R}BROKEN LINK${_NC} β†’ %s\n" "$_name" "$_path"
533
+ printf ' %bβœ—%b %-22s %bBROKEN LINK%b β†’ %s\n' "$_R" "$_NC" "$_name" "$_R" "$_NC" "$_path"
534
534
  else
535
- printf " ${_R}βœ—${_NC} %-22s ${_R}MISSING LINK${_NC} (run 'rnex sync')\n" "$_name"
535
+ printf ' %bβœ—%b %-22s %bMISSING LINK%b %s\n' "$_R" "$_NC" "$_name" "$_R" "$_NC" "(run 'rnex sync')"
536
536
  fi
537
537
  done
538
538
  fi
539
539
 
540
- printf "\n${_DIM}Workspace: %s${_NC}\n" "$NEXUS_DIR"
541
- printf "${_DIM}Repos Dir: %s${_NC}\n" "$REPOS_DIR"
542
- printf "${_DIM}Config: %s${_NC}\n\n" "$WORKSPACE_YAML"
540
+ printf '\n%bWorkspace: %s%b\n' "$_DIM" "$NEXUS_DIR" "$_NC"
541
+ printf '%bRepos Dir: %s%b\n' "$_DIM" "$REPOS_DIR" "$_NC"
542
+ printf '%bConfig: %s%b\n\n' "$_DIM" "$WORKSPACE_YAML" "$_NC"
543
543
  }
544
544
 
545
545
  cmd_sync() {
@@ -598,7 +598,7 @@ cmd_install() {
598
598
  }
599
599
 
600
600
  cmd_version() {
601
- printf "rnex %s\n" "$RNEX_VERSION"
601
+ printf 'rnex %s\n' "$RNEX_VERSION"
602
602
  }
603
603
 
604
604
  cmd_help() {