tria sort
tria sort is the everyday command: it reads what’s in the inbox, proposes a name and a folder for each document and only moves what you approve.
What it does
- Finds the documents in the inbox. Its subfolders are ignored, and anything still being copied waits until next time.
- Sets aside exact duplicates without calling the AI: the ones identical to something already in the archive.
- Pulls out the text on your Mac and sends it to the AI with your rules, your profile and the folder list.
- Shows you each proposal: the folder and the name, the confidence (high, medium or low), the reason and, if there is one, the doubt.
- Applies what you approve and tells you what it cost.
Anything Tria can’t decide or can’t read, like a password-protected PDF or a format it doesn’t know, stays in the inbox as pending, with the reason.
The review
In a terminal, tria sort opens a full-screen review. What --auto would apply comes checked from the start: high confidence and exact duplicates.
| Key | What it does |
|---|---|
| ↑ ↓ (or k j) | Move |
| Space | Check or uncheck |
| a | Keep only high confidence checked |
| e | Edit the folder and the name |
| p | Send a duplicate to the Trash |
| Return | Apply what’s checked |
| q or Esc | Quit without moving anything |
Pending documents are shown, but can’t be checked. In a window smaller than 60 × 12, the review goes card by card, with one-key questions: first “[t] apply all · [a] high confidence only · [r] review one by one · [n] nothing” and then, card by card, “[s] apply · [e] edit · [o] skip · [q] quit”.
Ctrl-C leaves the terminal as it was and doesn’t move anything you’re reviewing.
Editing, and learning from you
With e, Tria asks you for the folder and the name; press Return to keep what it proposed. If you change either one, it proposes a rule for TRIA.md when you apply, so it gets it right next time:
“Add this rule to TRIA.md? [a] add · [l] later (Return) · [d] discard”
Working out the rule spends a little from your key. Whatever you leave for later you’ll find with tria rules suggestions, and you add or discard it with --apply or --discard and its id.
Options
| Option | What it does |
|---|---|
--auto | Applies high confidence and exact duplicates without asking. |
--dry-run | Only proposes: doesn’t move anything. |
--json | JSON output, for scripts. |
--show-prompt | Prints exactly what’s sent to the AI provider. |
--no-cache | Rereads with the current model whatever had already been read. |
--root | The space’s folder, if you’re not inside it. |
Without --root, tria looks for TRIA.md in the current folder and the ones above it. With --auto, anything you’ve already undone once isn’t applied automatically again. More on --json in Scripts and --json.
The cache
What’s already been read is reused even if you switch provider or model, as long as TRIA.md and PERFIL.md don’t change. If you change the rules or the profile, whatever’s waiting in the inbox gets read again. Anything the provider rejected is sent again on every tria sort.
When it’s done
Tria tells you how many documents it moved, how many failed and the batch, with how to undo it: tria undo --last. If anything is left in the inbox, it says so at the end, and the exit code reflects it: see Commands.