Knowledge / Office / Research Matrix (S2 — v2 capability-based)
Scenario S2. Strongest coverage in the current ecosystem: search, reference management, notes, synthesis, documents, and diagrams all have first-party harnesses; Python/native fallbacks fill the rest.
Schema: docs/cli-matrix/matrix_registry.schema.md. Matrix plan: docs/cli-matrix/cli-matrix-plan.md.
Install
cli-hub matrix install knowledge-research
cli-hub matrix info knowledge-research
cli-hub matrix preflight knowledge-research --json
Provider selection constraints
- Use preflight as an availability report, not as a provider selector.
- Treat provider order as documentation order only.
- Choose from user requirements, output quality bar, offline needs, credential state, install cost, and provider notes.
- Escalate to paid or metered APIs only when credentials are already present or the user explicitly consents.
Offline context? Filter to offline: true providers.
Preflight
Run cli-hub matrix preflight knowledge-research --json first. Use the manual block below for extra probes or older cli-hub versions.
cli-hub list --json
python - <<'PY'
import importlib.util
for m in ("pyzotero","bibtexparser","trafilatura","readability","httpx","playwright",
"python_docx","openpyxl","pptx","reportlab","pypdf","pdfplumber","weasyprint",
"langchain","llama_index","haystack"):
print(m, importlib.util.find_spec(m) is not None)
PY
for b in pandoc qpdf pdftk exiftool latexmk tex dot mermaid plantuml hugo mkdocs jekyll; do
command -v "$b" >/dev/null && echo "$b: yes" || echo "$b: no"
done
for e in OPENAI_API_KEY ANTHROPIC_API_KEY GOOGLE_API_KEY PERPLEXITY_API_KEY TAVILY_API_KEY \
SERPAPI_API_KEY BRAVE_API_KEY FIRECRAWL_API_KEY \
NOTION_API_KEY SEMANTIC_SCHOLAR_API_KEY WORDPRESS_TOKEN GHOST_ADMIN_KEY; do
[ -n "${!e}" ] && echo "$e: set" || echo "$e: unset"
done
Suggest-to-user template
To enable <capability> via <provider>, please set <ENV_VAR>.
Cost: <cost notes>
Quality: <quality tier>
Reply 'skip' to fall back to <next provider>.
Example: To enable live Notion sync via the Notion API, please set NOTION_API_KEY. Cost: free tier suffices for most users. Quality: sota (round-trips block/page IDs). Reply 'skip' to fall back to local Obsidian vault + manual paste.
Capabilities
research.search — web / literature search
| Provider |
Kind |
Requires |
Cost |
Quality |
Offline |
cli-anything-exa |
harness-cli |
EXA_API_KEY |
metered |
sota |
no |
cli-anything-browser / safari / clibrowser |
harness-cli |
browser installed |
free |
high |
no |
duckduckgo-search |
python |
pkg |
free |
good |
no |
googlesearch-python |
python |
pkg |
free |
good |
no |
| Perplexity API |
api |
PERPLEXITY_API_KEY |
paid |
sota |
no |
| Tavily |
api |
TAVILY_API_KEY |
metered |
high |
no |
| Brave Search |
api |
BRAVE_API_KEY |
metered |
good |
no |
| Google Custom Search |
api |
GOOGLE_API_KEY |
metered |
high |
no |
research.retrieve — fetch article text / scrape pages
| Provider |
Kind |
Requires |
Cost |
Quality |
Offline |
cli-anything-browser / safari / clibrowser |
harness-cli |
harness installed |
free |
high |
no |
trafilatura |
python |
pkg |
free |
high |
yes |
readability-lxml |
python |
pkg |
free |
good |
yes |
httpx + manual parse |
python |
pkg |
free |
basic |
yes |
playwright |
python |
pkg + browsers |
free |
sota |
no |
| Firecrawl |
api |
FIRECRAWL_API_KEY |
metered |
sota |
no |
| ScrapingBee |
api |
SCRAPINGBEE_API_KEY |
paid |
high |
no |
research.reference — citations, BibTeX, references
| Provider |
Kind |
Requires |
Cost |
Quality |
Offline |
cli-anything-zotero |
harness-cli |
Zotero installed |
free |
sota |
yes |
pyzotero |
python |
pkg + Zotero key |
free |
high |
no |
habanero (Crossref) |
python |
pkg |
free |
high |
no |
bibtexparser |
python |
pkg |
free |
good |
yes |
| Crossref REST |
api |
none |
free |
high |
no |
| Semantic Scholar |
api |
SEMANTIC_SCHOLAR_API_KEY (optional) |
free |
high |
no |
knowledge.note — note-taking / PKM
| Provider |
Kind |
Requires |
Cost |
Quality |
Offline |
cli-anything-obsidian |
harness-cli |
Obsidian installed |
free |
sota |
yes |
cli-anything-mubu |
harness-cli |
Mubu installed |
free |
high |
no |
obsidian-cli |
public-cli |
bin + vault path |
free |
high |
yes |
raw markdown + git |
native |
git |
free |
good |
yes |
mdformat |
python |
pkg |
free |
good |
yes |
| Notion API |
api |
NOTION_API_KEY |
free |
sota |
no |
| Roam / Logseq sync |
— |
— |
— |
— |
— |
knowledge.outline — outlining
| Provider |
Kind |
Requires |
Cost |
Quality |
Offline |
cli-anything-mubu |
harness-cli |
Mubu installed |
free |
high |
no |
OPML via lxml |
python |
pkg |
free |
good |
yes |
YAML outlines + yq |
native |
binary |
free |
good |
yes |
knowledge.synthesize — multi-doc synthesis / summarization
| Provider |
Kind |
Requires |
Cost |
Quality |
Offline |
cli-anything-notebooklm |
harness-cli |
harness installed |
metered |
sota |
no |
cli-anything-intelwatch |
harness-cli |
harness installed |
free-metered |
high |
partial |
langchain / llama_index + local LLM |
python |
pkg + ollama |
free |
high |
yes |
haystack |
python |
pkg |
free |
good |
partial |
| Claude / OpenAI / Gemini (long context) |
api |
model key |
metered |
sota |
no |
document.author — write docs (DOCX, XLSX, PPTX, PDF)
| Provider |
Kind |
Requires |
Cost |
Quality |
Offline |
cli-anything-libreoffice |
harness-cli |
LibreOffice installed |
free |
high |
yes |
cli-anything-anygen |
harness-cli |
harness installed |
free |
high |
yes |
python-docx / openpyxl / python-pptx / reportlab |
python |
pkg |
free |
good |
yes |
| Google Docs API |
api |
OAuth token |
metered |
sota |
no |
| Microsoft Graph |
api |
Azure app + token |
metered |
sota |
no |
document.format — convert / reformat
| Provider |
Kind |
Requires |
Cost |
Quality |
Offline |
pandoc |
native |
binary |
free |
sota |
yes |
cli-anything-libreoffice (headless convert) |
harness-cli |
LibreOffice |
free |
high |
yes |
docx2pdf |
python |
pkg + Word/LO |
free |
good |
yes |
weasyprint |
python |
pkg |
free |
high |
yes |
| CloudConvert |
api |
CLOUDCONVERT_API_KEY |
metered |
sota |
no |
document.pdf — manipulate PDFs (split, merge, OCR, extract)
| Provider |
Kind |
Requires |
Cost |
Quality |
Offline |
qpdf / pdftk |
native |
binary |
free |
sota |
yes |
pypdf |
python |
pkg |
free |
high |
yes |
pdfplumber |
python |
pkg |
free |
high |
yes |
pdf2image |
python |
pkg + poppler |
free |
good |
yes |
ocrmypdf |
native |
binary + tesseract |
free |
high |
yes |
| Adobe PDF Services |
api |
Adobe creds |
paid |
sota |
no |
diagram.create — diagrams, flowcharts, architecture
| Provider |
Kind |
Requires |
Cost |
Quality |
Offline |
cli-anything-drawio |
harness-cli |
drawio installed |
free |
sota |
yes |
cli-anything-mermaid |
harness-cli |
mermaid-cli |
free |
high |
yes |
graphviz (dot) |
native |
binary |
free |
high |
yes |
plantuml |
native |
binary |
free |
high |
yes |
publish.web — publish articles / blog posts
| Provider |
Kind |
Requires |
Cost |
Quality |
Offline |
contentful |
public-cli |
bin + space token |
metered |
high |
no |
sanity |
public-cli |
bin + project token |
metered |
high |
no |
hugo / mkdocs / jekyll / pelican |
native/python |
binary/pkg |
free |
high |
yes |
| WordPress REST |
api |
app password |
free |
high |
no |
| Ghost Admin |
api |
GHOST_ADMIN_KEY |
free |
high |
no |
| Medium (legacy) |
api |
token |
free |
good |
no |
publish.latex — build PDFs from LaTeX
| Provider |
Kind |
Requires |
Cost |
Quality |
Offline |
latexmk + texlive |
native |
binaries |
free |
sota |
yes |
pylatex |
python |
pkg + texlive |
free |
high |
yes |
| Overleaf API |
api |
OVERLEAF_API_KEY |
paid |
sota |
no |
| Tectonic |
native |
binary |
free |
high |
yes |
Recipes
literature-review — survey a topic, extract key papers, synthesize.
Uses: research.search, research.retrieve, research.reference, knowledge.synthesize, document.author.
meeting-to-doc — turn a recorded meeting into a structured document.
Uses: text.transcribe (via S1 matrix), knowledge.synthesize, document.author, document.format.
blog-post — research → write → publish.
Uses: research.search, research.retrieve, knowledge.synthesize, document.author, publish.web.
paper-draft — research + citations + LaTeX.
Uses: research.reference, knowledge.synthesize, document.author, publish.latex.
competitive-brief — fetch competitor pages, extract positioning, produce a briefing deck.
Uses: research.retrieve, knowledge.synthesize, document.author (PPTX).
pdf-book-digest — ingest a PDF book, OCR if needed, produce chapter summaries + quote file.
Uses: document.pdf, knowledge.synthesize, knowledge.note.
Known gaps
- Notion — Notion API exists as an escalation, but there is no harness for local-first Notion workflows. Recurs in S11 (team comms).
- Google Docs / Microsoft 365 live editing — API path only.
- LaTeX harness —
latexmk + Tectonic cover the native path, but no agent-native wrapper yet.
- Translation — no first-party CLI; Python fallback and APIs only.
Agent guidance
- Run preflight once per session. Many capabilities have strong Python or native paths that bypass the need to install anything.
- Prefer local for sensitive docs (legal, health, internal): use Obsidian + local LLM +
whisper rather than cloud APIs.
- Citations are load-bearing — for academic work always route through
research.reference so bibliographies stay consistent.
- Chain
document.format at the end, not the middle: author in the richest source format (markdown or LaTeX) and convert last.
- Workspace discipline — one directory per project; keep
refs.bib, source markdown, figures, and output PDFs colocated.
1---
2name: cli-hub-matrix-knowledge-research
3description: >-
4 Capability-based multi-tool matrix for research, note-taking, document authoring,
5 and publishing. Agents compose providers (CLI-Anything harnesses, public CLIs,
6 Python libs, native binaries, cloud APIs) per capability.
7---
8
9# Knowledge / Office / Research Matrix (S2 — v2 capability-based)
10
11Scenario **S2**. Strongest coverage in the current ecosystem: search, reference management, notes, synthesis, documents, and diagrams all have first-party harnesses; Python/native fallbacks fill the rest.
12
13Schema: [`docs/cli-matrix/matrix_registry.schema.md`](../../docs/cli-matrix/matrix_registry.schema.md). Matrix plan: [`docs/cli-matrix/cli-matrix-plan.md`](../../docs/cli-matrix/cli-matrix-plan.md).
14
15## Install
16
17```bash
18cli-hub matrix install knowledge-research
19cli-hub matrix info knowledge-research
20cli-hub matrix preflight knowledge-research --json
21```
22
23---
24
25## Provider selection constraints
26
271. Use preflight as an availability report, not as a provider selector.
282. Treat provider order as documentation order only.
293. Choose from user requirements, output quality bar, offline needs, credential state, install cost, and provider notes.
304. Escalate to paid or metered APIs only when credentials are already present or the user explicitly consents.
31
32Offline context? Filter to `offline: true` providers.
33
34---
35
36## Preflight
37
38Run `cli-hub matrix preflight knowledge-research --json` first. Use the manual block below for extra probes or older `cli-hub` versions.
39
40```bash
41cli-hub list --json
42python - <<'PY'
43import importlib.util
44for m in ("pyzotero","bibtexparser","trafilatura","readability","httpx","playwright",
45 "python_docx","openpyxl","pptx","reportlab","pypdf","pdfplumber","weasyprint",
46 "langchain","llama_index","haystack"):
47 print(m, importlib.util.find_spec(m) is not None)
48PY
49for b in pandoc qpdf pdftk exiftool latexmk tex dot mermaid plantuml hugo mkdocs jekyll; do
50 command -v "$b" >/dev/null && echo "$b: yes" || echo "$b: no"
51done
52for e in OPENAI_API_KEY ANTHROPIC_API_KEY GOOGLE_API_KEY PERPLEXITY_API_KEY TAVILY_API_KEY \
53 SERPAPI_API_KEY BRAVE_API_KEY FIRECRAWL_API_KEY \
54 NOTION_API_KEY SEMANTIC_SCHOLAR_API_KEY WORDPRESS_TOKEN GHOST_ADMIN_KEY; do
55 [ -n "${!e}" ] && echo "$e: set" || echo "$e: unset"
56done
57```
58
59---
60
61## Suggest-to-user template
62
63```
64To enable <capability> via <provider>, please set <ENV_VAR>.
65 Cost: <cost notes>
66 Quality: <quality tier>
67Reply 'skip' to fall back to <next provider>.
68```
69
70Example: *To enable live Notion sync via the Notion API, please set `NOTION_API_KEY`. Cost: free tier suffices for most users. Quality: sota (round-trips block/page IDs). Reply 'skip' to fall back to local Obsidian vault + manual paste.*
71
72---
73
74## Capabilities
75
76### `research.search` — web / literature search
77
78| Provider | Kind | Requires | Cost | Quality | Offline |
79|---|---|---|---|---|---|
80| `cli-anything-exa` | harness-cli | `EXA_API_KEY` | metered | sota | no |
81| `cli-anything-browser` / `safari` / `clibrowser` | harness-cli | browser installed | free | high | no |
82| `duckduckgo-search` | python | pkg | free | good | no |
83| `googlesearch-python` | python | pkg | free | good | no |
84| Perplexity API | api | `PERPLEXITY_API_KEY` | paid | sota | no |
85| Tavily | api | `TAVILY_API_KEY` | metered | high | no |
86| Brave Search | api | `BRAVE_API_KEY` | metered | good | no |
87| Google Custom Search | api | `GOOGLE_API_KEY` | metered | high | no |
88
89### `research.retrieve` — fetch article text / scrape pages
90
91| Provider | Kind | Requires | Cost | Quality | Offline |
92|---|---|---|---|---|---|
93| `cli-anything-browser` / `safari` / `clibrowser` | harness-cli | harness installed | free | high | no |
94| `trafilatura` | python | pkg | free | high | yes |
95| `readability-lxml` | python | pkg | free | good | yes |
96| `httpx` + manual parse | python | pkg | free | basic | yes |
97| `playwright` | python | pkg + browsers | free | sota | no |
98| Firecrawl | api | `FIRECRAWL_API_KEY` | metered | sota | no |
99| ScrapingBee | api | `SCRAPINGBEE_API_KEY` | paid | high | no |
100
101### `research.reference` — citations, BibTeX, references
102
103| Provider | Kind | Requires | Cost | Quality | Offline |
104|---|---|---|---|---|---|
105| `cli-anything-zotero` | harness-cli | Zotero installed | free | sota | yes |
106| `pyzotero` | python | pkg + Zotero key | free | high | no |
107| `habanero` (Crossref) | python | pkg | free | high | no |
108| `bibtexparser` | python | pkg | free | good | yes |
109| Crossref REST | api | none | free | high | no |
110| Semantic Scholar | api | `SEMANTIC_SCHOLAR_API_KEY` (optional) | free | high | no |
111
112### `knowledge.note` — note-taking / PKM
113
114| Provider | Kind | Requires | Cost | Quality | Offline |
115|---|---|---|---|---|---|
116| `cli-anything-obsidian` | harness-cli | Obsidian installed | free | sota | yes |
117| `cli-anything-mubu` | harness-cli | Mubu installed | free | high | no |
118| `obsidian-cli` | public-cli | bin + vault path | free | high | yes |
119| raw markdown + `git` | native | `git` | free | good | yes |
120| `mdformat` | python | pkg | free | good | yes |
121| Notion API | api | `NOTION_API_KEY` | free | sota | no |
122| Roam / Logseq sync | — | — | — | — | — |
123
124### `knowledge.outline` — outlining
125
126| Provider | Kind | Requires | Cost | Quality | Offline |
127|---|---|---|---|---|---|
128| `cli-anything-mubu` | harness-cli | Mubu installed | free | high | no |
129| OPML via `lxml` | python | pkg | free | good | yes |
130| YAML outlines + `yq` | native | binary | free | good | yes |
131
132### `knowledge.synthesize` — multi-doc synthesis / summarization
133
134| Provider | Kind | Requires | Cost | Quality | Offline |
135|---|---|---|---|---|---|
136| `cli-anything-notebooklm` | harness-cli | harness installed | metered | sota | no |
137| `cli-anything-intelwatch` | harness-cli | harness installed | free-metered | high | partial |
138| `langchain` / `llama_index` + local LLM | python | pkg + ollama | free | high | yes |
139| `haystack` | python | pkg | free | good | partial |
140| Claude / OpenAI / Gemini (long context) | api | model key | metered | sota | no |
141
142### `document.author` — write docs (DOCX, XLSX, PPTX, PDF)
143
144| Provider | Kind | Requires | Cost | Quality | Offline |
145|---|---|---|---|---|---|
146| `cli-anything-libreoffice` | harness-cli | LibreOffice installed | free | high | yes |
147| `cli-anything-anygen` | harness-cli | harness installed | free | high | yes |
148| `python-docx` / `openpyxl` / `python-pptx` / `reportlab` | python | pkg | free | good | yes |
149| Google Docs API | api | OAuth token | metered | sota | no |
150| Microsoft Graph | api | Azure app + token | metered | sota | no |
151
152### `document.format` — convert / reformat
153
154| Provider | Kind | Requires | Cost | Quality | Offline |
155|---|---|---|---|---|---|
156| `pandoc` | native | binary | free | sota | yes |
157| `cli-anything-libreoffice` (headless convert) | harness-cli | LibreOffice | free | high | yes |
158| `docx2pdf` | python | pkg + Word/LO | free | good | yes |
159| `weasyprint` | python | pkg | free | high | yes |
160| CloudConvert | api | `CLOUDCONVERT_API_KEY` | metered | sota | no |
161
162### `document.pdf` — manipulate PDFs (split, merge, OCR, extract)
163
164| Provider | Kind | Requires | Cost | Quality | Offline |
165|---|---|---|---|---|---|
166| `qpdf` / `pdftk` | native | binary | free | sota | yes |
167| `pypdf` | python | pkg | free | high | yes |
168| `pdfplumber` | python | pkg | free | high | yes |
169| `pdf2image` | python | pkg + poppler | free | good | yes |
170| `ocrmypdf` | native | binary + tesseract | free | high | yes |
171| Adobe PDF Services | api | Adobe creds | paid | sota | no |
172
173### `diagram.create` — diagrams, flowcharts, architecture
174
175| Provider | Kind | Requires | Cost | Quality | Offline |
176|---|---|---|---|---|---|
177| `cli-anything-drawio` | harness-cli | drawio installed | free | sota | yes |
178| `cli-anything-mermaid` | harness-cli | mermaid-cli | free | high | yes |
179| `graphviz` (`dot`) | native | binary | free | high | yes |
180| `plantuml` | native | binary | free | high | yes |
181
182### `publish.web` — publish articles / blog posts
183
184| Provider | Kind | Requires | Cost | Quality | Offline |
185|---|---|---|---|---|---|
186| `contentful` | public-cli | bin + space token | metered | high | no |
187| `sanity` | public-cli | bin + project token | metered | high | no |
188| `hugo` / `mkdocs` / `jekyll` / `pelican` | native/python | binary/pkg | free | high | yes |
189| WordPress REST | api | app password | free | high | no |
190| Ghost Admin | api | `GHOST_ADMIN_KEY` | free | high | no |
191| Medium (legacy) | api | token | free | good | no |
192
193### `publish.latex` — build PDFs from LaTeX
194
195| Provider | Kind | Requires | Cost | Quality | Offline |
196|---|---|---|---|---|---|
197| `latexmk` + `texlive` | native | binaries | free | sota | yes |
198| `pylatex` | python | pkg + texlive | free | high | yes |
199| Overleaf API | api | `OVERLEAF_API_KEY` | paid | sota | no |
200| Tectonic | native | binary | free | high | yes |
201
202---
203
204## Recipes
205
206- **`literature-review`** — survey a topic, extract key papers, synthesize.
207 Uses: `research.search`, `research.retrieve`, `research.reference`, `knowledge.synthesize`, `document.author`.
208
209- **`meeting-to-doc`** — turn a recorded meeting into a structured document.
210 Uses: `text.transcribe` (via S1 matrix), `knowledge.synthesize`, `document.author`, `document.format`.
211
212- **`blog-post`** — research → write → publish.
213 Uses: `research.search`, `research.retrieve`, `knowledge.synthesize`, `document.author`, `publish.web`.
214
215- **`paper-draft`** — research + citations + LaTeX.
216 Uses: `research.reference`, `knowledge.synthesize`, `document.author`, `publish.latex`.
217
218- **`competitive-brief`** — fetch competitor pages, extract positioning, produce a briefing deck.
219 Uses: `research.retrieve`, `knowledge.synthesize`, `document.author` (PPTX).
220
221- **`pdf-book-digest`** — ingest a PDF book, OCR if needed, produce chapter summaries + quote file.
222 Uses: `document.pdf`, `knowledge.synthesize`, `knowledge.note`.
223
224---
225
226## Known gaps
227
228- **Notion** — Notion API exists as an escalation, but there is no harness for local-first Notion workflows. Recurs in S11 (team comms).
229- **Google Docs / Microsoft 365 live editing** — API path only.
230- **LaTeX harness** — `latexmk` + Tectonic cover the native path, but no agent-native wrapper yet.
231- **Translation** — no first-party CLI; Python fallback and APIs only.
232
233---
234
235## Agent guidance
236
237- **Run preflight once per session.** Many capabilities have strong Python or native paths that bypass the need to install anything.
238- **Prefer local** for sensitive docs (legal, health, internal): use Obsidian + local LLM + `whisper` rather than cloud APIs.
239- **Citations are load-bearing** — for academic work always route through `research.reference` so bibliographies stay consistent.
240- **Chain `document.format` at the end**, not the middle: author in the richest source format (markdown or LaTeX) and convert last.
241- **Workspace discipline** — one directory per project; keep `refs.bib`, source markdown, figures, and output PDFs colocated.