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.
link
Point this directory at a team, and optionally an application.
Usage
outplane link [APP]Arguments
| Argument | Type | Description |
|---|---|---|
APP | string | Application name or id. Omit to link the team only. |
Output
| Field | Type | Description |
|---|---|---|
path | string | The file that was written. |
teamSlug | string | |
teamId | string | |
appName | string | null | Null when only the team was linked. |
appId | string | null | |
changed | bool | False when the file already said this. |
Examples
Link this directory to the active team
outplane linkLink to a specific application
outplane link checkoutLink to an application in another team
outplane link checkout --team acmeLink and read what was written
outplane link --json --fields app,team,pathWhat 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 usebut loses to --team and to OUTPLANE_TOKEN. Runoutplane statusto 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:
| Exit | Kind | Meaning |
|---|---|---|
2 | usage | Invalid arguments, unknown flag, or client-side validation failure. |
3 | auth | Not authenticated, token revoked or expired, or forbidden for this team. |
5 | not_found | The named resource does not exist, or is not visible to this credential. |
8 | upstream | The 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.
unlink
Remove this directory's link.
Usage
outplane unlinkOutput
| Field | Type | Description |
|---|---|---|
removed | bool | |
path | string | null | The file that was deleted, if any. |
changed | bool |
Examples
Remove the link in effect here
outplane unlinkRemove the link and confirm it in a script
outplane unlink --json --fields path,removedRemove a link from another directory
outplane unlink --jsonWhat 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:
| Exit | Kind | Meaning |
|---|---|---|
2 | usage | Invalid arguments, unknown flag, or client-side validation failure. |