Documents
st doc hands a document an agent wrote to your phone, tablet and the web terminal — kept on the machine, read through your own link, edited from the app.
An agent writes a plan, a summary or release notes. st doc hands it to your
phone or tablet instead of leaving it in the scrollback.
st doc notes.md # a .md or .txt file, up to 1 MB
cat plan.md | st doc --title Plan # from a pipe
st doc ls # what this machine is keepingRun inside st's tmux, it records the session, window and pane it came from and the agent in that pane. The app gets a notification, "📄 Plan" from "work · claude", and the document is under the machine's Documents.
Folders
A machine's documents can go in folders (st 0.3.86 or later). A folder is not a directory on disk but a path each document carries (plans/2026), so older apps and st that know nothing of folders still see every document as before. Documents with no folder are at the top.
st doc notes.md --folder plans # into a folder
st doc ls --tree # as a tree of folders
st doc mv Plan plans/2026 # move ("/" is the top); --title renames too
st doc mkdir ideas # an empty folder
st doc mvdir ideas notes/ideas # rename or move a folder
st doc rmdir notes/ideas # remove an empty folderThe web terminal and the desktop app draw documents the way Obsidian does: [[title]] links and ![[title]] embeds, callouts (> [!note]), YAML properties at the top, #tags, ==highlights==, an outline and backlinks.
Tell your agent
Add this to your CLAUDE.md (or AGENTS.md):
## Documents for my devices
When you write a document meant for me to read (a plan, a summary, release
notes, a report), save it as a .md file and run `st doc <file>` so it reaches
my phone or tablet. Use `--title` for a short title. Do not use it for code
changes or logs.Or ask from the app
Quick prompts say it for you. They are in Compose, in the terminal's menu (••• on iPhone, ⋮ on Android) and on the prompt key in the agent row, and a tap sends one to the agent in that pane:
- Send to my phone as a doc: "Write that up as a Markdown document and
send it to my phone with
st doc(give it a short title)." - Plan as a doc: "Write the plan as a Markdown document and send it with
st doc." - Summary as a doc: "Summarize this session's work so far as a Markdown
document and send it with
st doc."
Each also tells the agent that st doc is a shell command on the machine and
how to run it (st doc <file> --title "...", or from a pipe). The Korean ones
are in the same list. To change the words first, hold one in the terminal's
menu on Android, or use Edit before sending on iPhone; Compose opens with
it. Add your own, reorder them or restore the defaults in Settings › Quick
prompts. They are kept on that device.
Storage
- On the machine, in
~/.sophonz/docs, for as long as you keep it. Nothing expires. Delete is how one goes, from the app or the web terminal, and it asks first. - What st keeps is a copy.
st doc notes.mdreadsnotes.mdonce; saving an edit from the app or the web terminal changes st's copy, nevernotes.md. - A file dropped in
~/.sophonz/outbox/is taken the same way. That is also wherest docleaves a document when st is not running; it goes out when st starts. - The text never goes through sophonz's servers. The app reads it through your machine's link, like the terminal. The notification carries the title only, encrypted to your device.
Folders and links
From st 0.3.86 the machine keeps documents in folders, and they link to each other as in Obsidian.
st doc plan.md --folder work/auth # into a folder (st doc add plan.md is the same)
st doc ls --tree # every folder and what is in it
st doc ls work # one folder
st doc mv Plan work/done # move one ("/" is the top); --title renames it
st doc mkdir ideas # a folder, kept while empty
st doc mvdir work/auth archive/auth # rename or move a folder with what is in it
st doc rmdir ideas # remove an empty folderst doc mv takes a document by its id, its title or folder/title. In the
text, [[Title]], [[folder/Title]] and [[Title#Heading|text]] link to
another document, and ![[Title]] shows one inside another.
In the app
- Documents under a machine: newest first. Open one to read it rendered or
as raw markdown, Copy all, share it as a
.mdfile, or Save on this device (it asks for a folder, the machine's own first). Save all to this device keeps every one at once. - The file is named
<session>-<agent>-<date>-<time>-<title>.md. - The first time you open the Documents tab, and the first time you open a
machine's Documents, a short guide walks through them: documents on this
device, a machine's documents and the two saves, how documents get here, and
using it with your agents (the
CLAUDE.mdparagraph and an example prompt such as "Write the plan for the auth migration as a .md file and send it to my phone with st doc", each with a copy button). The ? on those screens and on a document opens it again. An empty list shows how to send one. - Edit, then Save to computer (st 0.3.46 and later) to change the machine's copy, or Save on this device to keep your version in the app. If the machine's copy changed while you were editing, you choose Overwrite, Keep both (yours becomes a new document) or Cancel. While the machine is offline, Save to computer is off and says why.
- Send to Compose puts it in the box you type to a pane with, and Load in Compose brings a document (from the machine, the Documents tab or a file) into what you are writing.
- Delete takes it off the machine. Swipe a row on iPhone and iPad, or the bin on Android; both ask first. A copy you saved on the device or shared stays.
The Documents tab
The app's Documents tab holds only what you saved on that device, and it reads with no machine online: on a train, or with the computer asleep.
- Folders inside folders of plain
.mdfiles. On iPhone and iPad they are the files under Files › On My iPhone (or On My iPad) › sophonz, so Obsidian and other editors can open them; on Android they are in the app's storage and Export puts a copy inDownload/sophonz. - Search titles and text; sort by last changed, name or date written; make, rename, move and delete documents and folders.
- A file saved from a machine remembers which document it came from (beside the file, not in it). When the machine's copy is newer, it says work-mac has a newer version (with your machine's name): Update or Keep this one. Save to computer works from here too.
In the web terminal and the desktop app
In the desktop layout, Documents under the machine in the sidebar opens them; on a phone, docs in the bottom navigation. With st 0.3.86 and later it reads like an Obsidian vault:
- Folders as a tree on the left, with new, folder, upload and
a filter (Enter searches the text). Drag a document or a folder onto
another folder to move it; dropping a
.mdfile on the panel uploads it. - The document with its
[[links]](⌘- or Ctrl-click opens one beside it),![[embeds]], callouts, the properties at the top,#tagsand==highlights==. On the right: the outline, its tags, and what links here and from here. - Three modes per pane: Reading, Live (click a block to write it, Esc draws it again) and Source. ⌘E (Ctrl+E off a Mac) goes between reading and writing.
- Panes: split right (
⌘\) or down (⌥⌘\), Ctrl for ⌘ off a Mac; close one with ×. A document in two panes is one text. On a phone's width it is one pane. - Saving happens by itself a second after you stop typing. If the machine's copy changed meanwhile, a bar says so: Overwrite, Keep both or Take theirs.
- And copy, download, share, move, rename (double-click the title) and delete.
- Paths in the terminal (st 0.3.93 or later): ⌘-click (Ctrl-click off a Mac) a
Markdown file's path in the web terminal and it opens here as a document;
another file's path opens as text at the
:linewritten after it. It is not kept until you press Keep as document, which keeps a copy once. The desktop app opens a written.mdpath as a document the same way, in this machine's terminals and not on Windows.
What you save here reaches the apps too. The desktop app's Documents reads the same way from 0.1.31, on a machine with st 0.3.86 or later.
Sharing into a pane
From any app's share sheet, share text, a link or a .md/.txt file to
sophonz, pick machine › session › window › pane, and it opens in Compose on
that pane, not sent. A draft is kept per pane until you send it.