Skip to main content
CodeAnt CLI provides a unified interface for managing pull requests, code reviews, and comments across all major SCM platforms. All PR commands auto-detect your SCM platform and repository from the git remote.

Supported Platforms

Auto-Detection

CodeAnt automatically detects your SCM platform, repository name, and default branch from your git remote:
How it works:
  1. Parses git remote get-url origin (supports both SSH and HTTPS URLs)
  2. Maps the host to a platform (e.g., github.comgithub)
  3. Extracts owner/repo from the URL path
  4. Detects the default branch from refs/remotes/origin/HEAD
For self-hosted instances, CodeAnt uses hostname heuristics (e.g., a host containing “gitlab” maps to GitLab). You can always override with --remote and --name flags.

Authentication

See Setup - SCM Platform Tokens for authentication configuration.

Pull Request Management

pr list

List pull requests (or merge requests) in the repository.
Examples:
Output: Returns JSON with PR number, title, state, author, source/target branches, and URLs.

pr get

Get detailed information about a specific pull request, including review analysis data.
Example:
Output: Returns JSON with PR details including additions, deletions, changed files, and review summary.

pr comments

List all comments on a pull request with optional filtering.
Examples:
Output: Returns JSON with both inline review comments and general issue comments, including reply relationships.

pr resolve

Resolve a comment thread or conversation on a pull request.
The ID type to use depends on your platform: Example:

Code Review Management

code-review list

List code reviews with optional filtering.
Examples:

code-review get

Get detailed information for a specific code review.
Example:
Output: Returns JSON with review metadata, comments, and line-level feedback. Search across all CodeAnt comments in a repository.
Examples:
Output: Returns JSON with matching comments. Search is case-insensitive and searches comment bodies by default. Only CodeAnt-authored comments are included.

Platform-Specific Notes

GitHub

  • Uses the Octokit SDK under the hood
  • Aggregates both review comments (inline) and issue comments
  • Supports GitHub Enterprise with custom API URLs

GitLab

  • Uses the GitBeaker SDK
  • Works with merge request and approval APIs
  • Supports self-hosted instances

Bitbucket

  • Uses the Bitbucket SDK
  • Supports both Cloud and Server/Data Center deployments
  • Adapts PR/MR terminology automatically

Azure DevOps

  • Uses the Azure DevOps Node API SDK
  • Works with organization/project/repository structure
  • Supports both dev.azure.com and visualstudio.com URLs