# Command-Line Reference

    bazel [<startup options>] <command> [<args>]

## Option Syntax

Options can be passed to Bazel in different ways.

## Commands

`build` | Builds the specified targets.
`test` | Builds and runs the specified test targets.

## Startup Options

Options that appear before the command and are parsed by the client:
`--[no]batch` default: "false"

  If set, Bazel will be run as just a client process without a server.

  Tags: `loses_incremental_state`, `deprecated`

`--connect_timeout_secs=<an integer>` default: "30"

  The amount of time the client waits for each attempt to connect to the server

  Tags: `bazel_internal_configuration`

`--bazelrc=<path>` multiple uses are accumulated

  The location of the user .bazelrc file.

  Tags: `changes_inputs`

`--host_jvm_debug`

  Convenience option to add some additional JVM startup flags.

  Expands to:
  `--host_jvm_args=-agentlib:jdwp=transport=dt_socket,server=y,address=5005`

`--digest_function=<hash function>` default: see description

  The hash function to use when computing file digests.

  Tags: `loses_incremental_state`

`--io_nice_level={-1,0,1,2,3,4,5,6,7}` default: "-1"

  Only on Linux; set a level from 0-7 for best-effort IO scheduling.

  Tags: `host_machine_resource_optimizations`

## Options Common to all Commands

Verbosity options:
`--[no]verbose` default: "false"

  If true, enable verbose output.

  Tags: `affects_outputs`

## Build Options

Inherits all options from common_options.

Build-specific options:
`--jobs=<an integer>` [`-j`] default: "auto"

  The number of concurrent jobs to run. Takes an integer, or "auto".

  Tags: `execution`

### Option Effect Tags

`loses_incremental_state` | This option affects the incremental state.
`affects_outputs` | This option affects the outputs.

### Option Metadata Tags

`deprecated` | This option is deprecated.