Helix Core is now P4. Product user interfaces will be updated soon. Learn more >>

P4 CLI Documentation | 2026.1

# Common options used in scripting and reporting

The command-line options described below enable you to specify settings on the command line and in scripts. To learn more, see Global options.

Option | Description
--- | ---
`-b batchsize` | Specify a batch size (number of arguments) to use when processing a command from `-x argfile`. By default, 128 arguments are read at a time.
`-c client_workspace` | Specifies the client workspace name.
`-G` | Causes all output (and batch input for form commands with `-i`) to be formatted as marshaled Python dictionary objects.
`-p `protocol`:`host`:`port`` | Specifies the host and port number of the P4 Server, as well as the protocol used to connect.
`-P password` | Specifies the user password if any. If you prefer your script to log in before running commands (instead of specifying the password every time a command is issued), use the `p4 login` command. For example:
    echo 'mypassword' | p4 login
`-s` | Prepends a descriptive field (for example, `text:`, `info:`, `error:`, `exit:`) to each line of output produced by a P4 Server command.
`-u user` | Specifies the P4 Server user name.
`-x argfile` | Reads arguments, one per line, from the specified file. If `argfile` is a single hyphen (`-`), then standard input is read.

Your search for returned results