Skip to content

Chat & CLI mode

Alex Kollar edited this page Nov 11, 2026 · 10 revisions

Chat & CLI mode

Chat and CLI access

Chat is CLI-first. Type a system command — anything whose first word is a command this machine has — and it runs immediately, no model call, no waiting on Navi to orchestrate it: the raw terminal output lands in the thread as a terminal block and becomes context she reasons over, so you can list a folder and then ask her about a file the listing showed. Everything else goes to Navi as conversation, including plain-language requests like “show me the contents of /home/name/”, where she runs the command and answers with the actual output attached. Under the composer sit two mode toggles — CLI and Navi: press one once and it latches, so every line you send goes that way until you press the other; the pill beside them shows which way the current line will go, and clicking the pill flips the latch. A leading $ flips to a command, a leading > flips back to Navi — and either one re-latches the mode to match. Chips are untouched by the routing: they are her own purpose-built tools, run the same ways as ever.

Sending, and attaching files. There is no Send button — Enter sends, in every mode; beside the CLI | Navi toggle under the bar, plain words say so: Press enter to send. The whole composer — her chips on their slim shelf, the bar, the toggle row — sits in one dock at the foot of the chat, and the bar dresses for the latched mode: latched to CLI it takes the terminal green and command wording (Run a command — try: ls); latched to Navi it keeps her cyan. On a phone the dock's Call button is the phone glyph alone, so the bar keeps its room. The paperclip button beside the bar attaches a picture or a text file to this chat. The attachment stays in the thread where you uploaded it: a text file's contents ride with your next message as context she can reason over, and a picture is stored and referenced by name — her local model is text-only, so she does not see pictures, and nothing in the app claims she does. Every upload is also listed under Memory → Uploaded files, where you can find it later and delete it.

The composer works like a good shell: the line is colored as you type — the command word by whether the system knows it, flags, quoted strings, and paths each in their own color, the zsh-syntax-highlighting read — a dim ghost of the most recent matching command from this chat completes the line (Tab or → accepts it, in the zsh-autosuggestions way), and the command word autocompletes from what the system has installed, the same set that decides the CLI route. The terminal blocks in the thread keep the same coloring, so the history reads like a real shell session. Her replies render as markdown: code arrives as code blocks, not literal backticks. When navi.llamafile is disconnected, chat drops to a plain command line until you reconnect from the status column; chips still run in that mode. Conversations are saved as known chats — switch in Memory.

Chat gets faces (Build 7). Every message in the thread wears its author: a picture in the gutter — Navi's bundled portrait (her lamp-post key art) for her messages, your picture for yours — the author's name, and the time it was sent; older messages show the date too. Your picture is set in the Operator tab of Settings: upload one (it is trimmed to a square on this machine and carried in the settings backup), or mint an Operator Badge there and let chat wear the badge's face — until either exists, a picture generated from your name stands in. The call transcript in Settings → Voice reads the same way, faces, names, and times included. Her presence is frame chrome now (Build 8): one persistent bar above every view — her picture, her dot, her name, her living line — repainted from the same single presence source as the status column's own line, the bar itself never rebuilt as you move around the app. The status column has two doors, both wearing the panel glyph: the bar's pane button at its top right — restored in its original form, on every page — and on a phone the top bar's dock button too; the menu chrome's text toggle is retired. Toggling from any view raises the column, or the phone's dock, in place on the Status tab, and on a phone the top bar itself is fixed to the viewport, so the door is on screen at every scroll depth.

Her window. Apex opens in her own standalone window — the Tauri shell — and closing the window quits the app. There is no tray icon and no login autostart: she runs when you launch her from the application menu, and not before. Her window binary is verified, never assumed: installers stamp it with a hash of the shell sources, a failed rebuild retires the previous binary (navi-apex-shell.stale) instead of leaving it to be run, and the launchers refuse to run a binary the stamp doesn't cover — an older shell is a different app wearing this build's name.

Sudo mode

The status column's sudo switch makes Navi execute commands as root. Turning it on asks for your sudo password once; the bridge validates it by opening one persistent root shell that every sudo command runs inside, so a fingerprint-first PAM stack is consulted exactly once, at authentication. The password lives only in this page's memory — never saved, never logged — and turning sudo off closes the root shell on the spot.

Output cards — the thread folds itself

When the conversation moves on, the bulky parts of earlier exchanges fold into small cards so the thread stays readable: a terminal block folds into a card whose line shows the command in its colors, how it ended (like exit 0), and the first line of its output; a long reply from Navi — 500 characters or more, eight lines or more, or one containing a code block — folds into a card labeled Navi reply with its first line and its size. Click a card to open it and read the whole thing; click again to fold it. The card you are still in — everything from your last message onward — never folds. Folding is only about looks: nothing is deleted, the whole history stays in the thread and on disk, and Navi still sees the full output as her context, exactly as before. Clearing the chat clears the cards with it.

Your command shows once

A command you run shows exactly once in the thread: in your own line, in its colors. The terminal block under it carries the output only — no repeated command line inside the block. A small line under the block says how the command ended (like exit 0) when that is known.

Colors for commands

Command lines are colored the same way everywhere — while you type in the chat bar, in your sent line in the thread, and on a folded card: the command word is one color when the system knows it and another when it does not, and flags, quoted words, file paths, numbers, operators like |, and $VARIABLES each get their own. After a pipe, the next word is colored as a command again, because it is one. Every theme tunes these colors for its own surfaces, so they stay readable in all eleven themes. Ordinary sentences to Navi stay plain — only lines that read as commands get the colors.

The shell remembers — recall, search, completion, and shortcuts

Your command history is kept in one place, like a shell's history file: it survives switching chats, clearing a chat, and closing the page, and it holds up to 200 commands. With the suggestion list closed, press the Up arrow to walk back through commands you have run and the Down arrow to walk forward again — going past the newest brings back what you had typed. Press Ctrl+R to search the history: type some letters and the newest matching command shows; press Ctrl+R or the arrow keys to step through matches, Enter or Tab to put the match in the bar (it does not run yet), and Escape to cancel and get your typed line back. As you type a command, the list now completes more than the first word: file and folder paths complete from the real filesystem (a folder completes with a slash and opens its contents), known flags and subcommands for common commands like git and ls are offered, and arguments you have used with that command before are offered too, marked as used before. The editing shortcuts from the shell work as well: Ctrl+A and Ctrl+E jump to the start and end of the line, Ctrl+U cuts everything before the cursor, Ctrl+K cuts everything after it, Ctrl+W cuts the word before the cursor, and Ctrl+Y pastes back what a cut took. History shortcuts like !! (the last command), !$ (its last argument), and !3 (the third command in the history) never run silently: the first Enter rewrites the bar with the expanded command and asks you to check it — press Enter again to run exactly what you see.

Raw terminal work — Chat's CLI mode

There is no separate terminal view: Chat's CLI mode is the terminal. Press the composer's CLI toggle once and it latches — every line you send runs as a command and the raw output lands in the thread as a terminal block, with nothing of Navi in the loop until you press Navi (or start a line with >) to latch back. The same installed commands decide what counts as a command, the same autocomplete finishes the command word as you type, and the same sudo switch in the status column covers the commands you run this way.

Clone this wiki locally