p4 streamspec

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

Syntax conventions

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


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

This command brings up a form with the following 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.


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 Helix Core, 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.

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


the recommended character length of a display box for the field. If 0, a text box is assumed.


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


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).


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>


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


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 #


See Global options.



Read the stream template from the standard input. The user's editor is not invoked.


Write the stream template to the standard output. The user's editor is not invoked.


See Global options.

Usage Notes

Can File Arguments Use Revision Specifier? Can File Arguments Use Revision Range? Minimal Access Level Required




Related Commands

List streams

p4 streams

Create a stream p4 stream

Create stream depot

p4 depot