Documentation Index Fetch the complete documentation index at: https://docs.kiwifs.com/llms.txt
Use this file to discover all available pages before exploring further.
KiwiFS treats frontmatter as structured metadata you can query, aggregate, and graph. The metadata API provides a DataView Query Language (DQL) engine, SQL-style aggregations, and a full wiki-link graph.
DQL queries
Query pages using DataView Query Language. DQL operates over frontmatter fields and supports multiple output modes.
curl 'http://localhost:3333/api/kiwi/query?q=TABLE+title,+status+FROM+"concepts"+WHERE+status+=+"draft"'
{
"mode" : "TABLE" ,
"headers" : [ "path" , "title" , "status" ],
"rows" : [
[ "concepts/billing.md" , "Billing" , "draft" ],
[ "concepts/users.md" , "Users" , "draft" ]
]
}
Query modes
Mode Description Example TABLETabular results with selected fields TABLE title, status FROM "concepts"LISTFlat list of matching page paths LIST FROM "concepts" WHERE status = "verified"COUNTCount of matching pages COUNT FROM "concepts" WHERE status = "draft"DISTINCTUnique values for a field DISTINCT status FROM "concepts"
Table query
Count query
Distinct values
curl 'http://localhost:3333/api/kiwi/query?q=TABLE+title,+status+FROM+"concepts"+WHERE+status+=+"draft"'
Aggregations
SQL-style aggregation queries over frontmatter fields.
Frontmatter field to group by.
Comma-separated aggregation functions. Format: function or function:field.
Supported functions: count, avg, sum, min, max.
curl 'http://localhost:3333/api/kiwi/query/aggregate?group=status&calc=count,avg:priority'
[
{ "status" : "draft" , "count" : 12 , "avg_priority" : 2.3 },
{ "status" : "verified" , "count" : 45 , "avg_priority" : 1.8 },
{ "status" : "stale" , "count" : 3 , "avg_priority" : 3.0 }
]
Refresh computed views
Trigger a refresh of all computed views (materialized DQL queries).
curl -X POST 'http://localhost:3333/api/kiwi/view/refresh'
{ "refreshed" : 4 , "duration_ms" : 120 }
Views refresh automatically on file writes. Use this endpoint to force a manual refresh after bulk imports or direct filesystem changes.
Backlinks
Get all pages that link to a given page via wiki links.
File path to find backlinks for.
curl 'http://localhost:3333/api/kiwi/backlinks?path=concepts/auth.md'
[
{ "path" : "concepts/users.md" , "title" : "Users" , "context" : "...uses [[auth]] for login..." },
{ "path" : "concepts/api-keys.md" , "title" : "API Keys" , "context" : "...see [[auth]] for details..." }
]
Knowledge graph
Retrieve the full wiki-link graph as JSON. This powers the graph visualization in the web UI.
curl 'http://localhost:3333/api/kiwi/graph'
{
"nodes" : [
{ "id" : "concepts/auth.md" , "title" : "Authentication" , "group" : "concepts" },
{ "id" : "concepts/users.md" , "title" : "Users" , "group" : "concepts" },
{ "id" : "concepts/billing.md" , "title" : "Billing" , "group" : "concepts" }
],
"edges" : [
{ "source" : "concepts/users.md" , "target" : "concepts/auth.md" },
{ "source" : "concepts/billing.md" , "target" : "concepts/users.md" }
]
}
Use the graph endpoint to build custom visualizations or to analyze the connectivity of your knowledge base. Orphan pages (nodes with no edges) are candidates for linking or removal.