Add advanced Gemini CLI command documentation templates#9
Conversation
- Added detailed templates for the following commands: `check-types`, `create-error`, `create-repo`, `create-service`, `create-tests`, and `review-changes`. - Included step-by-step guides for each command with usage examples, configuration patterns, error handling guidelines, and best practices. - Updated `hooks/README.md` with a comprehensive overview of session hooks and customization options. - Introduced new session hooks (`session-start.js` and `session-end.js`) to automate task tracking, statistics, and environment preparation. - Enhanced formatting and recommendations in documentation to align with TypeScript coding and clean architecture standards.
|
Caution Review failedThe pull request is closed. WalkthroughThis pull request introduces comprehensive Gemini CLI support across the codebase, including new setup workflows, template commands and hooks, configuration policies, and extensive documentation updates. The version is bumped to 1.14.0, with centralized rules documentation and cross-tool consistency emphasis throughout. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant setup.js as bin/setup.js
participant Gemini as Gemini Setup
participant FS as File System
User->>setup.js: run setup flow
activate setup.js
setup.js->>User: select tools (checkbox)
User-->>setup.js: select 'gemini'
setup.js->>Gemini: setupGemini(language, autoYes)
activate Gemini
Gemini->>FS: check .gemini directory
Gemini->>FS: migrate existing config (if present)
Gemini->>FS: copy hooks/ (session-start.js, session-end.js, user-prompt-submit.js)
Gemini->>FS: copy commands/ (templates)
Gemini->>FS: copy settings.json
Gemini->>FS: copy tool-policy.json
Gemini-->>setup.js: setup complete
deactivate Gemini
setup.js-->>User: configuration ready
deactivate setup.js
sequenceDiagram
participant CLI as Gemini CLI
participant Hook as Hook Scripts
participant State as State Files
participant Repo as Git Repo
participant Dev as .dev/
CLI->>Hook: trigger session-start.js
activate Hook
Hook->>Dev: validate .dev/rules/
Hook->>Dev: load architecture.md
Hook->>Dev: load & parse todo.md
Hook->>Repo: check git status
Hook->>State: save initial .session-state.json
Hook-->>CLI: context loaded, display summary
deactivate Hook
CLI->>Hook: trigger user-prompt-submit.js (pre-submit)
activate Hook
Hook->>Hook: validatePrompt() → warnings
Hook->>Hook: enhancePrompt() → suggestions
Hook->>State: logPrompt() → .prompt-log.jsonl
Hook-->>CLI: allow submission (exit 0)
deactivate Hook
CLI->>Hook: trigger session-end.js (on close)
activate Hook
Hook->>State: load .session-state.json
Hook->>Dev: diff todo.md for completed tasks
Hook->>Repo: commitCompletedTasks() (optional)
Hook->>State: update .session-stats.json (count, duration)
Hook-->>CLI: session summary
deactivate Hook
Estimated code review effort🎯 4 (Complex) | ⏱️ ~65 minutes Areas requiring extra attention:
Poem
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro Knowledge base: Disabled due to 📒 Files selected for processing (21)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Greptile OverviewGreptile SummaryAdded comprehensive Gemini CLI integration with templates for hooks, commands, and settings, mirroring the existing Claude Code structure. Key additions:
Critical issue found:
Confidence Score: 3/5
Sequence DiagramsequenceDiagram
participant User
participant SetupCLI as ai-dotfiles-manager
participant ProjectFS as Project Filesystem
participant GeminiCLI as Gemini CLI
User->>SetupCLI: Run setup/update command
SetupCLI->>User: Prompt for AI tools selection
User->>SetupCLI: Select "Gemini CLI" (+ others)
SetupCLI->>ProjectFS: Create .gemini/ directory
SetupCLI->>ProjectFS: Copy templates/gemini/hooks/*.js
SetupCLI->>ProjectFS: Copy templates/gemini/commands/*.md
SetupCLI->>ProjectFS: Copy settings.json & tool-policy.json
SetupCLI->>ProjectFS: Setup .dev/rules/ (centralized)
Note over SetupCLI,ProjectFS: All AI tools reference<br/>.dev/rules/ for consistency
SetupCLI-->>User: Installation complete
User->>GeminiCLI: Start session
GeminiCLI->>ProjectFS: Execute session-start.js hook
ProjectFS-->>GeminiCLI: Load .dev/rules/, architecture.md, todo.md
GeminiCLI->>ProjectFS: Save session state
GeminiCLI-->>User: Session ready with context loaded
User->>GeminiCLI: Work on tasks
User->>ProjectFS: Mark todos as complete
User->>GeminiCLI: End session
GeminiCLI->>ProjectFS: Execute session-end.js hook
ProjectFS->>ProjectFS: Compare session start/end state
ProjectFS->>ProjectFS: Auto-commit completed todos
GeminiCLI-->>User: Session ended, todos committed
|
|
|
||
| ### Clarified | ||
| - Deprecated provider-specific rule folders and shortcut copies; all installs now read rules from centralized `.dev/rules/` (shared). Base rules are linked from the package (copy fallback on Windows). | ||
|
|
There was a problem hiding this comment.
logic: Historical dates in CHANGELOG should not be modified from 2024 to 2025. These are past release dates that should remain accurate.
| ## [1.8.1] - 2024-10-25 |
Prompt To Fix With AI
This is a comment left during a code review.
Path: CHANGELOG.md
Line: 17:17
Comment:
**logic:** Historical dates in CHANGELOG should not be modified from 2024 to 2025. These are past release dates that should remain accurate.
```suggestion
## [1.8.1] - 2024-10-25
```
How can I resolve this? If you propose a fix, please make it concise.| - ✅ All providers reference `.dev/rules/` consistently | ||
|
|
||
| ## [1.8.0] - 2024-10-25 | ||
| ## [1.8.0] - 2025-10-25 |
There was a problem hiding this comment.
logic: Revert year to 2024 for this historical release
| ## [1.8.0] - 2025-10-25 | |
| ## [1.8.0] - 2024-10-25 |
Prompt To Fix With AI
This is a comment left during a code review.
Path: CHANGELOG.md
Line: 37:37
Comment:
**logic:** Revert year to 2024 for this historical release
```suggestion
## [1.8.0] - 2024-10-25
```
How can I resolve this? If you propose a fix, please make it concise.| - ✅ Comprehensive documentation for hook customization | ||
|
|
||
| ## [1.7.0] - 2024-10-24 | ||
| ## [1.7.0] - 2025-10-24 |
There was a problem hiding this comment.
logic: Revert year to 2024
| ## [1.7.0] - 2025-10-24 | |
| ## [1.7.0] - 2024-10-24 |
Prompt To Fix With AI
This is a comment left during a code review.
Path: CHANGELOG.md
Line: 64:64
Comment:
**logic:** Revert year to 2024
```suggestion
## [1.7.0] - 2024-10-24
```
How can I resolve this? If you propose a fix, please make it concise.| - ✅ Simpler project configuration | ||
|
|
||
| ## [1.6.2] - 2024-10-24 | ||
| ## [1.6.2] - 2025-10-24 |
There was a problem hiding this comment.
logic: Revert year to 2024
| ## [1.6.2] - 2025-10-24 | |
| ## [1.6.2] - 2024-10-24 |
Prompt To Fix With AI
This is a comment left during a code review.
Path: CHANGELOG.md
Line: 80:80
Comment:
**logic:** Revert year to 2024
```suggestion
## [1.6.2] - 2024-10-24
```
How can I resolve this? If you propose a fix, please make it concise.| - `allowedCommands` should only be used when restricting/whitelisting specific commands | ||
|
|
||
| ## [1.6.1] - 2024-10-24 | ||
| ## [1.6.1] - 2025-10-24 |
There was a problem hiding this comment.
logic: Revert year to 2024
| ## [1.6.1] - 2025-10-24 | |
| ## [1.6.1] - 2024-10-24 |
Prompt To Fix With AI
This is a comment left during a code review.
Path: CHANGELOG.md
Line: 87:87
Comment:
**logic:** Revert year to 2024
```suggestion
## [1.6.1] - 2024-10-24
```
How can I resolve this? If you propose a fix, please make it concise.| - User override capabilities documented | ||
|
|
||
| ## [1.5.3] - 2024-10-24 | ||
| ## [1.5.3] - 2025-10-24 |
There was a problem hiding this comment.
logic: Revert year to 2024
| ## [1.5.3] - 2025-10-24 | |
| ## [1.5.3] - 2024-10-24 |
Prompt To Fix With AI
This is a comment left during a code review.
Path: CHANGELOG.md
Line: 144:144
Comment:
**logic:** Revert year to 2024
```suggestion
## [1.5.3] - 2024-10-24
```
How can I resolve this? If you propose a fix, please make it concise.| - Provided setup instructions for IDE integration and git hooks | ||
|
|
||
| ## [1.5.2] - 2024-10-24 | ||
| ## [1.5.2] - 2025-10-24 |
There was a problem hiding this comment.
logic: Revert year to 2024
| ## [1.5.2] - 2025-10-24 | |
| ## [1.5.2] - 2024-10-24 |
Prompt To Fix With AI
This is a comment left during a code review.
Path: CHANGELOG.md
Line: 167:167
Comment:
**logic:** Revert year to 2024
```suggestion
## [1.5.2] - 2024-10-24
```
How can I resolve this? If you propose a fix, please make it concise.| - Updated documentation to reflect ESLint support and backup feature | ||
|
|
||
| ## [1.5.1] - 2024-10-24 | ||
| ## [1.5.1] - 2025-10-24 |
There was a problem hiding this comment.
logic: Revert year to 2024
| ## [1.5.1] - 2025-10-24 | |
| ## [1.5.1] - 2024-10-24 |
Prompt To Fix With AI
This is a comment left during a code review.
Path: CHANGELOG.md
Line: 181:181
Comment:
**logic:** Revert year to 2024
```suggestion
## [1.5.1] - 2024-10-24
```
How can I resolve this? If you propose a fix, please make it concise.| - Updated `printNextSteps()` to inform users about TypeScript config files | ||
|
|
||
| ## [1.5.0] - 2024-10-24 - Centralized Architecture with Session Hooks | ||
| ## [1.5.0] - 2025-10-24 - Centralized Architecture with Session Hooks |
There was a problem hiding this comment.
logic: Revert year to 2024
| ## [1.5.0] - 2025-10-24 - Centralized Architecture with Session Hooks | |
| ## [1.5.0] - 2024-10-24 - Centralized Architecture with Session Hooks |
Prompt To Fix With AI
This is a comment left during a code review.
Path: CHANGELOG.md
Line: 194:194
Comment:
**logic:** Revert year to 2024
```suggestion
## [1.5.0] - 2024-10-24 - Centralized Architecture with Session Hooks
```
How can I resolve this? If you propose a fix, please make it concise.| and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). | ||
|
|
||
| ## [1.4.0] - 2024-10-21 | ||
| ## [1.4.0] - 2025-10-21 |
There was a problem hiding this comment.
logic: Revert year to 2024
| ## [1.4.0] - 2025-10-21 | |
| ## [1.4.0] - 2024-10-21 |
Prompt To Fix With AI
This is a comment left during a code review.
Path: CHANGELOG.md
Line: 235:235
Comment:
**logic:** Revert year to 2024
```suggestion
## [1.4.0] - 2024-10-21
```
How can I resolve this? If you propose a fix, please make it concise.There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| function findCompletedTasks(oldContent, newContent) { | ||
| const oldPending = (oldContent.match(/- [ ] .+/g) || []).map(t => t.replace('- [ ] ', '').trim()); | ||
| const newCompleted = (newContent.match(/- [x] .+/gi) || []).map(t => t.replace(/- [x] /i, '').trim()); |
There was a problem hiding this comment.
Completed todos never detected due to unescaped markdown regex
The new Gemini session-end hook never matches todo.md checkbox lines because the regular expressions use /- [ ] .+/g and /- [x] .+/gi. In regex, [ ] and [x] define character classes rather than literal [...], so both expressions fail to match entries like - [ ] task or - [x] task. As a result oldPending and newCompleted are always empty and no completed tasks are ever committed, making the auto-commit feature ineffective. Escaping the brackets (e.g. /\- \[ \] .+/) would fix the detection.
Useful? React with 👍 / 👎.
Overview:
Added detailed templates for key Gemini CLI commands such as
check-types,create-error,create-repo,create-service,create-tests, andreview-changes. These templates include step-by-step guides, usage examples, and best practices.Details:
hooks/README.mdwith an overview of session hooks and customization options.session-start.jsandsession-end.js) for automating task tracking and environment preparation.No functional changes to the underlying code were made; adjustments are documentation-focused.
Summary by CodeRabbit
Release Notes
New Features
Documentation
Chores