From 60948ac3c8dd372cf8d216ab73da61cad1ce7d13 Mon Sep 17 00:00:00 2001 From: "Hussam.lawen" Date: Mon, 15 Sep 2025 15:35:29 +0300 Subject: [PATCH] docs: add Qodo Merge CLI section to documentation navigation --- docs/docs/qodo-merge-cli/index.md | 35 ++++ docs/docs/qodo-merge-cli/installation.md | 90 ++++++++++ docs/docs/qodo-merge-cli/usage.md | 213 +++++++++++++++++++++++ docs/mkdocs.yml | 7 + 4 files changed, 345 insertions(+) create mode 100644 docs/docs/qodo-merge-cli/index.md create mode 100644 docs/docs/qodo-merge-cli/installation.md create mode 100644 docs/docs/qodo-merge-cli/usage.md diff --git a/docs/docs/qodo-merge-cli/index.md b/docs/docs/qodo-merge-cli/index.md new file mode 100644 index 00000000..ab52b61f --- /dev/null +++ b/docs/docs/qodo-merge-cli/index.md @@ -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. + +![Qodo Merge CLI Main Interface](https://www.qodo.ai/images/pr_agent/qm_cli_main_table_fix_all.png){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 suggestion 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.* \ No newline at end of file diff --git a/docs/docs/qodo-merge-cli/installation.md b/docs/docs/qodo-merge-cli/installation.md new file mode 100644 index 00000000..b4262efb --- /dev/null +++ b/docs/docs/qodo-merge-cli/installation.md @@ -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 dir, and can be reuused (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 # Create a new API key with the given name) + +[//]: # (qodo key revoke # 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. + +![GH Installation](https://www.qodo.ai/images/pr_agent/qm_cli_gh_install_prompt.png){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. + +![Fix All Mode](https://www.qodo.ai/images/pr_agent/qm_cli_main_table_fix_all.png){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`.* \ No newline at end of file diff --git a/docs/docs/qodo-merge-cli/usage.md b/docs/docs/qodo-merge-cli/usage.md new file mode 100644 index 00000000..b3392cd3 --- /dev/null +++ b/docs/docs/qodo-merge-cli/usage.md @@ -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. + +![Fix All Mode](https://www.qodo.ai/images/pr_agent/qm_cli_main_table_fix_all.png){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") + +[//]: # () +[//]: # ( ![Detail Panel](https://www.qodo.ai/images/pr_agent/qm_cli_tabl_detail_view.png){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`)" + + ![Unified Diff](https://www.qodo.ai/images/pr_agent/qm_cli_unified_diffview.png){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`)" + + ![Side by Side Diff](https://www.qodo.ai/images/pr_agent/qm_cli_side_by_side_diffview.png){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** + + ![Chat Interface](https://www.qodo.ai/images/pr_agent/qm_cli_suggestion_chat_pre_impl.png){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" + ![Main Table](https://www.qodo.ai/images/pr_agent/qm_cli_tabl_detail_view.png){width=768} + + **Direct individual implementation** + + 1. Navigate to any specific suggestion + 2. Press `Enter` to implement just that suggestion + + === "2. Multi-Select" + ![Multi-Selection](https://www.qodo.ai/images/pr_agent/qm_cli_multi_select.png){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" + ![Fix All Mode](https://www.qodo.ai/images/pr_agent/qm_cli_main_table_fix_all.png){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" + + ![Chat Interface](https://www.qodo.ai/images/pr_agent/qm_cli_suggestion_chat_pre_impl.png){width=768} + + **Discuss then implement** + + 1. Press C on any suggestion to start 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 + +![Next Actions](https://www.qodo.ai/images/pr_agent/qm_cli_impl_success_next_actions.png){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`)" + + ![Status Updates](https://www.qodo.ai/images/pr_agent/qm_cli_suggestion_status_update_add_v_sign.png){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`)" + + ![Continue Chat](https://www.qodo.ai/images/pr_agent/qm_cli_continue_chat.png){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`)" + + ![Commit Message](https://www.qodo.ai/images/pr_agent/qm_cli_commit_message.png){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.* \ No newline at end of file diff --git a/docs/mkdocs.yml b/docs/mkdocs.yml index 7c909df9..cf0afe88 100644 --- a/docs/mkdocs.yml +++ b/docs/mkdocs.yml @@ -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: