Scroll to navigation

RECC(1) User Commands RECC(1)

NAME

recc - recc

DESCRIPTION

USAGE: recc <command>

If the given command is a compile command, runs it on a remote build server. Otherwise, runs it locally.

If the command is to be executed remotely, it must specify either a relative or absolute path to an executable.

The following environment variables can be used to change recc's behavior. To set them in a recc.conf file, omit the "RECC_" prefix.

RECC_SERVER - the URI of the server to use (e.g. http://localhost:8085)

RECC_CAS_SERVER - the URI of the CAS server to use (by default,

uses RECC_ACTION_CACHE_SERVER if set. Else RECC_SERVER)

RECC_ACTION_CACHE_SERVER - the URI of the Action Cache server to use (by default,

uses RECC_CAS_SERVER. Else RECC_SERVER)

RECC_INSTANCE - the instance name to pass to the server (defaults to "")

RECC_CAS_INSTANCE - the instance name to pass to the cas(by

default, uses RECC_ACTION_CACHE_INSTANCE if set. Else RECC_INSTANCE)

RECC_ACTION_CACHE_INSTANCE - the instance name to pass to the action

cache (by default, uses RECC_CAS_INSTANCE if set. Else RECC_INSTANCE)

RECC_USE_LOCALCAS - use the LocalCAS protocol to off-load hashing to buildbox-casd RECC_CACHE_ONLY - if set to any value, runs recc in cache-only mode. In

this mode, recc will build anything not available in the remote cache locally, rather than failing to build.

RECC_CACHE_UPLOAD_FAILED_BUILD - Upload action results regardless of the exit

This setting defaults to true. If set to false only successful action results(exit codes equal to zero) will be uploaded.

RECC_RUNNER_COMMAND - if set, run the specified command to invoke a

BuildBox runner for local execution.

RECC_PROJECT_ROOT - the top-level directory of the project source.

will be rewritten to relative paths (by default, uses the current working directory)

RECC_SERVER_AUTH_GOOGLEAPI - use default google authentication when

using an insecure connection

RECC_ACCESS_TOKEN_PATH - path specifying location of access token (JWT, OAuth, etc) to be attached to all secure connections.

Defaults to ""

RECC_LOG_LEVEL - logging verbosity level [optional, default = error, supported = trace/debug/info/warning/error] RECC_LOG_DIRECTORY - if set to a directory, output log messages to files in that location

RECC_LOG_STDERR_DIRECTORY - When set recc will log to both stderr and directory specified by RECC_LOG_DIRECTORY. If unset, recc will only log to the directory, if RECC_LOG_DIRECTORY is set. If RECC_LOG_DIRECTORY is not set, recc will log to stderr, irrespective of the value of RECC_LOG_DIRECTORY

RECC_LOG_PROGRESS - if set to any value, log additional progress info requires RECC_VERBOSE

RECC_VERBOSE - if set to any value, equivalent to RECC_LOG_LEVEL=debug

RECC_ENABLE_METRICS - if set to any value, enable metric collection

RECC_METRICS_TAG_[key] - tag added to all published metrics, using format specified by RECC_STATSD_FORMAT.

RECC_STATSD_FORMAT - if set to any value, the format used by statsd publisher, when tagging is set. Supports 'influx', 'graphite' and'dog'.

RECC_METRICS_FILE - write metrics to that file (Default/Empty string ??? stderr). Cannot be used with RECC_METRICS_UDP_SERVER.

RECC_METRICS_UDP_SERVER - write metrics to the specified host:UDP_Port.

Cannot be used with RECC_METRICS_FILE

RECC_COMPILATION_METADATA_UDP_PORT - if set, publish the higher-level compilation metadata to the specified localhost's UDP_Port.

RECC_VERIFY - if set to any value, invoke the command both locally and remotely for verification purposes. Output digests are compared and logged.

RECC_NO_PATH_REWRITE - if set to any value, do not rewrite absolute paths to be relative.

RECC_COMPILE_CACHE_ONLY - equivalent to RECC_CACHE_ONLY but only for compile commands RECC_COMPILE_REMOTE_PLATFORM_[key] - equivalent to RECC_REMOTE_PLATFORM but only for compile commands

RECC_LINK - if set to any value, use remote execution or remote caching

also for link commands

RECC_LINK_METRICS_ONLY - if set to any value, enable metric collection

caching

RECC_LINK_CACHE_ONLY - equivalent to RECC_CACHE_ONLY but only for link commands RECC_LINK_REMOTE_PLATFORM_[key] - equivalent to RECC_REMOTE_PLATFORM but only for link commands

RECC_FORCE_REMOTE - if set to any value, send all commands to the

executed locally, which can cause some builds to fail.)

