oh-my-space 0.14.2 → 1.0.0
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/README.md +36 -246
- package/dist/build-info.json +1 -1
- package/dist/oms.js +1661 -923
- package/package.json +18 -5
package/README.md
CHANGED
|
@@ -2,41 +2,46 @@
|
|
|
2
2
|
|
|
3
3
|
[](https://www.npmjs.com/package/oh-my-space)
|
|
4
4
|
|
|
5
|
-
`oh-my-space` is a small CLI for managing multi-
|
|
5
|
+
`oh-my-space` (OMS) is a small CLI for managing multi-repository workspaces with Git submodules. Declare source repositories once, work in normal branches, and let the main project record the exact commit used from each repository.
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
## Who it helps
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
Use OMS when you:
|
|
10
10
|
|
|
11
|
-
-
|
|
12
|
-
-
|
|
13
|
-
-
|
|
14
|
-
-
|
|
11
|
+
- develop one product across several repositories and want them checked out side by side;
|
|
12
|
+
- need reproducible workspaces where the main project records each source repository's exact commit;
|
|
13
|
+
- want everyday branch, commit, pull, and push workflows without accidentally working in a detached checkout;
|
|
14
|
+
- want source-commit changes to remain visible until you deliberately record them in the main project;
|
|
15
|
+
- use AI coding tools that need a clear boundary between the main project and source repositories.
|
|
15
16
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
OMS automates routine, deterministic preparation and bounded recovery whenever it can do so safely. It asks only when a choice depends on intent that cannot be inferred, such as creating missing root submodule topology. If safe completion or a useful degraded result is impossible, the error identifies the failed operation, the state that was preserved, and an actionable OMS command or bounded Git repair.
|
|
17
|
+
OMS keeps Git's reproducibility while automating routine submodule setup and bounded recovery. When a choice depends on your intent, it asks instead of changing repository state silently.
|
|
19
18
|
|
|
20
19
|
## Requirements
|
|
21
20
|
|
|
22
|
-
- [Node.js](https://nodejs.org) `>=20.19.0`
|
|
23
|
-
-
|
|
24
|
-
-
|
|
21
|
+
- [Node.js](https://nodejs.org) `>=20.19.0`
|
|
22
|
+
- Git `>=2.40`
|
|
23
|
+
- A Git repository whose top-level directory contains `oms.yaml` before repositories are synchronized
|
|
25
24
|
|
|
26
25
|
## Install
|
|
27
26
|
|
|
28
|
-
Install
|
|
27
|
+
Install the `oms` command globally with your package manager:
|
|
29
28
|
|
|
30
29
|
```bash
|
|
31
30
|
npm install -g oh-my-space
|
|
32
|
-
pnpm add -g oh-my-space
|
|
33
|
-
yarn global add oh-my-space
|
|
34
|
-
bun install -g oh-my-space
|
|
31
|
+
# or: pnpm add -g oh-my-space
|
|
32
|
+
# or: yarn global add oh-my-space
|
|
33
|
+
# or: bun install -g oh-my-space
|
|
35
34
|
```
|
|
36
35
|
|
|
37
36
|
## Quick start
|
|
38
37
|
|
|
39
|
-
|
|
38
|
+
Create a manifest at your project root:
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
oms init
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
Declare one repository in `oms.yaml`:
|
|
40
45
|
|
|
41
46
|
```yaml
|
|
42
47
|
# yaml-language-server: $schema=https://raw.githubusercontent.com/divlook/oh-my-space/main/oms.schema.json
|
|
@@ -47,240 +52,25 @@ repos:
|
|
|
47
52
|
branch: main # optional; defaults to the remote's default branch
|
|
48
53
|
```
|
|
49
54
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
Sync the declared repositories and check their state:
|
|
53
|
-
|
|
54
|
-
```bash
|
|
55
|
-
oms sync --all # add/initialize every declared repo on its baseline branch
|
|
56
|
-
oms status # branch / pointer / dirty / ahead-behind per submodule
|
|
57
|
-
```
|
|
58
|
-
|
|
59
|
-
## Layout
|
|
60
|
-
|
|
61
|
-
A workspace with two declared repositories, `api` and `web`, looks like this:
|
|
62
|
-
|
|
63
|
-
```
|
|
64
|
-
oms.yaml # declares each source repo (alias, remotes, branch)
|
|
65
|
-
.gitmodules # registers each oms/<alias> -> origin url, branch
|
|
66
|
-
oms/
|
|
67
|
-
├── api/ # git submodule (a normal working tree, on a branch)
|
|
68
|
-
└── web/ # git submodule (a normal working tree, on a branch)
|
|
69
|
-
```
|
|
70
|
-
|
|
71
|
-
`oms.yaml` is your declaration, `.gitmodules` and each `oms/<alias>` gitlink are tracked in your project history, and every directory under `oms/` is a normal checked-out repository you can branch, edit, and commit in.
|
|
72
|
-
|
|
73
|
-
## Command locations and workspace discovery
|
|
74
|
-
|
|
75
|
-
Workspace-aware commands search from the current directory toward the filesystem root and use the nearest `oms.yaml`. The first `oms.yaml` entry encountered is authoritative. It must be a regular file, or a symbolic link whose target is a regular file. A directory, broken link, link to a non-file target, or invalid nearest manifest causes the command to fail; OMS does not skip it and fall back to an outer workspace.
|
|
76
|
-
|
|
77
|
-
You can run workspace-aware commands at the workspace root or below it. When the current directory is inside `oms/<alias>/` for an alias declared by the selected manifest, `oms status --json` reports that alias and commands such as `oms commit` and `oms record` can infer it. An alias supplied on the command line always takes precedence over the inferred current alias. Arbitrary descendants and undeclared `oms/<name>/` paths can discover the workspace but do not become a current alias.
|
|
78
|
-
|
|
79
|
-
Commands that inspect or change submodule state require the selected manifest directory to be the root Git top-level. A nested `oms.yaml` below an enclosing Git root is rejected before `.gitmodules`, the root index, `oms/`, or the manifest can change. Repair that layout by either moving `oms.yaml` to the enclosing Git root or initializing a separate Git repository at the intended nested workspace root. `oms sync --list` is manifest-only and remains available before Git initialization.
|
|
80
|
-
|
|
81
|
-
## Typical branch flow
|
|
82
|
-
|
|
83
|
-
Start a branch, commit inside the submodule, push it, then record the pointer move in your project history. Each command stays in a single Git scope:
|
|
55
|
+
Synchronize the workspace and inspect its state:
|
|
84
56
|
|
|
85
57
|
```bash
|
|
86
|
-
oms
|
|
87
|
-
oms
|
|
88
|
-
oms push api # creates origin/feature/login (submodule branch only)
|
|
89
|
-
oms record api # commit the moved oms/api pointer in your project history
|
|
58
|
+
oms sync --all
|
|
59
|
+
oms status
|
|
90
60
|
```
|
|
91
61
|
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
Omit the alias or branch on `oms branch switch` and `oms branch checkout` to pick one interactively — synced submodules, and local or `origin/*` branches respectively.
|
|
95
|
-
|
|
96
|
-
## Listing branches
|
|
97
|
-
|
|
98
|
-
`oms branch list [alias]` produces a current branch inventory for one declared submodule. Use an explicit alias, omit it to select the sole declaration automatically, or choose among multiple aliases interactively:
|
|
99
|
-
|
|
100
|
-
```bash
|
|
101
|
-
oms branch list api
|
|
102
|
-
oms branch list
|
|
103
|
-
oms branch # choose list, switch, checkout, or delete interactively
|
|
104
|
-
```
|
|
105
|
-
|
|
106
|
-
Before listing, OMS safely initializes an existing registered submodule when needed, reconciles every remote declared for that alias in `oms.yaml`, and runs `git fetch <remote> --prune` sequentially in manifest order. A failed fetch is retried once. If both attempts fail, cached refs remain visible as `stale`; a failed remote without usable refs is `unavailable`. These degraded states still exit 0 when local refs can be inspected. Extra local remotes are not fetched or included in the remote inventory, although an actual configured upstream on one of them remains visible for its local branch.
|
|
107
|
-
|
|
108
|
-
The output identifies the selected alias and detached HEAD when applicable, then prints:
|
|
109
|
-
|
|
110
|
-
- a `known`, `incomplete`, or `unknown` baseline summary, including reliable baseline names that have no matching local branch;
|
|
111
|
-
- a sorted LOCAL table with current/baseline flags, the exact configured upstream, and ahead/behind counts (`?` when an upstream is unavailable);
|
|
112
|
-
- a REMOTE table grouped in manifest order, with branch names sorted inside each `fresh`, `stale`, or `unavailable` remote.
|
|
113
|
-
|
|
114
|
-
When `branch` is omitted from `oms.yaml`, a successful origin fetch refreshes `origin/HEAD`; a failed refresh is reported as baseline uncertainty instead of blocking the inventory. Listing never switches, creates, deletes, merges, or pushes a branch, never changes or records a root gitlink, and never prints an `oms record` hint. An interactive user may explicitly delegate missing topology creation to `oms sync`; otherwise root topology remains unchanged. Exit 1 covers selection or safe-preparation refusal, and exit 2 covers automatic initialization or local-ref inspection failure. Run `oms branch list --help` for the authoritative behavior and examples.
|
|
115
|
-
|
|
116
|
-
## Deleting a local branch
|
|
117
|
-
|
|
118
|
-
`oms branch delete [alias] [branch]` removes one **local** branch inside a single initialized submodule. It is deliberately narrow and safe:
|
|
119
|
-
|
|
120
|
-
```bash
|
|
121
|
-
oms branch delete api feature/login # safe delete (git branch -d)
|
|
122
|
-
oms branch delete api feature/login --force # force delete (git branch -D)
|
|
123
|
-
oms branch delete # pick alias, then branch, interactively
|
|
124
|
-
oms branch # interactive list/switch/checkout/delete action selector
|
|
125
|
-
```
|
|
126
|
-
|
|
127
|
-
- **Local only.** It never deletes a remote branch or a remote-tracking ref, never fetches or pushes, and never stages or commits the root gitlink. A missing local branch whose name exists on `origin` is reported as local-only.
|
|
128
|
-
- **Protected branches.** The current branch and every resolved baseline are protected and cannot be deleted, even with `--force`. Baselines are the explicit `oms.yaml` `branch`, or the remote default (`origin/HEAD`) when `branch` is omitted, plus any branch recorded for the alias in a present, reliable `.gitmodules` version (working tree, index, or `HEAD`). Drift between these is reported and both are protected; a later `oms sync` reconciles the metadata. Unreadable, malformed, duplicate, or multi-valued baseline metadata fails closed with the offending source named.
|
|
129
|
-
- **Safe by default, one force retry.** A safe `git branch -d` is tried first. If Git rejects it (an unmerged branch) and the branch still exists, an interactive prompt offers a single force retry (default No); a non-interactive shell prints the exact `oms branch delete <alias> <branch> --force` command instead. Before every force deletion OMS prints the branch tip's full OID and a POSIX-shell-safe `git -C oms/<alias> branch <branch> <oid>` recreation command, and re-checks the OID so a branch that moved concurrently aborts (exit 2) rather than losing commits.
|
|
130
|
-
- **Preconditions.** Deletion is rejected while a merge/rebase/cherry-pick/revert/bisect/sequencer operation is in progress in the submodule, and for a detached HEAD unless it exactly matches the recorded root gitlink (which lets interrupted automatic initialization resume). Dirty submodule and root state do not block deletion. A registered-but-uninitialized alias named explicitly is initialized automatically (network access limited to that alias) and then revalidated.
|
|
131
|
-
|
|
132
|
-
## Sync finalization and metadata reconciliation
|
|
133
|
-
|
|
134
|
-
`oms sync` finalizes topology and OMS-managed `.gitmodules` metadata through **one** decision, and reconciles that metadata from `oms.yaml`:
|
|
135
|
-
|
|
136
|
-
- **Authoritative manifest metadata.** For an initialized submodule, `oms.yaml` `remotes.origin` is authoritative: sync reconciles the local `origin` URL and the `.gitmodules` `url` to it, and writes an explicit `branch` (or removes the key when omitted). Sync validates the baseline after fetching — an explicit branch must exist on `origin`, and an omitted branch requires a resolvable `origin/HEAD` — and fails that alias otherwise **without** changing its metadata. Output names only the changed fields (`url`, `branch`), never URL values.
|
|
137
|
-
- **One finalization.** Reconciled metadata follows the same commit-or-unstage decision as topology: `--commit` (or the interactive default-Yes prompt) records topology and metadata together in one path-limited commit that also includes the complete current working-tree `oms.yaml`; without a commit, the changes are left unstaged.
|
|
138
|
-
- **Partial success and isolation.** A `--commit` that partially fails commits only the successful aliases through an owner-only temporary index, preserving unrelated staged paths, and exits non-zero with a summary. The temporary-index commit, a durable fsynced intent marker, and an atomically installed replacement index keep an interrupted commit recoverable: `sync`, `unsync`, and `record` run a shared recovery preflight that completes or safely blocks on leftover finalization state before mutating the root again.
|
|
139
|
-
|
|
140
|
-
## How `oms` uses Git submodules
|
|
141
|
-
|
|
142
|
-
`oms` does not replace Git submodules. It adds a small command layer for the workflow details that make submodules awkward. Submodules already give you a reproducible pin (the parent records each source's exact commit), visibility (`git status` shows when a pointer moved), and history (the pointer travels with your commits). The friction is in everyday branch work, and that is what `oms` smooths over:
|
|
143
|
-
|
|
144
|
-
- **Start branches locally.** `oms branch switch <alias> <branch>` starts a local branch right away, even before it exists on the remote. `oms branch checkout <alias> <branch>` fetches origin and checks out an existing remote branch as a tracking branch. The remote branch is created lazily on your first `oms push`.
|
|
145
|
-
- **Stay on a branch.** `oms sync` attaches the baseline branch at the pinned commit instead of leaving a detached HEAD, so everyday submodule work never strands you off a branch.
|
|
146
|
-
- **Keep pointer moves visible, commit them explicitly.** `oms pull` and `oms push` synchronize only the submodule branch — they never stage or commit the root gitlink. The moved pointer shows up in `git status`, `oms status` flags when a submodule has drifted from the recorded pointer, and `oms record <alias>` commits that pointer update in the parent repo.
|
|
147
|
-
|
|
148
|
-
Submodules must **not** be gitignored, since the `oms/<alias>` gitlink is what records each pinned commit. `oms sync` removes a stale `oms/` entry from `.gitignore` if a previous version added one.
|
|
149
|
-
|
|
150
|
-
> `oms` makes local submodule work easier, but reproducible sharing still requires pushing the source commit (`oms push`) and recording the parent pointer (`oms record`).
|
|
151
|
-
|
|
152
|
-
## AI agent workflow
|
|
153
|
-
|
|
154
|
-
When an AI coding agent works in a workspace, the main risk is operating in the wrong Git scope — the root repository versus an `oms/<alias>/` submodule. Two features make that boundary explicit:
|
|
62
|
+
The source repository is now available at `oms/api/`. Continue with [Getting started](https://github.com/divlook/oh-my-space/blob/main/docs/getting-started.md) to complete the first branch, commit, push, and recorded-commit workflow.
|
|
155
63
|
|
|
156
|
-
|
|
157
|
-
- **`oms agent install`** writes a concise, marker-delimited instruction block into `oms/AGENTS.md` and/or `oms/CLAUDE.md`:
|
|
64
|
+
## Documentation
|
|
158
65
|
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
`oms` publishes three installable agent skills that carry the workspace Git guardrail to sessions started anywhere in the workspace — including at the root, which the [`oms agent install`](#ai-agent-workflow) marker under `oms/` cannot reach. They are installed with the external Vercel Labs `skills` tool (`npx skills`):
|
|
168
|
-
|
|
169
|
-
```bash
|
|
170
|
-
npx skills add divlook/oh-my-space/skills # project scope: install at the workspace root
|
|
171
|
-
npx skills add divlook/oh-my-space/skills -g # global scope: available in every workspace
|
|
172
|
-
npx skills add divlook/oh-my-space/skills --skill oms-pointer # install one skill by name
|
|
173
|
-
npx skills add divlook/oh-my-space/skills --list # list the available skills without installing
|
|
174
|
-
```
|
|
175
|
-
|
|
176
|
-
Project scope is the default and recommended: these skills are only relevant in an `oms.yaml` workspace, so a project install keeps them out of unrelated repositories. `oms skills` prints these commands, and `oms skills --install` runs the project install for you, resolving to the workspace root first and forwarding extra arguments (`-g`, `--skill`, `--list`, `--copy`) straight through.
|
|
177
|
-
|
|
178
|
-
The three skills are named by the Git domain each manages:
|
|
179
|
-
|
|
180
|
-
| Skill | Use it when | What it does |
|
|
181
|
-
| --- | --- | --- |
|
|
182
|
-
| `oms-workspace` | Scope-ambiguous Git work in the workspace — committing from the root, a moved `oms status` pointer, a push, or adding/removing a repo with `oms sync`/`oms unsync`. | Establishes workspace state and root-versus-submodule scope before acting, and separates repo add/remove topology from recording a moved pointer. |
|
|
183
|
-
| `oms-pointer` | After `oms commit` or `oms pull` moves a submodule's commit. | Records the moved root pointer with `oms record`, so a submodule change is not left without a recorded pointer and the root pointer is not committed by mistake. |
|
|
184
|
-
| `oms-branch` | Starting or switching a branch inside a submodule. | Chooses `oms branch switch` (new local branch) versus `oms branch checkout` (track a remote branch) and avoids detached HEAD. |
|
|
185
|
-
|
|
186
|
-
Skill firing is best-effort — an agent loads a skill only when it judges the skill's description relevant — so the skills complement, rather than replace, `oms <command> --help` and the always-on marker block inside `oms/`. Each skill defers exact `oms status --json` field semantics to `oms status --help`, the version-matched authoritative source that ships with the installed CLI.
|
|
187
|
-
|
|
188
|
-
## Command reference
|
|
189
|
-
|
|
190
|
-
`oms.yaml` declares each source repo with `alias`, a `remotes` mapping (which must include `origin`), and optional `branch` (the baseline).
|
|
191
|
-
|
|
192
|
-
| Command | Runs in | Does | Notes |
|
|
193
|
-
| --- | --- | --- | --- |
|
|
194
|
-
| `oms init` | current directory | Writes a starter `oms.yaml`. | The directory must be outside Git or the root Git top-level. A nested Git-work-tree directory is rejected before writes, even with `--force`. Otherwise refuses an existing manifest unless `--force` is used. Does not gitignore `oms/`. |
|
|
195
|
-
| `oms doctor` | workspace root or child path | Checks the nearest `oms.yaml`, Git root identity, and each alias's submodule state. | Diagnoses a nested manifest directly instead of treating it as a valid root. Returns exit 2 if any warning is raised. |
|
|
196
|
-
| `oms sync <alias>` / `--all` | workspace root | Registers missing repos with `git submodule add`, initializes registered-but-uninitialized ones, fetches, and attaches the baseline branch. | Reproduces the recorded pointer on a fresh clone. Topology changes (`.gitmodules`, `oms/<alias>`) are left unstaged by default; commit them via the prompt or `--commit` (`chore(oms): add ...`). |
|
|
197
|
-
| `oms status [alias...]` / `--all` | anywhere under root | Prints branch, pointer state (`ok`/`moved`/`uninit`/`missing`/`conflict`), dirtiness, and ahead/behind for each submodule. | `moved` means the working commit differs from the recorded pointer — record it with `oms record`. `--json` prints one machine-readable object on stdout for tooling and agents. |
|
|
198
|
-
| `oms commit [alias]` | workspace root or inside `oms/<alias>/` | Commits source changes inside the selected submodule only; never the root gitlink. | `-m <message>` is required (repeatable). Commits existing staged changes as-is, otherwise stages all with `git add -A`. Infers a configured alias from the current `oms/<alias>/` directory; an explicit alias wins. |
|
|
199
|
-
| `oms record [alias]` | workspace root or inside `oms/<alias>/` | Commits an existing root gitlink pointer update for one alias (`chore(oms): update <alias> submodule to <sha>`). | Root repo only, path-limited to `oms/<alias>`; refuses unrelated staged changes. An explicit alias wins over current-path inference. Not for adds/removals — use `oms sync`/`oms unsync`. |
|
|
200
|
-
| `oms branch switch [alias] [branch]` | workspace root | `git switch` to a LOCAL branch, creating it locally if it does not exist yet (no remote required). | `--from <ref>` sets the start point for a new branch. Omit alias/branch to pick interactively (or create a new branch). |
|
|
201
|
-
| `oms branch checkout [alias] [branch]` | workspace root | `git fetch origin --prune`, then check out a REMOTE branch (`origin/*`) as a local tracking branch (or switch to an existing local counterpart). | Omit alias/branch to pick interactively. To create a brand-new local branch, use `oms branch switch`. |
|
|
202
|
-
| `oms branch list [alias]` | workspace root | Safely prepares one declared submodule, refreshes all declared remotes, and lists local and remote-tracking branches. | Shows baseline certainty, current/baseline flags, exact upstream divergence, detached HEAD, and per-remote `fresh`/`stale`/`unavailable` state. Never switches a branch or changes a root gitlink outside an explicitly accepted `oms sync`. |
|
|
203
|
-
| `oms branch delete [alias] [branch]` | workspace root | Deletes one LOCAL branch inside one initialized submodule with `git branch -d` (safe) or `-D` (`--force`). | Local only — never deletes a remote or remote-tracking ref, never touches the root gitlink. Protects the current branch and every resolved baseline (see below). Omit alias/branch to pick interactively; a registered-but-uninitialized alias is initialized first. Exit 0 on success, 1 on input/precondition errors, 2 on a declined/failed/concurrent deletion. |
|
|
204
|
-
| `oms fetch ...` | workspace root | `git fetch <remote> --prune` in each submodule. | `--remote <name>` (repeatable) picks the remote(s); omit to choose interactively, defaults to `origin`. |
|
|
205
|
-
| `oms pull ...` | workspace root | `git pull --ff-only <remote>` on each submodule's current branch. | Submodule branch only — never stages or commits the root gitlink. Rejects a dirty submodule; prints an `oms record <alias>` hint when the pointer moves. `--remote <name>` selects a single remote (defaults to `origin`). |
|
|
206
|
-
| `oms push <alias>...` | workspace root | `git push <remote> <branch>` (creating the remote branch on first push). | Submodule branch only — never stages or commits the root gitlink. `--commit`/`--record` are unsupported; record the root pointer with `oms record <alias>`. `--remote <name>` (repeatable) picks the remote(s); upstream is set only for `origin`. |
|
|
207
|
-
| `oms unsync <alias>` / `--all` | workspace root | `git submodule deinit` + `git rm` for the alias; drops an empty `.gitmodules`. | Keeps the `oms.yaml` entry. Use `--force` to discard uncommitted changes. Removal topology is left unstaged by default; commit via the prompt or `--commit` (`chore(oms): remove ...`). |
|
|
208
|
-
| `oms agent install` / `uninstall` | workspace root | Manages a marker-delimited OMS instruction block in `oms/AGENTS.md` and/or `oms/CLAUDE.md` (root-repo files). | `--target agents\|claude\|both` (omit to choose interactively). Does not stage files. See [AI agent workflow](#ai-agent-workflow). |
|
|
209
|
-
| `oms skills` | anywhere (`--install` resolves to root) | Prints the `npx skills add divlook/oh-my-space/skills` commands (project scope and `-g` global) to install the workspace skills. | `--install` delegates to `npx skills add`, forwarding extra args (`-g`, `--skill <name>`, `--list`). Run outside a workspace without `-g`, it errors and points to the global install. See [Workspace skills](#workspace-skills). |
|
|
210
|
-
| `oms update` | anywhere | Checks the npm registry and safely updates the installed `oms` CLI only when it detects a confident global install. | Use `--check` for a non-mutating check. Use `--yes` to skip the confirmation prompt for confident global updates. Project-local, temporary runner, development, and unknown installs print guidance only. |
|
|
211
|
-
|
|
212
|
-
## Updating the CLI
|
|
213
|
-
|
|
214
|
-
Check whether the installed CLI is current:
|
|
215
|
-
|
|
216
|
-
```bash
|
|
217
|
-
oms update --check
|
|
218
|
-
```
|
|
219
|
-
|
|
220
|
-
Run an update when `oms` can confidently identify a global npm, pnpm, Yarn classic, or Bun installation:
|
|
221
|
-
|
|
222
|
-
```bash
|
|
223
|
-
oms update
|
|
224
|
-
```
|
|
225
|
-
|
|
226
|
-
For automation, `--yes` skips the confirmation prompt after `oms` has printed the detected context and selected command:
|
|
227
|
-
|
|
228
|
-
```bash
|
|
229
|
-
oms update --yes
|
|
230
|
-
```
|
|
231
|
-
|
|
232
|
-
`oms update` does not edit project manifests or temporary runner caches. If the install is project-local, temporary, development, or unknown, it prints safe manual guidance instead of mutating the environment.
|
|
233
|
-
|
|
234
|
-
## `oms.yaml` format
|
|
235
|
-
|
|
236
|
-
```yaml
|
|
237
|
-
# yaml-language-server: $schema=https://raw.githubusercontent.com/divlook/oh-my-space/main/oms.schema.json
|
|
238
|
-
repos:
|
|
239
|
-
- alias: service-a
|
|
240
|
-
remotes:
|
|
241
|
-
origin: git@github.com:example/service-a.git
|
|
242
|
-
branch: main
|
|
243
|
-
- alias: docs
|
|
244
|
-
remotes:
|
|
245
|
-
origin: https://github.com/example/docs.git
|
|
246
|
-
upstream: https://github.com/upstream/docs.git
|
|
247
|
-
```
|
|
248
|
-
|
|
249
|
-
Rules:
|
|
250
|
-
|
|
251
|
-
- `repos` must be a non-empty array.
|
|
252
|
-
- `alias` must be unique.
|
|
253
|
-
- Used as the directory name under `oms/<alias>/`.
|
|
254
|
-
- First character: ASCII lowercase letter or digit.
|
|
255
|
-
- Remaining characters: ASCII lowercase letters, digits, `-`, `_`, `@`.
|
|
256
|
-
- Not allowed: uppercase letters, `/`, `\`, `.`, whitespace.
|
|
257
|
-
- Pattern: `/^[a-z0-9][a-z0-9_@-]*$/`.
|
|
258
|
-
- `remotes` is required and must include an `origin` entry. Each value is a clonable git URL. `origin` becomes the submodule's primary remote, and additional remotes are configured on `oms sync`.
|
|
259
|
-
- `branch` is optional. When omitted, the remote's default branch is used as the baseline.
|
|
260
|
-
|
|
261
|
-
JSON schema: [`oms.schema.json`](./oms.schema.json) (also reachable at `https://raw.githubusercontent.com/divlook/oh-my-space/main/oms.schema.json` for YAML LSPs).
|
|
262
|
-
|
|
263
|
-
## Migration guides
|
|
264
|
-
|
|
265
|
-
Detailed migration steps are organized per version under [`docs/migrations/`](./docs/migrations/).
|
|
266
|
-
|
|
267
|
-
- [0.13.x → 0.14.0](./docs/migrations/0.13.x-to-0.14.0.md) — relocates `oms switch` / `oms checkout` under the `oms branch` group as `oms branch switch` / `oms branch checkout` (top-level commands removed, no aliases)
|
|
268
|
-
- [0.11.x → 0.12.0](./docs/migrations/0.11.x-to-0.12.0.md) — adds `oms branch delete` and makes `oms sync` reconcile declarative `.gitmodules` metadata with stricter baseline validation and a durable finalization recovery preflight
|
|
269
|
-
- [0.9.x → 0.10.0](./docs/migrations/0.9.x-to-0.10.0.md) — scopes each command to a single Git boundary and makes root pointer commits explicit via `oms record`
|
|
270
|
-
- [0.7.x → 0.8.0](./docs/migrations/0.7.x-to-0.8.0.md) — splits `oms checkout` into `oms switch` (local branches) and `oms checkout` (remote branches)
|
|
271
|
-
- [0.5.x → 0.6.0](./docs/migrations/0.5.x-to-0.6.0.md) — switches the data model from bare clone + worktrees back to git submodules
|
|
272
|
-
- [0.3.x → 0.4.0](./docs/migrations/0.3.x-to-0.4.0.md) — renames `sources.yaml`/`sources/` to `oms.yaml`/`oms/`
|
|
273
|
-
- [0.2.x → 0.3.0](./docs/migrations/0.2.x-to-0.3.0.md) — (historical) switched submodules to bare clone + worktrees
|
|
274
|
-
|
|
275
|
-
## Local development
|
|
276
|
-
|
|
277
|
-
This repository targets the Node.js version in [`.nvmrc`](./.nvmrc) (`24`). After cloning:
|
|
278
|
-
|
|
279
|
-
```bash
|
|
280
|
-
nvm use
|
|
281
|
-
npm ci
|
|
282
|
-
npm test
|
|
283
|
-
```
|
|
66
|
+
- [Getting started](https://github.com/divlook/oh-my-space/blob/main/docs/getting-started.md) — set up a workspace and complete the first source change from branch creation through recording the commit in the main project.
|
|
67
|
+
- [How OMS works](https://github.com/divlook/oh-my-space/blob/main/docs/how-oms-works.md) — understand workspace layout, repository boundaries, recorded commits, synchronization, status, safety behavior, and recovery.
|
|
68
|
+
- [Commands](https://github.com/divlook/oh-my-space/blob/main/docs/commands.md) — choose the right command and Git scope; use `oms <command> --help` for exact arguments, options, and exit behavior.
|
|
69
|
+
- [Configure your workspace](https://github.com/divlook/oh-my-space/blob/main/docs/configure-your-workspace.md) — define repositories, remotes, and starting branches in `oms.yaml`.
|
|
70
|
+
- [AI coding tools](https://github.com/divlook/oh-my-space/blob/main/docs/ai-coding-tools.md) — install agent instructions and workspace skills that preserve repository boundaries.
|
|
71
|
+
- [Migration guides](https://github.com/divlook/oh-my-space/blob/main/docs/migrations/README.md) — follow version-specific upgrade instructions.
|
|
72
|
+
- [Development](https://github.com/divlook/oh-my-space/blob/main/docs/development.md) — build, test, and contribute to OMS.
|
|
73
|
+
- [Release channels](https://github.com/divlook/oh-my-space/blob/main/docs/release-channels.md) — install stable or beta releases and maintain npm release channels.
|
|
284
74
|
|
|
285
75
|
## License
|
|
286
76
|
|
package/dist/build-info.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"commit":"
|
|
1
|
+
{"commit":"4a6aacd1ead93e26fbdd4856df6bdb3b5955d3e5","skills":{"oms-branch":{"version":"1.0.0","omsVersion":">=1.0.0-0"},"oms-pointer":{"version":"1.1.0","omsVersion":">=1.0.0-0"},"oms-workspace":{"version":"1.1.0","omsVersion":">=1.0.0-0"}}}
|