# upstream

> Every coline upstream command, with its flags and the action it runs.

Source: https://docs.coline.app/cli/reference/upstream

{/* Generated by apps/docs/scripts/cli-reference.ts from coline's command tree and the cli action catalog. Don't edit it: run `pnpm --filter @colineapp/docs cli:reference`. */}

Every `coline upstream` command, 3 in all.

## upstream

Runs `upstream`, Upstream's own command line, with the arguments as given: `coline upstream repo list` is `upstream repo list`. When it isn't installed, coline prints the command that installs it. `coline upstream --help` is upstream's own help.

`coline upstream login` and `coline upstream logout` are coline's own: they sign upstream in as you without a browser, and out again, ending the session.

```text
coline upstream <upstream command…>
coline upstream <command> [flags]
```

**Built into coline.** It isn't one action: what it does is above.

Sub-commands: `login`, `logout`. The word right after `coline upstream` picks one when it names one.

```bash
coline upstream repo list
coline upstream cr view 42
coline upstream login
coline upstream logout
```

## upstream login

Signs in `upstream` as the person this command line is signed in as, without a browser: Coline makes an Upstream command-line session for you, named for this machine, and it is kept where `upstream` reads it, with Git's credential helper set up by `upstream auth setup-git`. `coline auth login` does this too, unless --no-upstream.

The session lasts 30 days and shows in Upstream's list of command-line sessions, where you can end it; `coline upstream logout` and `coline auth logout` end it. upstream signed in as someone else, or UPSTREAM\_TOKEN, is left as it is. It needs a full sign-in, not --read-only or --scope. Its token is never printed.

```text
coline upstream login [flags]
```

**Built into coline.** · **Calls** `upstream.sessions.create` · **Effect** write · **Can wait for your approval** no

| Flag      | What it does                                                       |
| --------- | ------------------------------------------------------------------ |
| `--force` | Make a new session even when upstream is already signed in as you. |

```bash
coline upstream login
coline upstream login --force --json
```

## upstream logout

Ends the Upstream command-line session coline made for `upstream` on this profile, so it stops working everywhere, then signs `upstream` out of it here, as `upstream auth logout` does. Your coline sign-in stays.

Offline, upstream is still signed out here, and the session may still be listed in Upstream until it expires; the output links to that list. A session upstream made by itself is left as it is: `upstream auth logout` signs that out. A read-only sign-in may end its own sessions too.

```text
coline upstream logout [flags]
```

**Built into coline.** · **Calls** `upstream.sessions.end` · **Effect** write · **Can wait for your approval** no

```bash
coline upstream logout
coline upstream logout --json
```
