### Install oh-my-gemini-cli Source: https://github.com/joonghyun-lee-frieren/oh-my-gemini-cli/blob/main/docs/index.html This snippet shows the command to install the oh-my-gemini-cli. It is recommended to use npm for installation. ```bash npm install -g oh-my-gemini-cli ``` -------------------------------- ### Execute Fastify Server Scaffold with $execute Source: https://context7.com/joonghyun-lee-frieren/oh-my-gemini-cli/llms.txt Use the $execute skill to implement the initial Fastify server setup, including installing dependencies, creating the server file, and configuring plugins. This is part of Phase 1 of a migration plan. ```text $execute "Implement the Fastify server scaffold from Phase 1 of the migration plan" # Output: ## Scope - Install fastify, @fastify/cors, @fastify/helmet - Create src/server-fastify.ts with plugin registration and graceful shutdown ## Files Changed - package.json (added fastify ^4.26.0 and plugins) - src/server-fastify.ts (new: Fastify instance, plugin setup, listen()) ## Validation - npm install: clean ✓ - TypeScript build: no errors ✓ - smoke test: GET /health returns 200 ✓ ## Blockers - none ## Follow-ups - Phase 2: begin route migration with /users module ``` -------------------------------- ### Install OmG Extension Source: https://github.com/joonghyun-lee-frieren/oh-my-gemini-cli/blob/main/README.md Install the OmG extension using the official Gemini Extensions command. Verify the installation in interactive or terminal mode. ```bash gemini extensions install https://github.com/Joonghyun-Lee-Frieren/oh-my-gemini-cli ``` ```text /extensions list ``` ```bash gemini extensions list ``` -------------------------------- ### Start Workflow Source: https://github.com/joonghyun-lee-frieren/oh-my-gemini-cli/blob/main/docs/index.html Initiates a deep initialization for a task, followed by setting the intent for that task. This prepares the project map and stage-routed handoff before coding begins. ```bash /omg:deep-init ``` ```bash /omg:intent ``` -------------------------------- ### Loop Execution Output Example Source: https://context7.com/joonghyun-lee-frieren/oh-my-gemini-cli/llms.txt Example output demonstrating the progress and result of the `/omg:loop` command. It shows the number of cycles run, the final status, and the verification status of acceptance criteria and tasks. ```text # OmG runs: # Cycle 1: team-exec (T-03) → team-verify → team-fix (2 failures patched) # Cycle 2: team-exec (T-04) → team-verify → pass # Cycle 3: team-exec (T-05) → team-verify → pass → all tasks verified # Output after completion: ## Loop Result - cycles run: 3 - status: done - all acceptance criteria: verified - taskboard: T-01..T-05 all verified ## Next /omg:checkpoint ``` -------------------------------- ### Install, Verify, and Manage OmG Extension Source: https://context7.com/joonghyun-lee-frieren/oh-my-gemini-cli/llms.txt Commands for installing, listing, upgrading, and uninstalling the OmG extension. Ensure preview features are enabled in your Gemini settings for balanced model routing. ```bash gemini extensions install https://github.com/Joonghyun-Lee-Frieren/oh-my-gemini-cli ``` ```bash gemini extensions list ``` ```bash /extensions list ``` ```json { "general": { "previewFeatures": true } } ``` ```bash /omg:status ``` ```bash git -C ~/.gemini/extensions/oh-my-gemini-cli pull gemini extensions list ``` ```bash gemini extensions uninstall oh-my-gemini-cli ``` -------------------------------- ### Install Gemini Extension Source: https://github.com/joonghyun-lee-frieren/oh-my-gemini-cli/blob/main/docs/guide/installation.md Install the oh-my-gemini-cli extension using the Gemini CLI command. This installs the extension in non-interactive mode. ```bash gemini extensions install https://github.com/Joonghyun-Lee-Frieren/oh-my-gemini-cli ``` -------------------------------- ### OmG Memory Rule File Example Source: https://github.com/joonghyun-lee-frieren/oh-my-gemini-cli/blob/main/docs/guide/memory-management.md This markdown snippet demonstrates the frontmatter structure for defining memory management rules in OmG. It includes a description, optional file globs for activation, and a flag for unconditional application. ```markdown --- description: "Require tests for behavior changes." globs: - "**/*.ts" - "**/*.tsx" alwaysApply: false --- # tests-required - Add or update tests for changed behavior. - If tests are unavailable, provide explicit validation evidence. ``` -------------------------------- ### List Installed Gemini Extensions Source: https://github.com/joonghyun-lee-frieren/oh-my-gemini-cli/blob/main/docs/guide/installation.md Verify that the oh-my-gemini-cli extension has been loaded by listing all installed extensions. This can be done interactively or from the terminal. ```text /extensions list ``` ```bash gemini extensions list ``` -------------------------------- ### Check Gemini CLI Version Source: https://github.com/joonghyun-lee-frieren/oh-my-gemini-cli/blob/main/docs/guide/installation.md Verify that you have a compatible version of the Gemini CLI installed. Recommended version is v0.38.0+. ```bash gemini --version ``` -------------------------------- ### Troubleshoot: Expected latest-preview routing, get older alias Source: https://github.com/joonghyun-lee-frieren/oh-my-gemini-cli/blob/main/docs/index.html The runtime may be resolving aliases differently than expected, or a stale custom model policy is in use. Update OmG and re-run model balancing. ```bash /omg:model balanced ``` -------------------------------- ### Troubleshoot: /plan opens native plan mode Source: https://github.com/joonghyun-lee-frieren/oh-my-gemini-cli/blob/main/docs/index.html Built-in `/plan` and skill slash invocation names can collide. Use the specific OmG command for OmG planning skill behavior. ```bash /omg-plan (or $omg-plan) ``` ```bash /omg:team-plan ``` -------------------------------- ### Stable vs. Dynamic Context Order Source: https://github.com/joonghyun-lee-frieren/oh-my-gemini-cli/blob/main/docs/guide/context-engineering.md Illustrates the recommended order for placing stable instructions and dynamic data in prompts to optimize cache stability. Stable instructions should precede dynamic data. ```text [dynamic timestamp][system instructions][project context] ``` ```text [system instructions][project context][stage context][dynamic reminder] ``` -------------------------------- ### Assemble Team for a Task Source: https://context7.com/joonghyun-lee-frieren/oh-my-gemini-cli/llms.txt Use `/omg:team-assemble` to propose a role-fit team roster for a given task. It splits specialists and formatters, then waits for explicit approval before starting the pipeline. ```bash /omg:team-assemble "Compare 3 cloud providers and produce an executive decision report" # OmG proposes: # → omg-director (orchestration) # → omg-researcher x3 (parallel research lanes) # → omg-consultant (strategic framing) # → omg-editor (report packaging) # → omg-reviewer (quality gate) # Proceed with this team? (yes/no) yes # After approval, runs: # team-plan → team-prd → taskboard → team-exec → team-verify → team-fix ``` -------------------------------- ### Recommended Command Sequence Source: https://github.com/joonghyun-lee-frieren/oh-my-gemini-cli/blob/main/docs/guide/agent-team-assembly.md This sequence outlines the recommended steps for initiating and managing a task using OmG, including doctoring the team, setting intent, assembling the team, approving the roster, and looping for verification. ```text /omg:doctor team /omg:intent "" /omg:team-assemble "" # approve roster /omg:team "" /omg:loop "Continue unresolved verify backlog" ``` -------------------------------- ### Configure Gemini CLI Preview Features Source: https://github.com/joonghyun-lee-frieren/oh-my-gemini-cli/blob/main/docs/guide/installation.md Configure Gemini CLI settings to enable preview features. This is often done in `~/.gemini/settings.json` or a workspace-specific `.gemini/settings.json`. ```json { "general": { "previewFeatures": true } } ``` -------------------------------- ### Manage Workspace and Taskboard with omg-workspace and omg-taskboard Source: https://github.com/joonghyun-lee-frieren/oh-my-gemini-cli/blob/main/README.md Utilize `workspace` and `taskboard` commands for managing multi-root projects, implementation lanes, and long verify/fix loops. These commands help maintain state, audit lane cleanliness, and track task progress. ```text /omg:workspace set . /omg:workspace audit /omg:workspace add ../feature-auth omg-executor /omg:taskboard sync /omg:taskboard next /omg:recall "why was auth lane blocked" scope=state ``` -------------------------------- ### Check OmG Session Status Source: https://context7.com/joonghyun-lee-frieren/oh-my-gemini-cli/llms.txt Use the `/omg:status` command to get a summary of the current workflow stage, active mode, any blockers, and the recommended next command. This is useful at the beginning and end of work sessions. ```text /omg:status # Example output: ## Stage - current: team-exec (slice 2 of 4) - mode: balanced ## Progress | Task ID | Owner | Status | Evidence | | T-03 | omg-executor | in-progress | — | | T-04 | omg-executor | ready | — | ## Blockers - none ## Next /omg:team-verify --intent="Add JWT auth middleware" ``` -------------------------------- ### Verify Acceptance Gates with Evidence Source: https://context7.com/joonghyun-lee-frieren/oh-my-gemini-cli/llms.txt Use `/omg:team-verify` to validate all acceptance criteria from the PRD, check for regressions, and run an anti-slop quality gate. It emits a priority-ordered fix backlog and only marks tasks `verified` when evidence is explicit. ```bash /omg:team-verify --intent="Add OAuth2 login flow" # Output: ## Verification Matrix | Criterion | Status | Evidence | | Google OAuth login completes | PASS | E2E: test/auth/google.e2e.ts| | GitHub OAuth login completes | FAIL | callback URL 404 in test env| | Token refresh keeps session alive | PASS | integration/session.test.ts | | No regression in password auth | PASS | existing suite: 47/47 green | ## Fix Backlog 1. [p0] T-02: GitHub callback handler returns 404 — root cause: missing route registration ## Next /omg:team-fix --intent="Add OAuth2 login flow" ``` -------------------------------- ### Run Readiness Diagnostics Source: https://context7.com/joonghyun-lee-frieren/oh-my-gemini-cli/llms.txt Executes comprehensive diagnostics for extension loading, team configuration, workspace health, and hook pipeline integrity. Recommended before long autonomous runs. ```text # Full diagnostic scan /omg:doctor # Team-specific diagnostics /omg:doctor team # Example output: ## Extension - oh-my-gemini-cli 0.8.5: loaded ✓ - Gemini CLI v0.41.2: compatible ✓ ## Hook Pipeline - BeforeModel omg-model-router: registered ✓ - AfterAgent omg-learn-signal-after-agent: registered ✓ - lifecycle symmetry: valid ✓ ## Workspace - primary lane: clean ✓ - session-lock.json: no active lock ✓ ## Remediation - none required ``` -------------------------------- ### Troubleshoot: /omg:* not found Source: https://github.com/joonghyun-lee-frieren/oh-my-gemini-cli/blob/main/docs/index.html Occurs when an extension is not loaded in the current process. Verify loaded extensions and restart the session if necessary. ```bash gemini extensions list ``` -------------------------------- ### Configure Notification Routing Profiles and Channels Source: https://context7.com/joonghyun-lee-frieren/oh-my-gemini-cli/llms.txt Sets up notification routing profiles ('watchdog', 'quiet', 'balanced') and adds external channels like webhooks. Configuration is persisted to .omg/state/notify.json. ```text # Enable watchdog profile (all alerts including idle drift) /omg:notify profile watchdog # → enables: approval-needed, verify-failed, blocker-raised, # checkpoint-saved, idle-watchdog, session-stop # → suggests: terminal-bell + file # → persists: .omg/state/notify.json # Enable quiet profile (only urgent interruptions) /omg:notify profile quiet # Enable balanced profile (quiet + checkpoint/team-approval updates) /omg:notify profile balanced # Add a webhook channel for external bridge integration /omg:notify channel webhook https://hooks.example.com/omg-events ``` -------------------------------- ### Execute Full Stage Pipeline with `/omg:team` Source: https://context7.com/joonghyun-lee-frieren/oh-my-gemini-cli/llms.txt Use `/omg:team` to run the complete multi-agent pipeline for complex features or refactors. This includes `team-assemble`, `team-plan`, `team-prd`, `taskboard`, `team-exec`, `team-verify`, and `team-fix`, with explicit approval gates at each stage. ```text /omg:team "Refactor database layer to support multi-tenant isolation" # Pipeline executed: # team-assemble (proposes roster, waits for approval) # → team-plan (dependency-aware task graph) # → team-prd (measurable acceptance criteria) # → taskboard (stable task IDs seeded) # → team-exec (highest-priority ready slice) # → team-verify (evidence-by-criterion gate) # → team-fix (patch only verified failures) # Approve the proposed roster when prompted: yes # or: approve / go / run ``` -------------------------------- ### Verify Core Extension Features Source: https://github.com/joonghyun-lee-frieren/oh-my-gemini-cli/blob/main/docs/guide/installation.md Test the core functionality of the oh-my-gemini-cli extension by running its status command and a sample skill. ```text /omg:status ``` ```text $plan "Plan a small refactor in this repository" ``` -------------------------------- ### Directory Layout for Memory and Rules Source: https://context7.com/joonghyun-lee-frieren/oh-my-gemini-cli/llms.txt Illustrates the project directory structure for storing memory indexes, topic files, and rule packs. This layout helps in organizing and managing project-specific AI context and logic. ```text # Directory layout for memory and rules: # project/ # ↓ GEMINI.md # ↓ MEMORY.md ← compact index only # ↓ .omg/ # ↓ memory/ # ← architecture.md # ← decisions.md # ← workflows.md # ↓ rules/ # ← always/ # ← ← project-invariants.md # ← tests-required.md ← activated by **/*.ts globs # ← security-review.md ← activated by src/auth/** globs ``` -------------------------------- ### Learn Skill Configuration Source: https://github.com/joonghyun-lee-frieren/oh-my-gemini-cli/blob/main/skills/learn/SKILL.md Configure the learn skill's behavior, including minimum session length, extraction threshold, auto-approval, learned skills path, and pattern detection/ignore lists. ```json { "min_session_length": 10, "extraction_threshold": "medium", "auto_approve": false, "learned_skills_path": ".omg/rules/learned/", "patterns_to_detect": [ "error_resolution", "user_corrections", "workarounds", "debugging_techniques", "project_specific" ], "ignore_patterns": [ "simple_typos", "one_time_fixes", "external_api_issues" ] } ``` -------------------------------- ### Troubleshoot: Workspace/sandbox behavior differs from docs Source: https://github.com/joonghyun-lee-frieren/oh-my-gemini-cli/blob/main/docs/index.html Indicates the Gemini CLI runtime is older than the OmG compatibility baseline. Upgrade the CLI and re-run diagnostic commands. ```bash Upgrade Gemini CLI to stable v0.41.2+, then rerun /omg:doctor and /omg:workspace audit ``` -------------------------------- ### Optimize Context Structure with $context-optimize Source: https://context7.com/joonghyun-lee-frieren/oh-my-gemini-cli/llms.txt The $context-optimize skill restructures prompt layers to reduce context bloat and churn by placing stable instructions first, dynamic data appended last, and volatile history compacted into structured summaries. ```text $context-optimize ``` -------------------------------- ### Runtime State Files for Resuming Sessions Source: https://context7.com/joonghyun-lee-frieren/oh-my-gemini-cli/llms.txt Lists the runtime state files used by the Oh My Gemini CLI to resume sessions without replaying raw turns. These files store critical information about the current state of the workflow. ```text # Runtime state files for resuming without replaying raw turns: # .omg/state/mode.json # .omg/state/workflow.md # .omg/state/checkpoint.md # .omg/state/taskboard.md ``` -------------------------------- ### Five-Layer Context Order for Caching Source: https://context7.com/joonghyun-lee-frieren/oh-my-gemini-cli/llms.txt Illustrates the recommended five-layer context order for maximizing cache hit rates and minimizing token waste. Stable layers are placed before dynamic ones to preserve cache prefixes. ```text # Five-layer context order (stable → dynamic): # Layer 1: System / runtime constraints (very low change, very high cache) # Layer 2: Project standards (low change, high cache) # Layer 3: GEMINI.md + MEMORY.md (low-medium change, high cache) # Layer 4: Active task brief + taskboard (medium change, medium cache) # Layer 5: Latest execution traces (high change, append-only) # Anti-pattern (breaks cache prefix): [dynamic timestamp][system instructions][project context] # Correct order (stable prefix preserved): [system instructions][project context][stage context][dynamic reminder] ``` -------------------------------- ### Clone oh-my-gemini-cli Repository Source: https://github.com/joonghyun-lee-frieren/oh-my-gemini-cli/blob/main/docs/guide/installation.md Clone the oh-my-gemini-cli repository to your local machine and navigate into the directory. ```bash git clone https://github.com/Joonghyun-Lee-Frieren/oh-my-gemini-cli.git cd oh-my-gemini-cli ``` -------------------------------- ### Assemble Team with Task Source: https://github.com/joonghyun-lee-frieren/oh-my-gemini-cli/blob/main/docs/guide/agent-team-assembly.md Use this command to build a team charter with role lanes, model profile, and handoff protocol for a specific task. Ensure Gemini CLI preview features are enabled for optimal model resolution. ```bash /omg:team-assemble "" ``` ```bash $team-assemble "" ``` -------------------------------- ### Oh My Gemini CLI Project Structure Source: https://github.com/joonghyun-lee-frieren/oh-my-gemini-cli/blob/main/README.md This tree displays the directory and file structure of the oh-my-gemini-cli project. It shows the organization of configuration files, agent definitions, commands, skills, and context management. ```text oh-my-gemini-cli/ |- GEMINI.md |- gemini-extension.json |- .omg/ | `- state/ | |- session-lock.json | `- interviews/ | | |- active.json | | `- [slug]/ | | |- context.json | | `- prd.md | `- sessions/ | `- [session-slug]/ | |- workspace.json | |- taskboard.md | |- workflow.md | `- checkpoint.md |- agents/ |- commands/ | `- omg/ |- skills/ |- context/ |- docs/ `- LICENSE ``` -------------------------------- ### Execute Scoped Implementation Slice Source: https://context7.com/joonghyun-lee-frieren/oh-my-gemini-cli/llms.txt The `/omg:team-exec` command implements the single highest-priority ready task from the taskboard. It reads baseline anchors, applies the minimal viable diff, and records a handoff summary. ```bash /omg:team-exec --intent="Add OAuth2 login flow" # OmG selects T-01 (highest priority, no unmet deps): # → reads src/auth/oauth.ts # → implements smallest viable diff # → runs relevant tests # Output: ## Scope - T-01: Add OAuth2 provider config ## Files Changed - src/auth/oauth.ts (new: OAuthProvider class, Google + GitHub configs) - src/config/env.ts (added GOOGLE_CLIENT_ID, GITHUB_CLIENT_ID constants) ## Validation - unit: OAuthProvider.getAuthUrl() returns correct redirect URI ✓ - lint: no new violations ✓ ## Blockers - none ## Follow-ups - T-02 ready to execute next ``` -------------------------------- ### Save and Resume Compact State Checkpoint Source: https://context7.com/joonghyun-lee-frieren/oh-my-gemini-cli/llms.txt Creates a compact state snapshot including taskboard and workspace references for session resumption. The checkpoint is saved to .omg/state/checkpoint.md. ```text /omg:checkpoint # Output: ## Checkpoint Saved - file: .omg/state/checkpoint.md - stage: team-exec (T-03 in-progress) - mode: balanced - workspace: primary=main@a3f92c1, feature-auth=auth/v2@d8e1f03 - taskboard: T-01 verified, T-02 verified, T-03 in-progress, T-04 todo - resume hint: /omg:team-exec --intent="Add OAuth2 login flow" # Resume from checkpoint in a new session: /omg:status # reads checkpoint.md, restores context /omg:taskboard next # picks up T-03 /omg:team-exec --intent="Add OAuth2 login flow" ``` -------------------------------- ### Define Acceptance Criteria with PRD Source: https://context7.com/joonghyun-lee-frieren/oh-my-gemini-cli/llms.txt Use `/omg:team-prd` to convert a plan into a PRD-quality scope contract with measurable acceptance criteria and explicit non-goals. This blocks `team-exec` until confirmed. ```bash /omg:team-prd --intent="Add OAuth2 login flow" # Output: ## Problem Statement - Users cannot log in with Google/GitHub; only password auth exists. ## Scope / Non-goals - In scope: Google OAuth2, GitHub OAuth2, session persistence - Non-goals: SSO/SAML, multi-factor auth, admin user provisioning ## Acceptance Criteria | Criterion | Evidence Needed | Owner | | Google OAuth login completes | E2E test passes | omg-verifier | | GitHub OAuth login completes | E2E test passes | omg-verifier | | Token refresh keeps session alive | integration test passes | omg-verifier | | No regression in password auth | existing test suite green | omg-verifier | ## Constraints - Must not break existing session schema - Secrets loaded from environment variables only ``` -------------------------------- ### Assemble Dynamic Teams with omg-team-assemble Source: https://github.com/joonghyun-lee-frieren/oh-my-gemini-cli/blob/main/README.md Use the `team-assemble` command to dynamically create specialized teams for complex tasks. This command is available immediately if the extension is loaded. ```text /omg:team-assemble "Compare 3 competitors and produce an exec report" -> proposes: researcher x3 + consultant + editor + director -> asks: Proceed with this team? (yes/no) -> after approval: team-plan -> team-prd -> taskboard -> team-exec -> team-verify -> team-fix ``` -------------------------------- ### Bootstrap Hooks Source: https://github.com/joonghyun-lee-frieren/oh-my-gemini-cli/blob/main/docs/index.html Initializes and profiles hooks for deterministic hook lane policy persistence within the session. ```bash /omg:hooks-init ``` ```bash /omg:hooks profile balanced ``` -------------------------------- ### OmG Runtime State Files Source: https://github.com/joonghyun-lee-frieren/oh-my-gemini-cli/blob/main/docs/guide/context-engineering.md Lists essential runtime state files used by OmG for long workflows. These files enable resuming work without replaying every raw turn. ```text .omg/state/mode.json ``` ```text .omg/state/workflow.md ``` ```text .omg/state/checkpoint.md ``` ```text .omg/state/hooks.json ``` ```text .omg/state/hooks-validation.md ``` -------------------------------- ### Plan Skill Output Template Source: https://github.com/joonghyun-lee-frieren/oh-my-gemini-cli/blob/main/skills/plan/SKILL.md This markdown template outlines the structure for a phased implementation plan. Use it to organize goals, phases, tasks, critical files, risks, and validation steps for complex requests. ```markdown ## Goal - ... ## Phase Plan 1. Phase 1 - ... 2. Phase 2 - ... ## Task Breakdown 1. ... 2. ... ## Critical Files - ... ## Risks - ... ## Validation - ... ``` -------------------------------- ### Troubleshoot: Autonomous flow confirms too often or too little Source: https://github.com/joonghyun-lee-frieren/oh-my-gemini-cli/blob/main/docs/index.html The approval posture may not align with the risk profile, or shared worktree hygiene is unclear. Adjust approval posture and audit workspace. ```bash /omg:approval suggest|auto|full-auto ``` ```bash /omg:workspace audit ``` -------------------------------- ### Generate Dependency-Aware Execution Plan Source: https://context7.com/joonghyun-lee-frieren/oh-my-gemini-cli/llms.txt The `/omg:team-plan` command builds a task graph with stable IDs, dependencies, lane assignments, and baseline branch anchors. Run this before `team-prd` and `team-exec`. ```bash /omg:team-plan --intent="Add OAuth2 login flow" # Output: ## Phase Plan 1. Phase 1 - OAuth provider integration (T-01, T-02) 2. Phase 2 - Session handling and token refresh (T-03) 3. Phase 3 - UI integration and regression tests (T-04, T-05) ## Task Breakdown | ID | Task | Owner | Deps | Priority | | T-01 | Add OAuth2 provider config | omg-executor | — | p0 | | T-02 | Implement callback handler | omg-executor | T-01 | p0 | | T-03 | Token refresh middleware | omg-executor | T-02 | p1 | | T-04 | Login UI component | omg-executor | T-02 | p1 | | T-05 | End-to-end auth tests | omg-verifier | T-03 | p2 | ## Critical Files - src/auth/oauth.ts - src/middleware/session.ts - src/components/LoginButton.tsx ``` -------------------------------- ### Run OmG Status and Goal Commands Source: https://github.com/joonghyun-lee-frieren/oh-my-gemini-cli/blob/main/README.md Execute a smoke test using the /omg:status command. Initiate a goal-style autonomous delivery loop with the /omg:goal command, specifying the desired objective. ```text /omg:status ``` ```text /omg:goal "Implement the requested change, update tests, and verify acceptance criteria" ```