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

P4 CLI Documentation | 2026.1

# p4 streamspec

Edit the streams template to change, add, or remove spec fields for stream forms.

## Syntax

    p4 [g-opts] streamspec
    p4 [g-opts] streamspec -o
    p4 [g-opts] streamspec -i

Syntax and naming conventions

## Description

This format is used by p4 stream when streams are entered or updated, and by p4 streams when displaying a list of streams.

## Form fields

Field | Description
--- | ---
Fields: | A list of the fields maintained for each stream, one line per field. Each line has five words: code, name, data-type, len, and field-type.
code | a unique integer identifier for storing the data of the field. When adding a new field in 2019.2 or later, the administrator can enter its code by using the optional placeholder value NNN. If the administrator choses this option, the server will assign an appropriate value. Upon saving the streamspec, the next available code value in the 701-749 range will be automatically generated and saved. The values 701 through 712 are reserved for P4, so the effective range is currently 713-749. If the number of fields exhausts the range, new codes are assigned unique values greater than or equal to 10000. Alternatively, the administrator can specify a numeric value. When the administrator saves the spec, a message might indicate that the specified value is not available.
name | the name of the field for the stream.
data-type | indicates the format of the field: word: a single word (any value) date: a date/time field select: one of a set of words line: a one-liner text: a block of text
len | the recommended character length of a display box for the field. If 0, a text box is assumed.
field-type | indicates how to handle the setting of the field: optional: no default, and not required to be present default: default provided, but not required required: default provided, value must be present once: set once to the default and never changed always: always set to the default when saving the form
`Values:` | A list of select fields and the values that the fields can have. Each line has two words: the field name and the values list, with individual values separated by a forward slash / (no spaces).
Presets: | A list of fields and their default values, for fields whose setting flag is other than optional. Each line has two words: the field name and the default value. If the value has spaces, it must be enclosed in double quotes. The following special defaults are recognized: $user: the user entering the stream $now: the current date $blank: the words <enter description here>
Openable: | A list of versioning options when editing a stream spec. Each line has two words: the field name and the value. Values are: none: cannot be changed in a stream edit isolate: can be changed only in a stream edit propagate: can be changed in a stream edit or integ
`Comments:` | Text to be included at the top of each stream specification, to help the user fill out the form. Each line must begin with the comment character #
`g-opts` | See Global options.

## Options

Option | Description
--- | ---
`-i` | Read the stream template from the standard input. The user's editor is not invoked.
`-o` | Write the stream template to the standard output. The user's editor is not invoked.
`g-opts` | See Global options.

## Usage Notes

Can File Arguments Use Revision Specifier? | Can File Arguments Use Revision Range? | Minimal Access Level Required
--- | --- | ---
N/A | N/A | `admin`

## Related commands

List streams | `p4 streams`
Create a stream | `p4 stream`
Create stream depot | `p4 depot`

Your search for returned results