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

PlatformHosting
GitHubgithub.com, GitHub Enterprise (self-hosted)
GitLabgitlab.com, self-hosted GitLab
Bitbucketbitbucket.org, Bitbucket Server / Data Center
Azure DevOpsdev.azure.com, visualstudio.com

Auto-Detection

CodeAnt automatically detects your SCM platform, repository name, and default branch from your git remote:
# These are equivalent — auto-detection handles it
codeant pr list
codeant pr list --remote github --name owner/repo
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.
codeant pr list [options]
OptionDescription
--name <repo>Repository name (owner/repo) — auto-detected
--remote <provider>SCM platform: github, gitlab, bitbucket, azure — auto-detected
--default-branch <branch>Default branch name — auto-detected
--source-branch <branch>Filter by source branch (partial match)
--author <login>Filter by author (fuzzy match)
--state <state>open or closed (default: open)
--limit <n>Maximum results (default: 20, max: 100)
--offset <n>Pagination offset (default: 0)
Examples:
# List open PRs
codeant pr list

# List closed PRs by a specific author
codeant pr list --state closed --author johndoe

# Filter by source branch
codeant pr list --source-branch feature/

# Paginate results
codeant pr list --limit 10 --offset 20
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.
codeant pr get [options]
OptionDescription
--pr-number <n>PR number (required)
--name <repo>Repository name — auto-detected
--remote <provider>SCM platform — auto-detected
--default-branch <branch>Default branch — auto-detected
Example:
codeant pr get --pr-number 42
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.
codeant pr comments [options]
OptionDescription
--pr-number <n>PR number (required)
--name <repo>Repository name — auto-detected
--remote <provider>SCM platform — auto-detected
--default-branch <branch>Default branch — auto-detected
--codeant-generated <bool>Filter by CodeAnt authorship (true or false)
--addressedFilter by resolved/addressed status
--created-after <date>ISO 8601 date filter (e.g., 2026-01-01)
--created-before <date>ISO 8601 date filter
Examples:
# List all comments on PR #42
codeant pr comments --pr-number 42

# List only CodeAnt-generated comments
codeant pr comments --pr-number 42 --codeant-generated true

# List unresolved comments from the last week
codeant pr comments --pr-number 42 --addressed false --created-after 2026-03-13
Output: Returns JSON with both inline review comments and general issue comments, including reply relationships.

Code Review Management

code-review list

List code reviews with optional filtering.
codeant code-review list [options]
OptionDescription
--name <repo>Repository name — auto-detected
--remote <provider>SCM platform — auto-detected
--default-branch <branch>Default branch — auto-detected
--pr-number <n>Filter by PR number
--status <status>Filter by status: PENDING, COMPLETED, FAILED
--limit <n>Maximum results (default: 20)
--offset <n>Pagination offset (default: 0)
Examples:
# List all code reviews
codeant code-review list

# List reviews for a specific PR
codeant code-review list --pr-number 42

# List only completed reviews
codeant code-review list --status COMPLETED

code-review get

Get detailed information for a specific code review.
codeant code-review get [options]
OptionDescription
--pr-number <n>PR number (required)
--review-id <id>Code review ID (required)
--name <repo>Repository name — auto-detected
--remote <provider>SCM platform — auto-detected
Example:
codeant code-review get --pr-number 42 --review-id rev_abc123
Output: Returns JSON with review metadata, comments, and line-level feedback. Search across all CodeAnt comments in a repository.
codeant comments search [options]
OptionDescription
--query <term>Search term (required)
--name <repo>Repository name — auto-detected
--remote <provider>SCM platform — auto-detected
--limit <n>Maximum results (default: 10, max: 50)
--include-addressedInclude resolved/addressed comments (default: false)
--created-after <date>ISO 8601 date filter
Examples:
# Search for comments about SQL injection
codeant comments search --query "SQL injection"

# Include resolved comments, limit to 5
codeant comments search --query "authentication" --include-addressed --limit 5

# Search comments created after a specific date
codeant comments search --query "performance" --created-after 2026-01-01
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