Menu da documentação

Documentação

Docs and Sheets

Document and spreadsheet editing, agent-drivable.

Nesta página

Overview

TDE Docs and TDE Sheets are the office pair: a document editor that speaks Markdown and Word, and a spreadsheet that speaks Excel. Both are mouse-first — a toolbar you click, a caret you place — and both can be driven headlessly by an agent through structured commands, so a report or a model can be produced without anyone screen-scraping a TUI.

TDE Docs

A document in TDE Docs is a line-oriented Markdown buffer. Each line has a kind — body text, a heading from level 1 to 6, a bullet, a numbered item, or a quote — and an alignment. Inside a line you get bold, italic, underline, strikethrough, inline code and six text colours.

Alignment is preserved through an HTML comment marker, so a centred line stays centred when you reopen the .md.

Toolbar

Eighteen chips, in three groups: New · Open · Save, then H1 · H2 · H3 · Bullet · Numbered · Quote · Align left · Align centre · Align right, then Bold · Italic · Underline · Strike · Code · Colour. Everything the keyboard can do, plus Quote and the three alignments, which have no shortcut.

Keys

KeyAction
Ctrl+S / Ctrl+OSave (prompts for a name if the file is new) / open
Ctrl+ASelect all
Ctrl+B / Ctrl+I / Ctrl+UBold / italic / underline
Ctrl+D / Ctrl+EStrikethrough / inline code
Ctrl+KText colour picker
Ctrl+L / Ctrl+NToggle bullet list / numbered list
Ctrl+1 / Ctrl+2 / Ctrl+3Toggle heading 1 / 2 / 3
Ctrl+← / Ctrl+→Move by word
Arrows, Home, End, PageUp, PageDownMove the caret; hold Shift to select
EscClose the window

Pressing at the top of the document moves focus into the toolbar, where and walk the chips, Enter runs one and or Esc drops back into the text.

With the mouse: click to place the caret, drag to select, click a chip to apply it, wheel to scroll.

Saving

ExtensionResult
.docxA real Word document
.md, .markdown, .txt, no extensionMarkdown
Anything elseRefused

.docx also opens: TDE Docs recovers heading levels, bullets, quotes and inline bold/italic/underline/strike from the run properties. A save-as with a bare filename lands in ~/Documents when that directory exists, otherwise in your home directory.

Driving it from an agent

The tde-docs skill ships with TDE and gives an agent a structured way to write a document instead of typing into it.

bash
ID=$(tde agent windows | awk -F '\t' '$2=="TDE Docs"{print $1}')
tde agent docs $ID new
tde agent docs $ID set 1 "# Weekly report"
tde agent docs $ID append "Everything shipped on Thursday."
tde agent docs $ID get 1
tde agent docs $ID dump
tde agent docs $ID save ~/Documents/weekly.docx

set overwrites a 1-based line, append adds one at the end, get returns a single line as Markdown, dump returns the whole document, and save picks the format from the extension.

TDE Sheets

A workbook with multiple sheets, a formula engine, and a tab strip along the bottom. It is built for the case where the numbers matter and the styling does not.

Formulas

Five functions are implemented, under six names:

FunctionNotes
SUM(...)
AVG(...), AVERAGE(...)The same function
MIN(...)
MAX(...)
COUNT(...)

Names are case-insensitive; anything else returns #NAME?.

Around them you get the arithmetic operators + - * / ^ (power is right-associative), unary sign, parentheses, comma-separated arguments, A1:B4 ranges, and cross-sheet references — Sheet1!A1, or 'My Sheet'!B3 when the sheet name has spaces. TRUE and FALSE are literals.

Errors surface in the cell: #DIV/0!, #NAME?, #REF!, #VALUE!, #NUM!, #SYNTAX!, #PAREN! and #CYCLE! for a circular reference.

Keys

KeyAction
Ctrl+S / Ctrl+OSave / open
ArrowsMove the selection
Home / EndFirst column / last used column
PageUp / PageDownMove a page of rows
Enter, Space, F2Edit the selected cell
Delete, BackspaceClear the cell
Any printable characterStart overwriting the cell
Ctrl+PageUp / Ctrl+PageDownPrevious / next sheet
TabMove focus from the grid to the sheet tabs
Shift+TabMove focus from the grid to the toolbar

While editing a cell, Enter commits and moves down, Tab commits and moves right, Esc cancels. On the sheet tab bar, Enter switches sheet, F2 renames and Delete removes one; double-clicking a tab also starts a rename.

File formats

TDE Sheets reads .xlsx, .xls, .ods, .csv and .tsv, recovering formulas from the workbook where they exist. It writes .xlsx only — a save-as with any other extension is coerced to .xlsx.

There is no cell formatting in the app — no bold, no colours, no number formats, no column widths. The toolbar is New, Open and Save.

Driving it from an agent

The tde-sheets skill gives an agent cell-level access:

bash
ID=$(tde agent windows | awk -F '\t' '$2=="TDE Sheets"{print $1}')
tde agent sheets $ID new
tde agent sheets $ID set A1 Revenue
tde agent sheets $ID set B1 1200
tde agent sheets $ID set B5 "=SUM(B1:B4)"
tde agent sheets $ID get B5
tde agent sheets $ID dump
tde agent sheets $ID save ~/Documents/model.xlsx

get and dump return evaluated values, not the formula text, so an agent can check its own arithmetic. Both skills, and the rest of the structured app commands, are described in the agent API.