Reference/Command line
Command line
- The installed desktop program also has a small command-line interface. Run
tine --helpfor the current command list andtine --version(ortine version) for the exact build version.
Open Tine
tine open GRAPHopens a graph. The older shorthandtine GRAPHremains supported. If Tine is already running, the graph opens in a new window of that instance.tine captureopens Quick Capture. The oldertine --capturespelling remains supported, so existing desktop shortcuts keep working.tine --debugturns on the diagnostic log for that run, exactly likeTINE_DEBUG=1.
Publish a graph
tine export static GRAPH --output PARENTwrites the static HTML publication.tine export live GRAPH --output PARENTwrites the read-only Tine app and keeps the static HTML site as its no-JavaScript andfile://fallback.PARENTmust be an existing folder outside the graph, given as an absolute path. Tine creates one new child folder in it, named after the graph (or after--name), and refuses to replace an existing folder of that name.- Publication follows the graph's existing privacy settings: only pages with
public:: trueare included, unless:publishing/all-pages-public?is enabled. Add--all-pagesto override that selection for one export. - Example:
tine export live ~/notes --all-pages --output ~/Sites --name "My notes" - A live export opens on the configured home page when it is exported, then Welcome to Tine, then the first exported page. Use
--home "Page name"to choose explicitly; a home page that is not exported is refused.
Check a graph
tine doctor GRAPHreads and parses the graph, reports how many pages and journals it found and the configured home page, names every unreadable page and every page name claimed by more than one file, and does not change the graph. It exits with status 1 when it finds a problem.
Read your graph from a terminal
- On Linux, macOS and Windows, the read commands below do not change notes. They ask the graph's owner, so
tine page showandtine journalinclude unsaved edits when the app holds that page; other reads use the graph's indexed view. - Choose a graph with
--graph GRAPH(or-g GRAPH) on each command. Otherwise Tine usesTINE_GRAPH, then the nearest folder around your working directory that holdslogseq/config.edn. Example:tine page show "Project notes" --graph ~/notes. tine statusshows whether the app orserveowns the graph and what it is doing.tine page show "Page name"reads a page's outline.tine journalreads today;tine journal 2026-10-13reads a specific day that already exists.tine block show UUIDreads a block and its descendants using its persistedid::UUID.tine refs "Page name"shows linked references;tine refs UUID --blockfinds references to a persisted block id.tine search "meeting"searches page names and block text as the app does.--pages Nand--blocks Nset the result limits;0switches that category off.tine query '(task TODO)'runs the text inside a Logseq simple or advanced query macro.tine query "task = 'TODO'" --tqlruns the text inside a Tine query macro. Features/Queries explains the query forms and their supported scope; read diagnostics when a query cannot run whole.tine pageslists existing pages, including journals.tine pages --namespace Projectslimits it to that namespace and its descendants; aliases and names that only appear in references are not listed.
Write from a terminal (scripts and AI agents)
- These commands change notes, through the same guarded save the app uses. They are meant for scripts and AI agents working beside you; every block they create is marked with an
tine.author::property so you can see what an agent wrote. - A page read prints each block with a handle such as
2.1~k7f2ab: its position and a short fingerprint of its text. Name a block as"Page name/2.1~k7f2ab"exactly as printed, or by itsid::UUID. If the block has changed or moved since the read, the command refuses withstaleinstead of guessing; read the page again. tine add "text" --page "Page name"appends to a page, creating it if needed;--journalappends to today's journal and--journal=2026-10-13to that day.--under BLOCK,--after BLOCKand--before BLOCKplace the new blocks next to an existing one. The text can hold several blocks with-children;-reads it from standard input. New blocks gettine.author:: agent, or the name in--author NAMEorTINE_AUTHOR.tine edit BLOCK "new text"replaces a block's text; its children and properties stay, and a property you name in the new text replaces the old one.--author NAMEsets itstine.author::. To remove a property, usetine prop remove.tine prop set BLOCK key valueandtine prop remove BLOCK keychange one property.tine move BLOCK --under|--after|--before TARGETmoves a block with its children on the same page.tine delete BLOCKrefuses if it would leave block references elsewhere broken; nothing changed. Read the count, then pass--yes(or--force) to confirm the delete. Every successful reply includes the removed text, including children and properties, as a Markdown or Org fragment for recovery. Keep the reply: there is no CLI undo. Removed text is bounded to 65,536 UTF-8 bytes; a truncated reply says how many bytes were omitted and cannot restore the whole subtree.tine page create "Page name"creates an empty page and refuses an existing page or alias.tine page rename "Old name" "New name"uses the app's rename, rewriting references and namespace descendants; an existing destination refuses, so confirm merges in the app. A page'stitle::is its identity even when its filename differs. Open windows refresh the renamed page and its references.tine page delete "Page name" --yes(or--force) moves the page to graph trash and prints the count of broken page and block references. Without confirmation it refuses.--revguards deletion against the bytes you read.tine ref BLOCKprints((uuid));tine embed BLOCKprints{{embed ((uuid))}}. Both ensure a durable lazyid::first, as Copy block ref does, preserving the block's author. They print syntax to reuse; they do not insert a new block.- Page rename is graph-wide:
--revand--run(includingTINE_RUN) refuse before changing anything. Create, delete, ref and embed support runs. A rename error markeduncertainmeans inspect the graph before retrying. - With the app open: text you have typed on that page is saved first, so the command works on what you see, and an open window shows the change at once. If you keep typing on that block while the command runs, it refuses with
stalerather than overwrite you. - Comments are ordinary blocks:
tine add "My comment" --under BLOCKcreates a child; use the new handle it prints as COMMENT intine prop set COMMENT tine.quote "quoted words"to quote a passage of the parent with atine.quote::property. Optionaltine.quote-prefix::andtine.quote-suffix::properties hold surrounding words to distinguish repeated passages.--author NAMEonaddnames the author; a reply is another child without a quote. The same comment cards and margin display apply as for comments made in the app; see Features/Tips & shortcuts. - Add
--rev REV(aspage showprinted it) to write only if the page has not changed at all since that read. - A write prints
written PAGE rev REVand the handles of the blocks it created or changed, so a script can chain the next command.
Keep an agent's work in git (runs)
- If the graph folder is a git repository, an agent can group its writes into a run:
tine run beginchecks the repository and prints a run id. Every write made with--run ID(orTINE_RUN=ID) is committed right after it is saved, for that one file only, under the agent's name (--author NAMEorTINE_AUTHOR, elseagent). If the file had edits of yours that were not committed yet, they are committed first under your own git name, so your work never ends up inside the agent's commit. tine run show IDlists the run's commits.tine run end ID -m "summary"squashes them into one commit, but only when none of them is pushed, on another branch or tag, or mixed with other commits; otherwise the commits are left as they are and the reason is printed.tine run revert IDundoes the run's edits, newest first, as one change per page. A block you changed since the agent did keeps your text and is listed, so nothing of yours is lost.- A run never touches files it did not write. It refuses before writing when the repository is in the middle of a merge or rebase, HEAD is detached, or the page has a Git
filter,identorworking-tree-encodingattribute: committing its raw bytes could expose plaintext or bypass conversion. Tine never runs external filters. If a commit fails after a save, the write is kept and a warning says it was not committed. A branch checkout while the commit is preparing also produces that warning; Tine leaves both branches and the new branch's index alone.
Who owns the graph?
- When the app has the graph open, it answers these commands. With no app holding the graph, a read or write command automatically starts
tine serve GRAPHin the background. You can also run that command yourself in a terminal; it owns the graph without opening a window, takes a launch snapshot unless the newest backup zip is less than 6 hours old (see Reference/Files, external edits, and backups), and exits after 30 idle minutes. This keeps scripted edit/restart loops from filling the backup slots. A future-dated zip does not suppress a snapshot. - When you open that graph in the app,
servefinishes admitted work, stops and hands over ownership. The app shows Finishing the command line's work on this graph… while it waits. If the handover has not finished after 60 seconds, opening fails and namestine serve GRAPH --stop; the app does not take ownership on a timeout. Read commands retry through a busy handover for up to 30 seconds. tine serve GRAPH --stopasks the command-line owner to finish and exit. It cannot stop an app owner.- Windows supports the same read and write commands, automatic
tine servestartup, handover to the app andtine serve GRAPH --stop, using a private named pipe for your Windows account. Add the folder containingtine.exeto PATH, or run it by its full path. Quote graph paths with spaces, for exampletine page show "Project notes" --graph "C:\Users\me\My notes". A busy pipe waits for the owner; after a restart, Tine allows up to 3 seconds for the previous owner's pipe handles to close. An unsafe owner directory or persistently occupied pipe refuses withowner-unsafe(exit 5); the app can still open without a command endpoint. - Android and iOS have no command-line interface.
Output for people and scripts
- Read and write commands print text to stdout by default, with outline addresses such as
1.2for a second child. Add--jsonfor a single JSON result on stdout with schematine.cli/1, for exampletine pages --graph ~/notes --json. - Successful commands exit 0. Failed commands print errors to stderr;
--jsonmakes owner and connection errors a JSON error envelope there. Invalid usage exits 2, a missing or ambiguous page/block exits 3, a still-busy owner exits 4, endpoint/startup failures exit 5, astaleor refused write exits 6 and a write whose draft could not be saved exits 7 (in both cases nothing changed), and a write whose outcome is pending or unknown exits 8: read the page before retrying. Check the exit status and read any diagnostics or truncation notices before treating results as complete. - The command-line output contract documents JSON fields, limits, error codes and the full exit-code table.
Full reference
- Every command and subcommand has
--help, for exampletine export live --help. Linux.deband.rpmpackages also install the same generated reference forman tine.