RECC_ACTION_UNCACHEABLE - if set to any value, sets `do_not_cache`

never be cached

RECC_SKIP_CACHE - if set to any value, sets `skip_cache_lookup` flag

to re-run the build action instead of looking it up in the cache

RECC_DONT_SAVE_OUTPUT - if set to any value, prevent build output from

being saved to local disk

RECC_IGNORE_FAILURE_RESULT - if set to any value, ignore action

results in cache with non-zero exit code

RECC_DEPS_GLOBAL_PATHS - if set to any value, report all entries

they are absolute paths

RECC_DEPS_OVERRIDE - comma-separated list of files to send to the

determine this)

RECC_DEPS_DIRECTORY_OVERRIDE - directory to send to the build server

(if both this and RECC_DEPS_OVERRIDE
are set, this one is used)

RECC_OUTPUT_FILES_OVERRIDE - comma-separated list of files to

default, `deps` guesses)

RECC_OUTPUT_DIRECTORIES_OVERRIDE - comma-separated list of

default, `deps` guesses)

RECC_DEPS_EXCLUDE_PATHS - comma-separated list of paths to exclude from

the input root

RECC_DEPS_EXTRA_SYMLINKS - comma-separated list of paths to symlinks to

add to the input root

RECC_DEPS_ENV_[var] - sets [var] for local dependency detection

commands

RECC_COMPILATION_DATABASE - filename of compilation database to use

dependencies

RECC_PRESERVE_ENV - if set to any value, preserve all non-recc

environment variables in the remote

RECC_ENV_TO_READ - comma-separated list of specific environment

(can be used to preserve RECC_ variables, unlike RECC_PRESERVE_ENV)

RECC_REMOTE_ENV_[var] - sets [var] in the remote build environment

RECC_REMOTE_PLATFORM_[key] - specifies a platform property,

the build worker

RECC_RETRY_LIMIT - number of times to retry failed requests (default 0).

RECC_RETRY_DELAY - base delay (in ms) between retries

grows exponentially (default 1000ms)

RECC_REQUEST_TIMEOUT - how long to wait for gRPC request responses

in seconds. (default: no timeout))

RECC_MIN_THROUGHPUT - minimum throughput in bytes per second to extend

K, M, G or T. (default: no dynamic timeout)

RECC_KEEPALIVE_TIME - period for gRPC keepalive pings

in seconds. (default: no keepalive pings))

RECC_PREFIX_MAP - specify path mappings to replace. The source and destination must both be absolute paths. Supports multiple paths, separated by colon(:). Ex. RECC_PREFIX_MAP=/usr/bin=/usr/local/bin)

RECC_CAS_DIGEST_FUNCTION - specify what hash function to use to calculate digests.

(Default: "SHA256")
Supported values: SHA512, SHA384, SHA256, SHA1, MD5

RECC_WORKING_DIR_PREFIX - directory to prefix the command's working

directory, and input paths relative to it

RECC_MAX_THREADS - Allow some operations to utilize multiple cores.Default: 4

A value of -1 specifies use all available cores.

RECC_USE_JOBSERVER - Return job slot to GNU Make-compatible jobserver during remote execution, if available (disabled by default) RECC_REAPI_VERSION - Version of the Remote Execution API to use. (Default: "2.2")

Supported values: "2.1", "2.2"

RECC_PASSTHROUGH - If set, recc will execute the command locally without caching or remote execution irrespective of other configurations RECC_NO_EXECUTE - If set, only attempt to build an Action and calculate its digest,

without running the command

RECC_INVALID_INPUT_PATHS_REGEX - A comma-separated list of regex, if the command includes input paths that match with this regex, it will be executed locally without caching or remote execution RECC_FALLBACK_TO_LOCAL - If set, execute the command locally without

recc, if execution via recc fails
March 2026 recc version: 1.4.0