# Web app

The app at [`/app`](/app) does what the CLI does, for the organization picked in
its top bar. Sign in with the same account as `o41-rrun login`; both act on the
same jobs, machines and settings.

| Page         | Does                                                                      | CLI                                              |
| ------------ | ------------------------------------------------------------------------- | ------------------------------------------------ |
| Jobs         | Jobs, newest first; a job's spec, events, telemetry and live logs; cancel | `ls`, `status`, `logs -f`, `telemetry`, `cancel` |
| Run          | Pick a folder, the machine, where it may run and the command, and run it  | `run`                                            |
| Offers       | What a machine would cost on every connected cloud account now            | `offers`                                         |
| Machines     | Cloud and reserved machines; register a server, turn it on or off, delete | `machines`, `register`, `on`, `off`, `rm`        |
| Clouds       | Connect, replace or remove accounts; switch GPU and CPU jobs per account  | `clouds`, `set`, `on`, `off`, `rm`               |
| Storage      | Where job logs go and for how long: rrun's bucket or your own             | `storage`, `storage set`, `storage rm`           |
| API keys     | Create (the secret is shown once), list and revoke                        | `api-keys`, `api-keys create`, `api-keys revoke` |
| Audit log    | Launches, job ends and every settings change, with who did it             | `audit`                                          |
| Organization | Its id, name, members and invitations                                     | `org`                                            |
| Account      | Your name, email addresses, sign-in methods and devices                   | `whoami`                                         |
| Feedback     | Send feedback or a bug report to the 041 team                             | `feedback`                                       |

The organization switcher is the app's `o41-rrun org use`. Creating an
organization and inviting members happen only in the app.

## Where they differ

The same actions, with what a browser can and cannot do:

- **Folders.** A browser cannot see the executable bit, so every file arrives as
  `0644`: run scripts as `sh train.sh`, or `chmod +x` them in the command.
  Symlinks arrive as the files they point to. The same folder therefore hashes
  differently from the web and from the CLI.
- **Env.** `--env K` without a value copies `K` from your shell; the app always
  needs the value typed in.
- **Following.** A job's page follows its logs from the last 1,000 lines and
  keeps up to 5,000 on screen, with "Load earlier" for older ones; the CLI's
  `logs --tail N` and `ls --limit N` have no exact controls. After Run the app
  opens the job's page, which is `run -f` without the exit code.
- **Telemetry.** The job's page charts telemetry over the last 1, 6 or 24 hours
  or the whole job, which is `telemetry --since 1h`, `6h`, `24h` or no
  `--since`; the CLI takes any duration and `--points`.

## When to use which

- The CLI packs the folder you are in, follows logs in your terminal and exits
  with the job's code, so it suits scripts, agents and long runs you watch from
  a shell.
- The app suits looking around: what is running, what it costs, what is idle,
  and a job's telemetry next to its logs.

Cloud credentials can also be pasted into the app, but `o41-rrun clouds set`
finds them in the usual environment variables and files, and the keyless Google
Cloud setup in [Clouds](https://rrun.041.io/docs/clouds.md#google-cloud) ends with a `clouds set`
command.

---

rrun by 041 documentation. Every page: https://rrun.041.io/llms.txt
