mirror of
https://github.com/qodo-ai/pr-agent.git
synced 2025-12-12 02:45:18 +00:00
Merge pull request #2030 from qodo-ai/hl/qm_cli_docs
docs: add Qodo Merge CLI section to documentation navigation
This commit is contained in:
commit
96299b28bc
4 changed files with 345 additions and 0 deletions
35
docs/docs/qodo-merge-cli/index.md
Normal file
35
docs/docs/qodo-merge-cli/index.md
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
# Review and Implement AI Suggestions from Your Terminal
|
||||
|
||||
**Qodo Merge CLI** utilizes [Qodo Command](https://docs.qodo.ai/qodo-documentation/qodo-command) to bring AI-powered code suggestions directly to your terminal.
|
||||
Review, implement, and manage Qodo Merge suggestions without leaving your development environment.
|
||||
|
||||
{width=768}
|
||||
|
||||
## Mission
|
||||
|
||||
The CLI can bridge the gap between Qodo Merge feedback and code implementation in your terminal workflow:
|
||||
|
||||
- **Seamlessly generating and managing PR suggestions** without context switching
|
||||
- Remote Suggestions: Fetches Qodo Merge suggestions from your Git Environment
|
||||
- Local Suggestions: Get real-time suggestions against your local changes
|
||||
- **Interactive review and implementation** of AI feedback directly in your terminal
|
||||
- **Tracking implementation status** of each suggestion (pending/implemented/declined)
|
||||
|
||||
## Remote Suggestions Flow
|
||||
1. Open a Pull Request and receive Qodo Merge feedback
|
||||
2. Pull the remote suggestions into your terminal with Qodo Merge CLI
|
||||
3. Review, explore details, and implement suggestions interactively
|
||||
4. Commit changes back to your branch seamlessly
|
||||
|
||||
## Local Suggestions Flow
|
||||
Work in progress - coming soon!
|
||||
|
||||
## Quick Start
|
||||
|
||||
1. **[Install](installation.md)** Qodo Command
|
||||
2. **[Get Started](getting-started.md)** with your first PR review
|
||||
3. **[Explore Features](features.md)** for comprehensive capabilities
|
||||
|
||||
---
|
||||
|
||||
*Part of the Qodo Merge ecosystem - closing the loop between AI feedback and code implementation.*
|
||||
90
docs/docs/qodo-merge-cli/installation.md
Normal file
90
docs/docs/qodo-merge-cli/installation.md
Normal file
|
|
@ -0,0 +1,90 @@
|
|||
# Installation
|
||||
|
||||
> Currently for remote suggestions, Qodo Merge has to be installed and active on your Git repository (GitHub / GitLab).
|
||||
|
||||
## Install Qodo Command
|
||||
|
||||
Qodo Merge CLI is a review tool within [Qodo Command](https://docs.qodo.ai/qodo-documentation/qodo-command), a command-line interface for running and managing AI agents.
|
||||
|
||||
To use Qodo Command, you'll need first Node.js and npm installed.
|
||||
Then, to install Qodo Command, run:
|
||||
|
||||
```bash
|
||||
npm install -g @qodo/command
|
||||
```
|
||||
|
||||
**Login and Setup**
|
||||
|
||||
To start using Qodo Command, you need to log in first:
|
||||
|
||||
```bash
|
||||
qodo login
|
||||
```
|
||||
|
||||
Once login is completed, you'll receive an API key in the terminal.
|
||||
The API key is also saved locally in the .qodo folder in your home directory, and can be reused (e.g., in CI).
|
||||
The key is tied to your user account and subject to the same usage limits.
|
||||
|
||||
[//]: # (## API Key Management)
|
||||
|
||||
[//]: # ()
|
||||
[//]: # (There are a few commands that let you maintain the API key:)
|
||||
|
||||
[//]: # ()
|
||||
[//]: # (```bash)
|
||||
|
||||
[//]: # (qodo key list # List all API keys)
|
||||
|
||||
[//]: # (qodo key create <name> # Create a new API key with the given name)
|
||||
|
||||
[//]: # (qodo key revoke <name> # Revoke an API key by name)
|
||||
|
||||
[//]: # (```)
|
||||
|
||||
|
||||
## Using Qodo Merge CLI
|
||||
|
||||
After you set up Qodo Command, you can start using Qodo Merge CLI by running:
|
||||
|
||||
```bash
|
||||
qodo merge
|
||||
```
|
||||
### Set Up Git Client
|
||||
On first run, the CLI will check for your Git client (GitHub CLI or GitLab CLI).
|
||||
If not found, it will guide you through the installation process.
|
||||
|
||||
{width=384}
|
||||
|
||||
|
||||
## Quick Usage
|
||||
|
||||
There are two ways to specify which PR to review:
|
||||
|
||||
(1) **Auto Detect PR from current branch**
|
||||
run this command in your CLI:
|
||||
|
||||
```bash
|
||||
qodo merge
|
||||
```
|
||||
|
||||
(2) **Specify PR number or URL**
|
||||
|
||||
```bash
|
||||
qodo merge 303
|
||||
|
||||
qodo merge https://github.com/owner/repo/pull/303
|
||||
```
|
||||
|
||||
Then the tool will automatically fetch the suggestions from the PR and display them in an interactive table.
|
||||
|
||||
{width=768}
|
||||
|
||||
|
||||
## Next Steps
|
||||
|
||||
1. **[Get Started](getting-started.md)**: Try your first PR review
|
||||
2. **[Explore Features](features.md)**: Learn about all capabilities
|
||||
|
||||
---
|
||||
|
||||
*The CLI will guide you through any additional setup needed when you first run `qodo merge`.*
|
||||
213
docs/docs/qodo-merge-cli/usage.md
Normal file
213
docs/docs/qodo-merge-cli/usage.md
Normal file
|
|
@ -0,0 +1,213 @@
|
|||
# Usage Guide for Qodo Merge CLI
|
||||
|
||||
|
||||
## Understanding the Interface
|
||||
|
||||
### Why a Structured Table?
|
||||
|
||||
The suggestions table serves as the core interface for reviewing and managing AI feedback.
|
||||
|
||||
The table provides a structured overview of all suggestions with key metadata.
|
||||
Users can efficiently prioritize, explore, and implement suggestions through an intuitive workflow.
|
||||
|
||||
The interface guides you from high-level overviews to detailed implementation context.
|
||||
This consistent user-friendly structure streamlines the review process, reducing time from feedback to implementation.
|
||||
|
||||
{width=768}
|
||||
|
||||
|
||||
|
||||
### Navigation Instructions
|
||||
Use `↑`/`↓` to navigate suggestions, `Enter` to implement, `Space` for multi-select, and `ESC` to exit.
|
||||
|
||||
The table includes:
|
||||
|
||||
- **Selection** (`○`/`◉`): Multi-selection mode
|
||||
- **Category**: Security, Performance, General, etc.
|
||||
- **Impact**: High, Medium, Low importance
|
||||
- **Suggestion**: Brief description
|
||||
- **Status**: `✓` implemented, `✗` declined, blank = pending
|
||||
- **Detail Panel** (if wide enough): Full suggestion text, affected files, impact analysis
|
||||
|
||||
## Flow
|
||||
|
||||
### Explore the suggestions
|
||||
|
||||
You can explore the suggestions in detail before implementing them.
|
||||
You can view the proposed code changes in a diff format, jump to the relevant code in your IDE, or chat about any suggestion for clarification.
|
||||
|
||||
!!! note "Exploring the suggestions"
|
||||
|
||||
[//]: # ( === "Details Panel")
|
||||
|
||||
[//]: # ()
|
||||
[//]: # ( {width=768})
|
||||
|
||||
[//]: # ( )
|
||||
[//]: # ( **Enhanced Layout (≥120 columns)**)
|
||||
|
||||
[//]: # ( )
|
||||
[//]: # ( - **Detail Panel**: Extended information for selected suggestions)
|
||||
|
||||
[//]: # ( - **File Information**: Affected files and line ranges)
|
||||
|
||||
[//]: # ( - **Complete Description**: Full suggestion explanation)
|
||||
|
||||
[//]: # ( - **Impact Assessment**: Detailed importance analysis)
|
||||
|
||||
=== "Diff View (`D/S`)"
|
||||
=== "Unified Diff View (`D`)"
|
||||
|
||||
{width=768}
|
||||
|
||||
- Press `D` to view proposed code changes
|
||||
- Standard unified diff format with line numbers
|
||||
- Syntax highlighting for additions/removals
|
||||
- `↑`/`↓` to scroll through changes
|
||||
|
||||
=== "Side-by-Side View (`S`)"
|
||||
|
||||
{width=768}
|
||||
|
||||
- Press `S` for side-by-side diff view
|
||||
- Enhanced layout for complex changes
|
||||
- Better context understanding
|
||||
- Clear before/after comparison
|
||||
|
||||
=== "Jump to Code (`O`)"
|
||||
|
||||
**IDE Integration**
|
||||
|
||||
- Press `O` to open the suggestion's source file in your IDE
|
||||
- Supports all major IDEs when terminal is running inside them
|
||||
- Direct navigation to relevant code location
|
||||
- Seamless transition between CLI and editor
|
||||
|
||||
=== "Chat (`C`)"
|
||||
|
||||
**Suggestion-Specific Discussion**
|
||||
|
||||
{width=768}
|
||||
|
||||
- Press `C` to discuss the current suggestion
|
||||
- Context automatically included (files, lines, description)
|
||||
- Ask questions, request modifications
|
||||
- `Ctrl+J` for new lines, `ESC` to return
|
||||
|
||||
|
||||
### Implement
|
||||
|
||||
You can implement a single suggestion, multiple selected suggestions, or all suggestions at once. You can also chat about any suggestion before implementing it.
|
||||
|
||||
!!! note "Multiple implementation modes available"
|
||||
|
||||
=== "1. Single Suggestion"
|
||||
{width=768}
|
||||
|
||||
**Direct individual implementation**
|
||||
|
||||
1. Navigate to any specific suggestion
|
||||
2. Press `Enter` to implement just that suggestion
|
||||
|
||||
=== "2. Multi-Select"
|
||||
{width=768}
|
||||
|
||||
**Select multiple related suggestions**
|
||||
|
||||
1. Use `Space` to select specific suggestions (◉)
|
||||
2. Navigate and select multiple related suggestions
|
||||
3. Press `Enter` on any selected suggestion to start implementation
|
||||
4. AI implements selected suggestions together
|
||||
|
||||
=== "3. Address All"
|
||||
{width=768}
|
||||
|
||||
**Reflect and address all suggestions (Always available as first row)**
|
||||
|
||||
1. Press `Enter` on the first row "Reflect and address all suggestions"
|
||||
2. AI implements all suggestions simultaneously and intelligently
|
||||
3. Handles conflicts and dependencies automatically
|
||||
4. Review the comprehensive summary
|
||||
|
||||
=== "4. Chat then Implement"
|
||||
|
||||
{width=768}
|
||||
|
||||
**Discuss then implement**
|
||||
|
||||
1. Press `C` on any suggestion to start a chat
|
||||
2. Ask questions, request modifications, get clarifications
|
||||
3. Once satisfied, request implementation via chat
|
||||
4. AI implements based on your discussion
|
||||
|
||||
___
|
||||
|
||||
#### Implementation Summary
|
||||
|
||||
After the AI completes the implementation, you receive a **structured output** showing detailed results for each suggestion:
|
||||
|
||||
- **Status**: `✓ IMPLEMENTED`, `SKIPPED`, or `✗ REJECTED`
|
||||
- **Suggestion**: Brief description of what was addressed
|
||||
- **Reasoning**: Explanation of the implementation approach
|
||||
- **Changes**: Summary of code modifications made
|
||||
|
||||
{width=768}
|
||||
|
||||
Each suggestion gets its own implementation summary, providing full transparency into what was done and why.
|
||||
|
||||
### Finalize
|
||||
|
||||
After implementing the suggestions, you have several options to proceed:
|
||||
|
||||
!!! note "Post Implementation Actions"
|
||||
=== "Return to Table (`ESC`)"
|
||||
|
||||
{width=768}
|
||||
|
||||
The first option returns you to the main table where you can see:
|
||||
|
||||
- **Updated Status**: Implemented suggestions now show `✓` green checkmark
|
||||
- **Real-time Updates**: Status changes reflect immediately
|
||||
- **Continue Workflow**: Handle remaining pending suggestions
|
||||
|
||||
=== "Continue Chatting (`C`)"
|
||||
|
||||
{width=768}
|
||||
|
||||
Discuss the implementation details:
|
||||
|
||||
- Review changes made by the AI
|
||||
- Request refinements or modifications
|
||||
- Get explanations of implementation approach
|
||||
- Continuous improvement cycle
|
||||
|
||||
=== "Commit Changes (`M`)"
|
||||
|
||||
{width=512}
|
||||
|
||||
Auto-generate commit messages:
|
||||
|
||||
- AI-generated commit messages based on changes
|
||||
- Editable before committing
|
||||
- Standard git conventions
|
||||
- Seamless workflow integration
|
||||
|
||||
=== "Open Edited File (`O`)"
|
||||
|
||||
Open the implemented code directly in your IDE:
|
||||
|
||||
- View the exact changes made
|
||||
- See implementation in full context
|
||||
- Continue development seamlessly
|
||||
- Integrated with your existing workflow
|
||||
|
||||
## Tips for Success
|
||||
|
||||
- **Start with "Fix All"** to let AI handle everything intelligently
|
||||
- **Use Chat liberally** - ask questions about unclear suggestions
|
||||
- **Decline appropriately** - press `X` and provide reasons for inappropriate suggestions
|
||||
- **Multi-select strategically** - group related suggestions together
|
||||
|
||||
---
|
||||
|
||||
*Ready to explore all features? Check out [Features & Usage](features.md) for comprehensive capabilities.*
|
||||
|
|
@ -66,11 +66,18 @@ nav:
|
|||
# - Features: 'chrome-extension/features.md'
|
||||
# - Data Privacy: 'chrome-extension/data_privacy.md'
|
||||
# - Options: 'chrome-extension/options.md'
|
||||
- Qodo Merge CLI:
|
||||
- Overview: 'qodo-merge-cli/index.md'
|
||||
- Installation: 'qodo-merge-cli/installation.md'
|
||||
- Usage: 'qodo-merge-cli/usage.md'
|
||||
#- Features & Usage: 'qodo-merge-cli/features.md'
|
||||
# - Troubleshooting: 'qodo-merge-cli/troubleshooting.md'
|
||||
- PR Benchmark:
|
||||
- PR Benchmark: 'pr_benchmark/index.md'
|
||||
- Recent Updates:
|
||||
- Recent Updates: 'recent_updates/index.md'
|
||||
- AI Docs Search: 'ai_search/index.md'
|
||||
|
||||
# - Code Fine-tuning Benchmark: 'finetuning_benchmark/index.md'
|
||||
|
||||
theme:
|
||||
|
|
|
|||
Loading…
Reference in a new issue