Quickstart¶
Get factq running in your project in under a minute.
1. Initialize¶
Point factq at your project root. It auto-indexes your docs/ folder:
This scans docs/, docs/research/, docs/knowledge/, and any markdown files alongside your code.
2. Query¶
Ask a question. factq checks your project docs first:
If the answer exists in docs/architecture.md, it returns immediately — no LLM call, no network request.
3. Save Findings¶
When factq discovers a new verified fact through the Deepthink loop, save it to your docs:
The finding is now a markdown file in git — shared with your team on the next push.
Python API¶
import factq
fq = factq.init(".")
# Docs-first resolution
result = fq.query("What database do we use?")
print(result.answer)
print(result.source) # 'docs' | 'kb' | 'deepthink'
# Save a verified result
fq.save("docs/research/database_choice.md", result)
As an MCP Server¶
factq runs as a local MCP server for Claude Code, Cursor, and Windsurf:
Your AI assistant now checks your project docs before every answer.