• Get Review Board
  • What's New
  • Products
  • Review Board Code review, image review, and document review
  • Documentation
  • Release Notes
  • Power Pack Enterprise integrations, reports, and enhanced document review
  • Try for 60 Days
  • Purchase
  • RBCommons Review Board as a Service, hosted by us
  • Pricing
  • RBTools Command line tools and Python API for Review Board
  • Documentation
  • Release Notes
  • Review Bot Automated code review, connecting tools you already use
  • Documentation
  • Release Notes
  • RB Gateway Manage Git and Mercurial repositories in your network
  • Documentation
  • Release Notes
  • Learn and Explore
  • What is Code Review?
  • Documentation
  • Frequently Asked Questions
  • Support Options
  • Third-Party Integrations
  • Demo
  • Review Board RBTools Power Pack Review Bot Djblets RB Gateway
    1. RBTools 1.0
    2. Version 5.x
    3. Version 4.x
    4. Version 3.x
    5. Version 2.0
    6. Version 1.0
    7. Version 0.7
    8. Version 0.6
    9. Version 0.5
    10. rbt
    11. Configuration
    12. Per-User Configuration
  • Home
  • rbt
  • Configuration
  • Repository Configuration
  • Per-User Configuration
  • Team Foundation Server Configuration
  • Commands
  • alias
  • api-get
  • attach
  • clear-cache
  • close
  • diff
  • install
  • land
  • list-repo-types
  • login
  • logout
  • patch
  • post
  • publish
  • setup-completion
  • setup-repo
  • stamp
  • status
  • status-update
  • RBTools Python API
  • Overview of the Python API Client
  • Tutorial
  • Resource-Specific Functionality
  • RBTools Workflows
  • Using RBTools with Git
  • Glossary
  • General Index
  • Release Notes
  • This documentation covers RBTools 1.0. You can select a version above or view the latest documentation.

    Per-User Configuration¶

    There’s a lot of flexibility when it comes to the RBTools setup. You can provide your own defaults for nearly all RBTools command options, and can define custom aliases to improve your workflows.

    Like with repository configuration, these settings are stored in a .reviewboardrc file. These can go in the repository’s own version of the file, if these options should apply to all users by default. Otherwise, they can go in the .reviewboardrc in your home directory.

    On Linux and MacOS X, this file can be found in your home directory.

    On Windows, it’s in $USERPROFILE\Local Settings\Application Data.

    If you need to override repository-wide settings for yourself, you can set $RBTOOLS_CONFIG_PATH to a list of paths, separated by colons (Linux, Mac OS X) or semicolons (Windows). These paths are searched first for .reviewboardrc files.

    Custom Option Defaults¶

    Most options to RBTools commands allow for custom defaults. Each command has documentation on what to set to change the default.

    For instance, if you look at the post documentation, you’ll see that you can automatically open your browser when posting a review request by setting:

    OPEN_BROWSER = True
    

    Or, you can disable usage of your HTTP proxy on any command by setting:

    ENABLE_PROXY = False
    

    Check out the documentation for the different commands to see what you can do.

    Environment Variables¶

    You can set the following environment variables to customize the RBTools experience:

    RBTOOLS_CONFIG_PATH¶

    A list of paths to check for .reviewboardrc files. These paths will be checked before any other location.

    Each path should be separated using the native environment path separator on your platform (: on Linux/UNIX/macOS, ; on Windows).

    RBTOOLS_EDITOR¶
    VISUAL¶
    EDITOR¶

    These specify a text editor to use to edit commits or other content. The given editor is invoked when running commands like rbt land --edit or rbt patch --commit.

    We recommending using RBTOOLS_EDITOR, but any of the above environment variables are supported for compatibility purposes. They order of precedence is the order shown above.

    New in version 1.0.3: Added support for RBTOOLS_EDITOR.

    Aliases¶

    rbt can be configured to add command aliases. The ALIASES value in .reviewboardrc can be added to allow for command aliasing. It is a dictionary where the keys are the alias names and the value is the command that will be executed.

    Aliases will only be executed when an rbt command is executed that rbt does not recognize and when rbt-<commandname> does not exist in the path. Aliases are case-sensitive.

    For example, consider the following aliases:

    ALIASES = {
        'post-this': 'post HEAD',
        'push': '!git push && rbt close $1'
    }
    

    The following commands are equivalent:

    $ rbt post-this
    $ rbt post HEAD
    

    As are the following:

    $ rbt push 3351
    $ git push && rbt close 3351
    

    Types of Aliases¶

    There are two types of aliases: aliases for other rbt commands and system aliases.

    Aliases For Other rbt Commands¶

    These aliases allow short forms for frequently used rbt commands with parameter substitution. An alias of the form cmd is equivalent to calling rbt cmd. This will launch another instance of rbt and therefore can be used to reference other aliases or commands of the form rbt-<commandname>.

    System Command Aliases¶

    System aliases are aliases that begin with !. These aliases are more flexible because they are executed by the shell. However, since they are more powerful it is possible to write an alias that will destroy data. Everything after the ! will be passed to the shell for execution after going through parameter substitution.

    Positional Parameter Substitution¶

    Aliases in rbt supports inserting bash-like variables representing positional arguments into aliases. Positional variables take the form $1 (which corresponds to the first argument), $2 (which corresponds to the second argument), etc., and $* (which corresponds to all arguments).

    If a positional variable is specified and not enough arguments were specified, it will be replaced with an empty argument.

    If no parameter substitution is performed, all supplied arguments will be appended to the command when it is executed. Non-numeric variables are not replaced in the parameter and, if the alias is a system command alias, will be handled by the shell.

    Special Files¶

    Cookies¶

    The rbt command stores its login session in a cookies file called ~/.rbtools-cookies. To force RBTools to log in again, simply delete this file.

    If the file is missing, RBTools will check for a legacy ~/.post-review-cookies.txt file. This is for compatibility with the old post-review command.

    Cache Database¶

    The rbt command stores cached API request responses in a SQLite database in a cache directory. This is to reduce the time it takes to perform certain API requests.

    On MacOS X, this is in ~/Library/Caches/rbtools/apicache.db.

    On Linux, this is in ~/.cache/.rbtools/apicache.db.

    On Windows, this is in %APPDATA%\rbtools\rbtools\apicache.db.

    To delete the cache, either remove this file, or call rbt clear-cache.

    Keep up with the latest Review Board releases, security updates, and helpful information.

    About
    News
    Demo
    RBCommons Hosting
    Integrations
    Happy Users
    Support Options
    Documentation
    FAQ
    User Manual
    RBTools
    Administration Guide
    Power Pack
    Release Notes
    Downloads
    Review Board
    RBTools
    Djblets
    Power Pack
    Package Store
    PGP Signatures
    Contributing
    Bug Tracker
    Submit Patches
    Development Setup
    Wiki
    Follow Us
    Mailing Lists
    Reddit
    Twitter
    Mastodon
    Facebook
    YouTube

    Copyright © 2006-2025 Beanbag, Inc. All rights reserved.

    Terms of Service — Privacy Policy — AI Ethics Policy — Branding

    On this page

    • [Top]
    • Custom Option Defaults
    • Environment Variables
    • Aliases
      • Types of Aliases
        • Aliases For Other rbt Commands
        • System Command Aliases
      • Positional Parameter Substitution
    • Special Files
      • Cookies
      • Cache Database