Out Plane

link

The link commands.

Linking writes a small file in the current directory that says which team, and optionally which application, commands here act on. After it, the application argument becomes optional in most commands.

A link is a convenience for a working copy, not a configuration for a pipeline. It loses to --team and to OUTPLANE_TOKEN, and outplane status says which one is winning.

Point this directory at a team, and optionally an application.

writesrepeatable

Usage

outplane link [APP]

Arguments

ArgumentTypeDescription
APPstringApplication name or id. Omit to link the team only.

Output

FieldTypeDescription
pathstringThe file that was written.
teamSlugstring
teamIdstring
appNamestring | nullNull when only the team was linked.
appIdstring | null
changedboolFalse when the file already said this.

Examples

Link this directory to the active team

outplane link

Link to a specific application

outplane link checkout

Link to an application in another team

outplane link checkout --team acme

Link and read what was written

outplane link --json --fields app,team,path

What to Know

  • The link is written in the current directory. A link already present in a parent directory is not edited; the new one shadows it for this subtree.
  • A link outranks outplane team use but loses to --team and to OUTPLANE_TOKEN. Run outplane status to see which one is winning.
  • In CI, do not link. Set OUTPLANE_TOKEN, which names its own team and outranks any link a checkout happens to contain.
  • An application reference is matched exactly against id, then name, then display name. There is no fuzzy matching, and a display name shared by two applications is an error rather than a guess.

Errors

Beyond 0 for success, this command exits with:

ExitKindMeaning
2usageInvalid arguments, unknown flag, or client-side validation failure.
3authNot authenticated, token revoked or expired, or forbidden for this team.
5not_foundThe named resource does not exist, or is not visible to this credential.
8upstreamThe Out Plane API returned a server error.

The code on the error object is one of app.not_found, app.ambiguous, auth.not_authenticated, link.unreadable. Branch on that, or on the exit status. The message is prose and changes.

Remove this directory's link.

writesrepeatableno sign-in

Usage

outplane unlink

Output

FieldTypeDescription
removedbool
pathstring | nullThe file that was deleted, if any.
changedbool

Examples

Remove the link in effect here

outplane unlink

Remove the link and confirm it in a script

outplane unlink --json --fields path,removed

Remove a link from another directory

outplane unlink --json

What to Know

  • Removing nothing is a success, not an error, so a teardown script can run this unconditionally. changed says whether a file was actually deleted.
  • A link file that cannot be parsed is removed rather than refused. Repairing that is what this command is for, and while it exists every command needing a team fails with link.unreadable.
  • The file removed is the one in effect, which may sit in a parent directory. Read path in the result to see what was actually deleted.
  • The empty .outplane directory is removed too, so nothing is left behind for somebody to commit by accident.

Errors

Beyond 0 for success, this command exits with:

ExitKindMeaning
2usageInvalid arguments, unknown flag, or client-side validation failure.

On this page