Skip to content
Lyncat Tria

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.

Reading spends from your key. Anything already read with the same rules and the same profile comes from the cache, at no cost.

What it does

  1. Finds the documents in the inbox. Its subfolders are ignored, and anything still being copied waits until next time.
  2. Sets aside exact duplicates without calling the AI: the ones identical to something already in the archive.
  3. Pulls out the text on your Mac and sends it to the AI with your rules, your profile and the folder list.
  4. Shows you each proposal: the folder and the name, the confidence (high, medium or low), the reason and, if there is one, the doubt.
  5. 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.

KeyWhat it does
↑ ↓ (or k j)Move
SpaceCheck or uncheck
aKeep only high confidence checked
eEdit the folder and the name
pSend a duplicate to the Trash
ReturnApply what’s checked
q or EscQuit 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

OptionWhat it does
--autoApplies high confidence and exact duplicates without asking.
--dry-runOnly proposes: doesn’t move anything.
--jsonJSON output, for scripts.
--show-promptPrints exactly what’s sent to the AI provider.
--no-cacheRereads with the current model whatever had already been read.
--rootThe 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.