From 3a2889a0d525df42ba92ef8cc3436351c8395b9e Mon Sep 17 00:00:00 2001 From: Woonggi Min Date: Sun, 31 May 2026 15:29:02 +0900 Subject: [PATCH] docs(codex): qualify internal alias references Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus --- AGENTS.md | 4 ++-- CHANGELOG.md | 2 +- packages/omo-codex/src/install/index.ts | 2 +- src/cli/AGENTS.md | 2 +- src/cli/cli-program.test.ts | 19 +++++++++++++++++++ src/cli/cli-program.ts | 4 ++-- 6 files changed, 26 insertions(+), 7 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index a5de94254..174f03138 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -147,10 +147,10 @@ oh-my-openagent ships in two editions of one product. **Ultimate** = this OpenCo - **Package:** `@oh-my-opencode/omo-codex` (private, v0.1.0): "Codex harness adapter. Vendored Codex plugin namespace `omo` + TypeScript installer + telemetry." Plugin bundle pkg = `@sisyphuslabs/omo-codex-plugin`. Reuses `@oh-my-opencode/utils` + `@oh-my-opencode/shared-skills`. - **Marketplace identity (precision):** Codex sees marketplace `sisyphuslabs`, plugin `omo`, enabled as `omo@sisyphuslabs`. `lazycodex` is ONLY the repo/npm/bin alias, never the marketplace name. -- **Alias mechanics:** root `package.json` maps `lazycodex` to `bin/oh-my-opencode.js` (1 of 4 bin aliases: `oh-my-opencode`, `oh-my-openagent`, `omo`, `lazycodex`, all the same compiled CLI). `bunx lazycodex install` is exactly `bunx omo install --platform=codex`. Routing: `src/cli/cli-program.ts` (lazycodex defaults platform to codex), `bin/platform.js` (lazycodex resolves the `oh-my-openagent` platform family). `src/cli/star-request.ts` stars both repos. +- **Alias mechanics:** root `package.json` maps `lazycodex` to `bin/oh-my-opencode.js` (1 of 4 bin aliases: `oh-my-opencode`, `oh-my-openagent`, `omo`, `lazycodex`, all the same compiled CLI). `bunx --package @code-yeongyu/lazycodex lazycodex install` is exactly `bunx --package oh-my-openagent omo install --platform=codex`. Routing: `src/cli/cli-program.ts` (lazycodex defaults platform to codex), `bin/platform.js` (lazycodex resolves the `oh-my-openagent` platform family). `src/cli/star-request.ts` stars both repos. - **Disambiguation:** the `lazycodex` npm package (this repo's CLI republished by `publish.yml` with a name/version rewrite) is NOT `lazycodex-ai` (the `code-yeongyu/lazycodex` repo's own published npm package, currently `lazycodex-ai@0.2.1`). - **Components (8):** `comment-checker`, `git-bash`, `lsp`, `rules`, `start-work-continuation`, `telemetry`, `ultrawork`, `ulw-loop`, wired to Codex events `SessionStart`/`UserPromptSubmit`/`PreToolUse`/`PostToolUse`/`PostCompact`/`Stop`/`SubagentStop`. No agent orchestration, no `team_*`, no built-in MCPs beyond LSP, no hashline. -- **Install:** `bunx omo install --platform=codex` (or `bunx lazycodex install`, or `--platform=both`) copies the plugin to `~/.codex/plugins/cache/sisyphuslabs/omo//`, links agent TOMLs via `~/.codex/.tmp/marketplaces/sisyphuslabs/plugins/omo/`, enables `omo@sisyphuslabs` in `~/.codex/config.toml`, links component CLIs into `~/.local/bin`. Windows: Git Bash preflight (`winget install --id Git.Git`). Installer: [`src/cli/install-codex/`](file:///Users/yeongyu/local-workspaces/omo/src/cli/install-codex/) + `packages/omo-codex/scripts/install*.mjs`. +- **Install:** `bunx --package oh-my-openagent omo install --platform=codex` (or `bunx --package @code-yeongyu/lazycodex lazycodex install`, or `--platform=both`) copies the plugin to `~/.codex/plugins/cache/sisyphuslabs/omo//`, links agent TOMLs via `~/.codex/.tmp/marketplaces/sisyphuslabs/plugins/omo/`, enables `omo@sisyphuslabs` in `~/.codex/config.toml`, links component CLIs into `~/.local/bin`. Windows: Git Bash preflight (`winget install --id Git.Git`). Installer: [`src/cli/install-codex/`](file:///Users/yeongyu/local-workspaces/omo/src/cli/install-codex/) + `packages/omo-codex/scripts/install*.mjs`. - **Deploy / publish** ([`.github/workflows/publish.yml`](file:///Users/yeongyu/local-workspaces/omo/.github/workflows/publish.yml), manual dispatch): - `publish_lazycodex` (default **true**) publishes the npm alias `lazycodex`: rewrites root `package.json` name to `lazycodex` + version to the release + optionalDeps `oh-my-opencode-*` to `oh-my-openagent-*`, skips when `registry.npmjs.org/lazycodex/${VERSION}` exists, publishes `--access public --provenance --tag latest`, then restores `package.json`. - `sync_lazycodex_marketplace` (default **false**, needs secret `LAZYCODEX_SYNC_TOKEN`) checks out `code-yeongyu/lazycodex`, builds the plugin + ast-grep-mcp + lsp-tools-mcp, runs [`script/sync-lazycodex-marketplace.ts`](file:///Users/yeongyu/local-workspaces/omo/script/sync-lazycodex-marketplace.ts) ` `, then `git push origin HEAD:main`. diff --git a/CHANGELOG.md b/CHANGELOG.md index 3419f47ff..a6885e52a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,7 +22,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Per-agent `displayName` for i18n. Agents can present localized names in UI and logs. (PR #4081) - Grok family models registered with `reasoningEffort` support. (PR #4186) - CLI `setup` alias for `install`. Either command runs the interactive setup wizard. (PR #4174) -- Codex CLI Light edition (`omo-codex`): one-command install via `bunx omo install --platform=codex` or the new `lazycodex` bin entry. Vendored Codex plugin namespace `omo` with rules, comment-checker, LSP, ultrawork, and ulw-loop components. Plugin lands in `~/.codex/plugins/cache/sisyphuslabs/omo/` and is enabled in `~/.codex/config.toml`. Idempotent installer (re-running is safe). +- Codex CLI Light edition (`omo-codex`): one-command install via `bunx --package oh-my-openagent omo install --platform=codex` or the new `lazycodex` bin entry. Vendored Codex plugin namespace `omo` with rules, comment-checker, LSP, ultrawork, and ulw-loop components. Plugin lands in `~/.codex/plugins/cache/sisyphuslabs/omo/` and is enabled in `~/.codex/config.toml`. Idempotent installer (re-running is safe). - New `--platform ` install flag (default `opencode`). Replaces the previous Codex-as-optional-addon model — `--platform=codex` installs only the Codex Light edition, `--platform=both` installs both editions in one run. - Three new bin entries: `omo` (short alias) and `lazycodex` (auto-defaults `--platform=codex`). Existing `oh-my-opencode` and `oh-my-openagent` continue to work unchanged. - New PostHog telemetry stream `omo_codex_daily_active` distinguishing omo-codex installations from omo-opencode. Independent opt-out via `OMO_CODEX_DISABLE_POSTHOG=1` or `OMO_CODEX_SEND_ANONYMOUS_TELEMETRY=0`; global `OMO_DISABLE_POSTHOG` and `OMO_SEND_ANONYMOUS_TELEMETRY` still suppress both products. diff --git a/packages/omo-codex/src/install/index.ts b/packages/omo-codex/src/install/index.ts index e14a092e9..d51a3ff57 100644 --- a/packages/omo-codex/src/install/index.ts +++ b/packages/omo-codex/src/install/index.ts @@ -1,4 +1,4 @@ // Codex install module entry point. Implemented in subsequent commits. // Hosts the TypeScript port of scripts/install-local.mjs invoked from the -// omodex CLI when the user passes `--platform=codex` to `bunx omo install`. +// omodex CLI when the user passes `--platform=codex` to `bunx --package oh-my-openagent omo install`. export {} diff --git a/src/cli/AGENTS.md b/src/cli/AGENTS.md index b06a48923..78247ef1b 100644 --- a/src/cli/AGENTS.md +++ b/src/cli/AGENTS.md @@ -19,7 +19,7 @@ Commander.js CLI with 8 commands. Entry: `index.ts` → `runCli()` in `cli-progr | `refresh-model-capabilities` | Refresh models.dev cache | Model capabilities refresh | | `boulder` | Boulder state inspector | Format work-state + tasks from `.omo/boulder-state/` | -`install` accepts `--platform=opencode|codex|both` (default `opencode`). `codex`/`both` route through `install-codex/` to install the Codex CLI Light edition (also `bunx lazycodex install`). See `packages/omo-codex/AGENTS.md`. +`install` accepts `--platform=opencode|codex|both` (default `opencode`). `codex`/`both` route through `install-codex/` to install the Codex CLI Light edition (also `bunx --package @code-yeongyu/lazycodex lazycodex install`). See `packages/omo-codex/AGENTS.md`. ## STRUCTURE diff --git a/src/cli/cli-program.test.ts b/src/cli/cli-program.test.ts index 58612e54c..6d0461b86 100644 --- a/src/cli/cli-program.test.ts +++ b/src/cli/cli-program.test.ts @@ -19,6 +19,25 @@ describe("cli-program", () => { expect(installBlock).not.toBeNull() expect(installBlock?.[1]).toContain('.alias("setup")') }) + + test("install command help avoids unqualified omo and lazycodex bunx examples", async () => { + // given + const cliProgramSource = await readFile( + path.resolve(import.meta.dir, "cli-program.ts"), + "utf-8", + ) + + // when + const installBlock = cliProgramSource.match( + /program\s*\n\s*\.command\("install"\)([\s\S]*?)\.action\(/, + ) + + // then + expect(installBlock).not.toBeNull() + expect(installBlock?.[1]).not.toContain("bunx lazycodex install") + expect(installBlock?.[1]).not.toMatch(/(^|[^\w@/-])bunx\s+omo\s+install\b/u) + expect(installBlock?.[1]).toContain("bunx --package @code-yeongyu/lazycodex lazycodex install --no-tui") + }) }) test("program configures explicit '-h, --help' help option for consistent help-flag ordering", async () => { diff --git a/src/cli/cli-program.ts b/src/cli/cli-program.ts index cb5df4b81..5d5d639d9 100644 --- a/src/cli/cli-program.ts +++ b/src/cli/cli-program.ts @@ -88,9 +88,9 @@ program .addHelpText("after", ` Examples: $ bunx oh-my-opencode install - $ bunx lazycodex install --no-tui + $ bunx --package @code-yeongyu/lazycodex lazycodex install --no-tui $ bunx oh-my-opencode install --no-tui --platform=both --claude=max20 --openai=yes --gemini=yes --copilot=no - $ omo install --platform=codex --codex-autonomous + $ bunx --package oh-my-openagent omo install --platform=codex --codex-autonomous $ bunx oh-my-opencode install --no-tui --claude=no --gemini=no --copilot=yes --opencode-zen=yes Model Providers (Priority: Native > Copilot > OpenCode Zen > Z.ai > Kimi > Vercel):