| 1 |
# 6. The console |
| 2 |
|
| 3 |
`alloy` is the one program Alloy authors. It is a set of terminal views over |
| 4 |
the CLIs that already run the system, sharing one palette, one keymap, and one |
| 5 |
habit: every action shows the command it ran. |
| 6 |
|
| 7 |
That last part is the point. The console is not a layer over the system you |
| 8 |
have to learn instead of the system. It shows you `nmcli connection up 'Coffee |
| 9 |
Shop Wifi'` in a pane at the bottom of the screen, and the day you want to |
| 10 |
script that, you already know what to type. |
| 11 |
|
| 12 |
## The verbs |
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
| `alloy net` | Interfaces, connections, the wifi radio | |
| 17 |
| `alloy audio` | Streams, outputs and inputs, and which is routed where | |
| 18 |
| `alloy bluetooth` | Devices, and what state each one is actually in | |
| 19 |
| `alloy display` | Outputs sway is driving: scale, rotation, on or off | |
| 20 |
| `alloy mesh` | Mesh VPN peers, exit node, admin console (alias: `alloy tail`) | |
| 21 |
| `alloy sync` | Synchronized folders, devices, and pending invitations | |
| 22 |
| `alloy pkg` | What is installed and where it lives | |
| 23 |
| `alloy disk` | Attached storage: mount, unmount, eject | |
| 24 |
| `alloy update` | The booted image, the staged one, and rollback | |
| 25 |
| `alloy settings` | System settings and application configs | |
| 26 |
| `alloy config <path>` | One config file, opened directly | |
| 27 |
| `alloy setup` | The first-boot enrollment offer | |
| 28 |
| `alloy install` | The installer | |
| 29 |
| `alloy theme apply` | Put the day or night skeleton in place | |
| 30 |
| `alloy status --bar` | The status line, as JSON. Run by the bar, not by you | |
| 31 |
|
| 32 |
`alloy --help` lists them, and `alloy <verb> --help` covers the flags. |
| 33 |
|
| 34 |
## Settings |
| 35 |
|
| 36 |
`alloy settings` is two tabs over one form. |
| 37 |
|
| 38 |
**System** holds live state: timezone, network time, hostname, locale, keymap, |
| 39 |
and the theme. Rows here commit as you edit them, because setting a timezone is |
| 40 |
atomic on its own. Each writing row runs exactly one command, and each of those |
| 41 |
is narrowly granted so it does not prompt for a password. |
| 42 |
|
| 43 |
That grant is for the session sitting at the machine. Over ssh the same rows do |
| 44 |
prompt, and the console tears its screen down so polkit can ask in the terminal, |
| 45 |
then comes back where you were. |
| 46 |
|
| 47 |
The clock is shown and never settable. Moving a system clock invalidates |
| 48 |
certificates and reorders logs; the row is there so you can see what changing |
| 49 |
the timezone did. |
| 50 |
|
| 51 |
**Applications** holds config files, listed by the app they configure rather |
| 52 |
than by path. You pick `shop`, not `~/.config/shop/config.toml`. Editing here is |
| 53 |
schema-driven: fields carry types, ranges, allowed values, and their own help |
| 54 |
text, and the file keeps its comments and key order when it is written back. |
| 55 |
|
| 56 |
File-backed forms save with `Ctrl+S`. Live-state rows have nothing to save. |
| 57 |
|
| 58 |
Not every config gets a form. sway's is neither TOML nor KDL, so it opens as |
| 59 |
plain text instead: syntax-highlighted, with line numbers, saved with the same |
| 60 |
`Ctrl+S`. It is in the list for the same reason everything else is, because |
| 61 |
"where do I configure sway" should have an answer. |
| 62 |
|
| 63 |
The text pane is a fallback and not an editor. There is no undo and no search; |
| 64 |
the machine ships `helix` for that. Press Enter to start typing in it and Esc to |
| 65 |
stop, which keeps what you typed rather than throwing it away. A config the |
| 66 |
console could not parse opens the same way, with the parse error above it, so a |
| 67 |
file that is broken is still a file you can fix here. |
| 68 |
|
| 69 |
`alloy config <path>` opens one file's form directly, with no tabs and no app |
| 70 |
list. The path has to be one a schema names as its target; anything else is |
| 71 |
refused rather than opened as an empty form. |
| 72 |
|
| 73 |
## A row that says it cannot do something |
| 74 |
|
| 75 |
If a row is shown but not settable, and says why, that is deliberate. A tool |
| 76 |
that did not answer, or a vocabulary that came back empty, gets reported rather |
| 77 |
than hidden: hiding it would answer "where do I set this" with silence, and |
| 78 |
offering it would promise a command that is not there. |
| 79 |
|
| 80 |
## What the console will not do |
| 81 |
|
| 82 |
- **It does not browse or search a catalog.** `alloy pkg` shows what is |
| 83 |
installed, where it lives, and what each surface costs. It will not help you |
| 84 |
find software you have not named. |
| 85 |
- **It is not a systemd control panel.** `systemctl` is fine. |
| 86 |
- **It is not a launcher or a shell.** You invoke it for a task and close it. |
| 87 |
|
| 88 |
## Not built yet |
| 89 |
|
| 90 |
- `alloy theme <name>` for swapping the runtime theme without logging out. |
| 91 |
Today the theme is chosen in `alloy settings` and applied at the next login. |
| 92 |
- MagicDNS lookup and share/unshare in `alloy mesh`. |
| 93 |
- Multi-output mode picking in `alloy display`. Scale and enable work; the mode |
| 94 |
picker waits on a machine with two displays to test against. |
| 95 |
|