Skip to content

code-review-server

Bun Client

Emacs Client

code-review-server is a service which runs highly configurable workflows to load code reviews which you are interested into easily managed customizable interfaces.

Documentation Sections

  • Clients: Information on using the bundled Web, TUI, and Emacs clients.
  • Command-Line Interface: Query the database directly without starting the RPC server using CLI flags.
  • Configuration: Detailed guide on codereviewserver.toml configuration, including workflows and general settings.
  • Filters: Learn how to filter PRs in your workflows with powerful query options.
  • Plugins: Extend the server's functionality with custom plugins or use the included AI-powered ones.
  • Reviewing Code: Learn about the fast, cached, and LSP-integrated review process.
  • JSON-RPC Protocol: The full specification of the JSON-RPC API used by clients.
  • Building Clients: Guide for developers wishing to create new clients for Code Review Server.

Quickstart

  1. Clone the repository

Repo

  1. Configure environment

    Create your config at ~/.config/codereviewserver.toml (see Configuration).

    export CRS_GITHUB_TOKEN="Github Token"  # Required.
    export GEMINI_API_KEY="Gemini Token"  # Only necessary for plugin use.
    

    Minimal ~/.config/codereviewserver.toml:

    Repos = ["owner/repo"]
    GithubUsername = "your-username"
    AutoWorktree = true
    
    [[Workflows]]
    WorkflowType = "SyncReviewRequestsWorkflow"
    Name = "My PRs"
    Filters = ["FilterMyPRs"]
    SectionTitle = "PRs to Review"
    
    [[Workflows]]
    WorkflowType = "SyncReviewRequestsWorkflow"
    Name = "PRs to Review"
    Filters = ["FilterNotDraft", "FilterMyReviewRequested"]
    SectionTitle = "PRs to Review"
    
    [[Plugins]]
    Name = "Summarize Diff"
    Command = "summarize_diff"
    IncludeDiff = true
    IncludeHeaders = true
    IncludeComments = true
    

  2. Install Server

    Alternatively, use Docker Compose to run steps 3 and 4 containerized with docker compose up.

    go install ./...
    

    This installs the server binary and included plugins to your $GOPATH/bin.

  3. Run a Client

    See Clients for detailed instructions on running the Web or Emacs clients.

    Web Client (Brief):

    cd bun_client
    bun install && bun run build
    bun start
    

    TUI Client (Brief):

    cargo install --path tui_client
    crs-tui
    

    Emacs Client (Brief): Evaluate client.el/crs-client.el and run (crs-start-server).