AtlatestRepositoryfolio
1
# Folio3
A markdown-native knowledge and project management system, exposed as an MCP server. Folio stores all state as structured markdown files — human-readable, git-committable, and programmatically queryable.5
Built with [Sigil](https://codeberg.org/sigil/sigil).7
## Install9
```bash10
sigil app install codeberg:sigil/folio \11
--mcp \12
--env FOLIO_ROOT=~/folio13
```15
This installs the `folio` binary, registers it as a user-level MCP server, and points it at `~/folio` as the data directory. The folio directory will be created on first run.17
To install for a specific project instead (registers in the project's `.mcp.json`):19
```bash20
cd ~/my-project21
sigil app install codeberg:sigil/folio \22
--mcp \23
--mcp-scope project \24
--env FOLIO_ROOT=./folio25
```27
Or add to `.mcp.json` manually:29
```json30
{31
"mcpServers": {32
"folio": {33
"command": "folio",34
"env": {35
"FOLIO_ROOT": "./folio"36
}37
}38
}39
}40
```42
## What it does44
Folio gives AI agents structured access to tasks, projects, and notes through MCP tools. The agent gets clean operations; you get readable markdown files with clean git diffs.46
### Tasks48
Checkbox items with inline metadata:50
```markdown51
- [ ] Add contact lookup tool {id: t-a3f2, priority: high, due: 2026-03-20}52
- [x] Fix reply identity selection {id: t-b1c4, completed: 2026-03-13}53
```55
### Projects57
One markdown file per project in `projects/`, with YAML frontmatter, a task list, and a reverse-chronological log:59
```markdown60
---61
status: active62
goal: Add contact management and improve search63
area: development64
last-updated: 2026-03-1365
---67
# Bureau v269
## Tasks71
- [ ] Add contact lookup tool {id: t-a3f2, priority: high, due: 2026-03-20}72
- [ ] Improve search result ranking {id: t-b1c4, priority: medium}74
## Log76
### 2026-03-1378
Fixed identity selection for replies. Bureau now auto-detects the79
correct sending identity from the original email's To field.80
```82
### Notes84
Atomic reference notes in `notes/` with `[[crosslinks]]` between them:86
```markdown87
---88
tags:89
- fastmail90
- jmap91
created: 2026-03-1292
last-updated: 2026-03-1393
---95
# Fastmail JMAP Quirks97
Fastmail rejects the `#draft` back-reference key in `onSuccessUpdateEmail`.99
## Related101
- [[caldav-discovery]] - CalDAV has similar redirect issues102
- [[bureau-send-pipeline]] - Where these quirks manifest103
```105
Notes support subdirectories for organization: `procedures/`, `contacts/`, `preferences/`, etc. Crosslinks resolve across both notes and projects.107
### Inbox109
A single `inbox.md` for capturing items before they're triaged into projects.111
## Directory structure113
```114
folio/115
├── inbox.md116
├── projects/117
│ ├── bureau-v2.md118
│ └── sigil-gc.md119
├── notes/120
│ ├── fastmail-jmap-quirks.md121
│ ├── procedures/122
│ │ └── email-triage.md123
│ └── contacts/124
│ └── alice.md125
└── archive/126
├── projects/127
└── notes/128
```130
## MCP Tools132
### Overview134
| Tool | Description |135
|------|-------------|136
| `folio/status` | Dashboard: inbox count, overdue tasks, stale projects, orphaned notes |138
### Tasks140
| Tool | Description |141
|------|-------------|142
| `folio/tasks` | Query tasks across all projects and inbox with filters |143
| `folio/task-add` | Add a task to a project or inbox |144
| `folio/task-complete` | Mark a task as done |145
| `folio/task-update` | Update task metadata (priority, due, tags, waiting) |146
| `folio/task-move` | Move a task between projects or to inbox |148
A task's id is stable: moving it between the inbox and a project, or between149
projects, preserves the id it already had.151
### Bulk operations153
Triaging a full inbox one call at a time is slow enough that nobody does it154
routinely, which is how an inbox goes months without being triaged.156
| Tool | Description |157
|------|-------------|158
| `folio/task-move-batch` | Move many tasks at once, with a result line per id |159
| `folio/task-complete-batch` | Mark many tasks done by id list |160
| `folio/task-sweep` | Remove completed tasks from projects |161
| `folio/inbox-sweep` | Remove completed items from the inbox |163
`folio/task-move-batch` takes either one shared target or per-id targets, so a164
single call can fan out across many projects:166
```json167
{"ids": ["t-a3f2", "t-b1c4"], "project": "bureau-v2"}169
{"moves": [{"id": "t-a3f2", "project": "bureau-v2"},170
{"id": "t-b1c4", "project": "sigil-gc"},171
{"id": "t-c5d6"}]}172
```174
An entry with no `project` moves that task to the inbox. Every id gets its own175
result line, so a partial failure is visible rather than swallowed.177
### Inbox179
| Tool | Description |180
|------|-------------|181
| `folio/inbox` | List all inbox items |182
| `folio/inbox-add` | Add an item to the inbox |183
| `folio/inbox-triage` | Move an inbox item to a project |185
> **Keep inbox captures to a single line.** An item whose text contains186
> newlines is currently written in a shape folio cannot read back: the187
> `{id: ...}` metadata lands on the item's last line, the parser sees only the188
> first, and the item becomes invisible to every tool while a phantom189
> one-line duplicate takes its place. For anything longer, create a note and190
> reference it from a one-line inbox item. See the Known issues section of191
> CHANGELOG.md.193
### Projects195
| Tool | Description |196
|------|-------------|197
| `folio/projects` | List projects with task counts |198
| `folio/project-info` | Full project details: tasks and log entries |199
| `folio/project-create` | Create a new project |200
| `folio/project-log` | Add a dated log entry to a project |201
| `folio/project-archive` | Archive a completed project |202
| `folio/project-clean` | Move completed tasks to the project log |204
### Notes206
| Tool | Description |207
|------|-------------|208
| `folio/notes` | Search notes by text or tag |209
| `folio/note-read` | Read a note's full content |210
| `folio/note-create` | Create a new note |211
| `folio/note-edit` | Replace a note's content |212
| `folio/note-links` | Show outgoing links and backlinks |213
| `folio/note-rename` | Rename a note and update all crosslinks |215
## Development217
Requires [Sigil](https://codeberg.org/sigil/sigil) v0.9.0+.219
```bash220
# Install dependencies221
sigil deps install223
# Build224
sigil build226
# Test227
sigil test229
# Run locally230
FOLIO_ROOT=/tmp/folio ./build/dev/bin/folio232
# Build release bundle (standalone binary)233
sigil build --config release234
FOLIO_ROOT=/tmp/folio ./build/release/bin/folio235
```237
## License239
BSD-3-Clause