Skip to content

API Reference parrot.knowledge.wiki.cli

github-actions[bot] edited this page Dec 2, 2026 · 4 revisions

parrot.knowledge.wiki.cli

View source

wikitoolkit — machine-first CLI over the LLM Wiki retrieval plane.

Gives agents (and humans) scoped, token-budgeted access to a codebase knowledge base built from the current repository — fully offline: the build path is deterministic (:mod:parrot.knowledge.wiki.repo_scan) and queries run on the SQLite FTS5/BM25 plane (FEAT-260).

Exposed two ways:

  • wikitoolkit <command> — standalone console script, so coding assistants can run wikitoolkit query "<question>" cheaply;
  • parrot wiki <command> — subcommand of the main parrot CLI.

Alias BaseWikiStore

Re-exported from parrot.knowledge.wiki.store.BaseWikiStore.

Alias Charter

Re-exported from parrot.knowledge.wiki.charter.Charter.

Alias ClaimHeldByOther

Re-exported from parrot.knowledge.wiki.ledger.index.ClaimHeldByOther.

Alias DEFAULT_BUDGET_TOKENS

Re-exported from parrot.knowledge.wiki.context.DEFAULT_BUDGET_TOKENS.

Alias DocumentAcquirer

Re-exported from parrot.knowledge.wiki.documents.DocumentAcquirer.

Alias DocumentAcquisitionError

Re-exported from parrot.knowledge.wiki.documents.DocumentAcquisitionError.

Alias FederatedWikiStore

Re-exported from parrot.knowledge.wiki.federation.FederatedWikiStore.

Alias FixPlan

Re-exported from parrot.knowledge.wiki.ledger.fix_planner.FixPlan.

Alias InboxRuntime

Re-exported from parrot.knowledge.wiki.inbox.processor.InboxRuntime.

Alias IntegrationError

Re-exported from parrot.knowledge.wiki.ledger.integration.IntegrationError.

Alias IssueKind

Re-exported from parrot.knowledge.wiki.ledger.events.IssueKind.

Alias IssueSeverity

Re-exported from parrot.knowledge.wiki.ledger.events.IssueSeverity.

Alias IssueStatus

Re-exported from parrot.knowledge.wiki.ledger.events.IssueStatus.

Alias Lane

Re-exported from parrot.knowledge.wiki.ledger.fix_planner.Lane.

Alias LazyAdrGroup

Re-exported from parrot.knowledge.wiki.lazy_commands.LazyAdrGroup.

Alias LazyGroup

Re-exported from parrot.knowledge.wiki.lazy_commands.LazyGroup.

Alias LedgerDeliveryReport

Re-exported from parrot.knowledge.wiki.ledger.outbox.LedgerDeliveryReport.

Alias LedgerIntegrator

Re-exported from parrot.knowledge.wiki.ledger.integration.LedgerIntegrator.

Alias LedgerOutbox

Re-exported from parrot.knowledge.wiki.ledger.outbox.LedgerOutbox.

Alias LedgerService

Re-exported from parrot.knowledge.wiki.ledger.service.LedgerService.

Alias NamespaceSkip

Re-exported from parrot.knowledge.wiki.federation.NamespaceSkip.

Alias OutboxLockedError

Re-exported from parrot.knowledge.wiki.ledger.outbox.OutboxLockedError.

Alias PARROT_DIR

Re-exported from parrot.knowledge.wiki.project.PARROT_DIR.

Attribute REGISTRY_LOCK_WAIT_SECONDS

Alias SHARED_LOG_REL_PATH

Re-exported from parrot.knowledge.wiki.ledger.shared_log.SHARED_LOG_REL_PATH.

Alias SQLiteWikiStore

Re-exported from parrot.knowledge.wiki.store.SQLiteWikiStore.

Alias SchemaPlaneService

Re-exported from parrot.knowledge.wiki.schema.service.SchemaPlaneService.

Alias SchemaSourceConfig

Re-exported from parrot.knowledge.wiki.schema.models.SchemaSourceConfig.

Alias SourceCollectionManager

Re-exported from parrot.knowledge.wiki.sources.SourceCollectionManager.

Alias StrictLedgerReadError

Re-exported from parrot.knowledge.wiki.ledger.outbox.StrictLedgerReadError.

Alias SymbolKind

Re-exported from parrot.knowledge.wiki.symbols.SymbolKind.

Attribute UPSERT_LOCK_WAIT_SECONDS

Alias WikiConfigError

Re-exported from parrot.knowledge.wiki.project.WikiConfigError.

Alias WikiEffectiveConfig

Re-exported from parrot.knowledge.wiki.project.WikiEffectiveConfig.

Alias WikiNamespaceConfig

Re-exported from parrot.knowledge.wiki.project.WikiNamespaceConfig.

Alias WikiProjectConfig

Re-exported from parrot.knowledge.wiki.project.WikiProjectConfig.

Alias WikiRuntimeError

Re-exported from parrot.knowledge.wiki.runtime.WikiRuntimeError.

Alias WikiStoreBusy

Re-exported from parrot.knowledge.wiki.store.WikiStoreBusy.

Alias all_scanners

Re-exported from parrot.knowledge.wiki.languages.all_scanners.

Alias astgrep

Re-exported from parrot.knowledge.wiki.languages.astgrep.

Function audit

Show the wiki operation log and graph write commits (audit trail).

audit(path_: str | None, store_opt: str | None, backend_opt: str | None, limit: int, as_json: bool) -> None

Parameter Type Default Description
path_ str | None
store_opt str | None
backend_opt str | None
limit int
as_json bool

Function build

Generate (or refresh) the KB graph from the current repository.

Deterministic and offline: scans source files (respecting .gitignore), extracts summaries/API outlines, and writes pages + typed edges into the wiki retrieval plane.

By default also produces an OKF markdown bundle (index.md + per-page files), an interactive graph.html / graph.json knowledge map, a wiki_stats.json build report, and a README.md entry point.

build(path_: str | None, name: str | None, backend: str | None, force: bool, no_git: bool, quiet: bool, no_export: bool, no_graph: bool, graph_kinds: str, vault_mode: bool | None, no_push: bool, storage_dir: str | None) -> None

Parameter Type Default Description
path_ str | None
name str | None
backend str | None
force bool
no_git bool
quiet bool
no_export bool
no_graph bool
graph_kinds str
vault_mode bool | None
no_push bool
storage_dir str | None

Alias build_ingest_runtime

Re-exported from parrot.knowledge.wiki.runtime.build_ingest_runtime.

Alias build_novelty_scorer

Re-exported from parrot.knowledge.wiki.runtime.build_novelty_scorer.

Alias build_triage_adapters

Re-exported from parrot.knowledge.wiki.runtime.build_triage_adapters.

Alias changed_languages

Re-exported from parrot.knowledge.wiki.languages.fingerprint.changed_languages.

Function claude_hook

Claude Code PreToolUse hook runtime (reads stdin JSON).

Configured by parrot claude install in .claude/settings.json; emits a non-blocking nudge toward wikitoolkit query before search-style tool calls. Always exits 0.

claude_hook() -> None

Function communities

Show detected communities, or inter-community relations with --inter.

Runs Leiden (falling back to Louvain, FEAT-401) community detection on demand from the current wiki store contents — no need to re-run wikitoolkit build or regenerate graph.html. With --inter, also computes the inter-community meta-graph (which community pairs are connected, coupling ratios, edge direction) for cross-subsystem questions like "how do the auth and payment areas relate?". Output is token-budgeted for LLM-agent consumption.

communities(path_: str | None, graph_kinds: str, show_inter: bool, as_json: bool) -> None

Parameter Type Default Description
path_ str | None
graph_kinds str
show_inter bool
as_json bool

Alias config_path

Re-exported from parrot.knowledge.wiki.project.config_path.

Alias create_wiki_store

Re-exported from parrot.knowledge.wiki.store.create_wiki_store.

Alias current_fingerprint

Re-exported from parrot.knowledge.wiki.languages.fingerprint.current_fingerprint.

Alias derive_env_overlay

Re-exported from parrot.knowledge.wiki.project.derive_env_overlay.

Function export

Export the wiki as a human-readable markdown bundle.

Writes one markdown file per page (YAML frontmatter + body) plus a root index.md — the --wiki action of the /parrotwiki command.

export(path_: str | None, output: str) -> None

Parameter Type Default Description
path_ str | None
output str

Alias find_project_root

Re-exported from parrot.knowledge.wiki.project.find_project_root.

Alias find_shared_root

Re-exported from parrot.knowledge.wiki.project.find_shared_root.

Alias global_registry_path

Re-exported from parrot.knowledge.wiki.project.global_registry_path.

Function glossary_hook

Coding-host prompt hook runtime: inject glossary definitions (reads stdin JSON). Always exits 0.

glossary_hook(host: str) -> None

Parameter Type Default Description
host str

Function ground

Check a claim against the project knowledge graph (grounding).

Requires the project graph plane (.parrot/graph/) created by remember with sync_graph enabled or by --extract. Returns cited edge-level evidence, or a structured revise instruction listing the missing evidence.

ground(claim: str, path_: str | None, as_json: bool) -> None

Parameter Type Default Description
claim str
path_ str | None
as_json bool

Function inbox

Ingest every safe document from the configured inbox directory.

The processor, rather than the CLI, owns the whole-run write lock.

inbox(path_: str | None, dry_run: bool, limit: int | None, charter_opt: str | None, lightweight_model_opt: str | None, model_opt: str | None, archive: bool, force: bool, as_json: bool, watch: bool) -> None

Parameter Type Default Description
path_ str | None
dry_run bool
limit int | None
charter_opt str | None
lightweight_model_opt str | None
model_opt str | None
archive bool
force bool
as_json bool
watch bool

Function ingest

Supervised (charter-driven) ingestion of a document corpus.

Unlike build (deterministic, offline, no-LLM), ingest triages each document in SOURCE against an editorial charter before it becomes a wiki page: free heuristics reject duplicates/oversized files, a lightweight model scores the rest, and only gray-zone documents escalate to a heavier model. Exactly one mode is required.

SOURCE accepts a directory (recursive walk by default — see --recursive/--no-recursive), a single document path, or an http(s):// URL. PDF, DOCX, PPTX, XLSX, HTML, and EPUB are extracted through the optional ai-parrot-loaders package; plain-text/Markdown formats need no extra dependency. A document that cannot be decoded is skipped, counted, and reported — never triaged, and never charged an LLM call.

--dry-run Triage everything, write a manifest, ingest nothing. --review PATH Apply decisions from a hand-edited manifest. --interactive Prompt per-document (before any async work starts). --auto Thresholds decide; flags a stratified audit sample.

SOURCE 'roblox-api' (FEAT-532) is reserved: it dispatches to the federated Roblox API plane instead of document ingestion, entirely before any document-mode validation or LLM import below. A literal local path spelled './roblox-api' is unaffected — bare 'roblox-api' is the only form this dispatch claims.

ingest(source: str, path_: str | None, charter_opt: str | None, dry_run: bool, review_opt: Path | None, interactive_flag: bool, auto_flag: bool, extract_flag: bool, lightweight_model_opt: str | None, model_opt: str | None, audit_rate: float, manifest_opt: Path | None, recursive: bool, fetch_timeout: float, refresh_flag: bool, no_push: bool) -> None

Parameter Type Default Description
source str
path_ str | None
charter_opt str | None
dry_run bool
review_opt Path | None
interactive_flag bool
auto_flag bool
extract_flag bool
lightweight_model_opt str | None
model_opt str | None
audit_rate float
manifest_opt Path | None
recursive bool
fetch_timeout float
refresh_flag bool
no_push bool

Function ingest_jira

Extract Jira tickets into the issues markdown corpus and build it.

Deterministic and zero-LLM by default (FEAT-454): every frontmatter field is a Jira field or a pure function of one, so two runs over unchanged tickets produce byte-identical documents and write nothing.

Scope is JQL; each run fetches only issues updated since the last successful watermark, so a daily cron stays cheap. Content below the <!-- jira-sync:end --> marker in any document is preserved forever. Builds the plane by default so it can never silently lag the files (G10) — pass --no-build to emit documents only.

Each issue costs two round trips (its share of a search page plus its own remote-links call), so the sweep resolves --concurrency issues at a time. For the initial load of a scope use --backfill, which presets that for a one-shot run and refuses to record a watermark over a corpus that came up short.

Register the corpus once as a namespace (see the runbook):

wikitoolkit ns add issues --store <issues-dir>/.parrot/wiki --global

ingest_jira(jql: str | None, project_key: str | None, since: str | None, issues_dir_opt: str | None, do_build: bool, enrich: bool, force: bool, backfill: bool, concurrency_opt: int | None, progress_every_opt: int | None, dry_run: bool, as_json: bool, quiet: bool) -> None

Parameter Type Default Description
jql str | None
project_key str | None
since str | None
issues_dir_opt str | None
do_build bool
enrich bool
force bool
backfill bool
concurrency_opt int | None
progress_every_opt int | None
dry_run bool
as_json bool
quiet bool

Alias is_inside_wiki_bundle

Re-exported from parrot.knowledge.wiki.repo_scan.is_inside_wiki_bundle.

Alias is_linked_worktree

Re-exported from parrot.knowledge.wiki.project.is_linked_worktree.

Alias is_server_backend

Re-exported from parrot.knowledge.wiki.store.is_server_backend.

Alias is_wiki_relevant

Re-exported from parrot.knowledge.wiki.repo_scan.is_wiki_relevant.

Function ledger

Manage the SDD work ledger, discovered work, and spec graph.

ledger() -> None

Function ledger_acknowledge

Acknowledge a critical issue (human-only).

ledger_acknowledge(issue_id: str, reason: str, actor: str) -> None

Parameter Type Default Description
issue_id str
reason str
actor str

Function ledger_audit

Print ledger audit: log size, event counts, and index stats.

ledger_audit() -> None

Function ledger_blockers

List unacknowledged critical issues blocking a feature merge.

ledger_blockers(feature_id: str) -> None

Parameter Type Default Description
feature_id str

Function ledger_claim

Claim an issue for work.

ledger_claim(issue_id: str, actor: str) -> None

Parameter Type Default Description
issue_id str
actor str

Function ledger_close

Close an issue. A claimed issue closes only for its claimant unless --force.

ledger_close(issue_id: str, reason: str, actor: str, resolved_by: str | None, force: bool) -> None

Parameter Type Default Description
issue_id str
reason str
actor str
resolved_by str | None
force bool

Function ledger_compact

Compact the ledger index (index-only; manual only).

ledger_compact(older_than: int) -> None

Parameter Type Default Description
older_than int

Function ledger_context

Get context for file paths: open issues touching them.

ledger_context(file_paths: tuple[str, ...], max_tokens: int) -> None

Parameter Type Default Description
file_paths tuple[str, ...]
max_tokens int

Function ledger_export

Export the ledger snapshot.

ledger_export(dest: str, no_reconcile: bool) -> None

Parameter Type Default Description
dest str
no_reconcile bool

Function ledger_export_log

Append shareable events to the committed log for explicit diagnostics only.

ledger_export_log(repo_root: str | None, stage: bool, quiet: bool) -> None

Parameter Type Default Description
repo_root str | None
stage bool
quiet bool

Function ledger_import_log

Append committed ledger events unknown to this machine and sync the index.

ledger_import_log(repo_root: str | None, force: bool, quiet: bool) -> None

Parameter Type Default Description
repo_root str | None
force bool
quiet bool

Function ledger_ingest_sdd

Ingest SDD specs and task indexes into the ledger.

ledger_ingest_sdd() -> None

Function ledger_list

List ledger issues by status, kind, severity or about prefix.

ledger_list(statuses: tuple[str, ...], kind: str | None, severity: str | None, about_prefix: str | None, as_json: bool) -> None

Parameter Type Default Description
statuses tuple[str, ...]
kind str | None
severity str | None
about_prefix str | None
as_json bool

Function ledger_open

Open a new issue in the ledger.

ledger_open(kind: str, severity: str, discovered_from: str, about: tuple[str, ...], title: str, body: str) -> None

Parameter Type Default Description
kind str
severity str
discovered_from str
about tuple[str, ...]
title str
body str

Function ledger_outbox

Local-only durable delivery of ledger events to origin/dev (FEAT-758).

ledger_outbox() -> None

Function ledger_outbox_integrate

Deliver pending batches and map typed outcomes to documented exit codes.

ledger_outbox_integrate(repo_root: str, ledger_dir: str | None, batch_id: str | None, json_output: bool) -> None

Parameter Type Default Description
repo_root str
ledger_dir str | None
batch_id str | None
json_output bool

Function ledger_outbox_prepare

Resolve local source, capture a batch, and report its durable location.

ledger_outbox_prepare(repo_root: str, ledger_dir: str | None, json_output: bool) -> None

Parameter Type Default Description
repo_root str
ledger_dir str | None
json_output bool

Function ledger_outbox_status

Show sealed/unsealed pending delivery without acknowledgement or pushes.

ledger_outbox_status(repo_root: str, ledger_dir: str | None, json_output: bool) -> None

Parameter Type Default Description
repo_root str
ledger_dir str | None
json_output bool

Function ledger_plan_fix

Plan a fix batch: severity-ordered, file-grouped, lane-labelled (FEAT-572).

ledger_plan_fix(kind: str | None, severity: str | None, lane: str | None, as_json: bool) -> None

Parameter Type Default Description
kind str | None
severity str | None
lane str | None
as_json bool

Function ledger_ready

List unclaimed, open issues.

ledger_ready(kind: str | None) -> None

Parameter Type Default Description
kind str | None

Function ledger_rebuild

Rebuild the ledger index from scratch and checkpoint.

spec:/task: pages and edges from ledger ingest-sdd are not event-sourced (Module 7 writes directly into ledger.db, with no corresponding events.jsonl entries), so a plain replay-from-log rebuild would silently and permanently wipe the SDD spec/task graph. Re-running SDD ingestion right after the event replay restores it — ingestion is idempotent (upsert semantics), so this is safe to run even when nothing in sdd/ actually changed.

ledger_rebuild() -> None

Function ledger_retract_feedback

Withdraw misattributed coder feedback (coder-feedback:<digest> ids) from model lessons.

ledger_retract_feedback(feedback_ids: tuple[str, ...], reason: str, actor: str) -> None

Parameter Type Default Description
feedback_ids tuple[str, ...]
reason str
actor str

Function ledger_rotate_log

Move terminal events older than N days from sdd/ledger/events.jsonl to sdd/ledger/archive/.

ledger_rotate_log(repo_root: str | None, older_than_days: int, now: str | None, stage: bool, quiet: bool) -> None

Parameter Type Default Description
repo_root str | None
older_than_days int
now str | None
stage bool
quiet bool

Function ledger_show

Show one ledger issue in full: state, body and event history.

ledger_show(issue_id: str, as_json: bool, no_history: bool) -> None

Parameter Type Default Description
issue_id str
as_json bool
no_history bool

Function ledger_sync

Sync the ledger index from the event log.

ledger_sync() -> None

Function ledger_unclaim

Release a claim so the issue returns to ledger ready. Only the claimant may release it unless --force.

ledger_unclaim(issue_id: str, reason: str, actor: str, force: bool) -> None

Parameter Type Default Description
issue_id str
reason str
actor str
force bool

Function link

Connect two existing wiki pages with an asserted, typed edge.

Both pages must live in the same plane — there are no cross-namespace edges. With --ns <name> the edge is written into that namespace; ids may be given qualified with that same name.

link(src: str, dst: str, path_: str | None, store_opt: str | None, backend_opt: str | None, rel: str, ns_opt: str | None, by: str | None, as_json: bool) -> None

Parameter Type Default Description
src str
dst str
path_ str | None
store_opt str | None
backend_opt str | None
rel str
ns_opt str | None
by str | None
as_json bool

Function lint

Lint the wiki graph, export, memories and ADRs; --fix applies safe fixes.

lint(path_: str | None, ns_opt: str | None, rules: str | None, skip: tuple[str, ...], fix: bool, llm: bool, llm_model: str | None, llm_max_pairs: int, report_fmt: str, output: str | None, export_dir: str | None, ledger: bool, notes: bool, fail_on: str, as_json: bool) -> None

Parameter Type Default Description
path_ str | None
ns_opt str | None
rules str | None
skip tuple[str, ...]
fix bool
llm bool
llm_model str | None
llm_max_pairs int
report_fmt str
output str | None
export_dir str | None
ledger bool
notes bool
fail_on str
as_json bool

Alias load_effective_config

Re-exported from parrot.knowledge.wiki.project.load_effective_config.

Alias load_fingerprint

Re-exported from parrot.knowledge.wiki.languages.fingerprint.load_fingerprint.

Alias load_global_registry

Re-exported from parrot.knowledge.wiki.project.load_global_registry.

Alias load_project_config

Re-exported from parrot.knowledge.wiki.project.load_project_config.

Function main

Console-script entry point for wikitoolkit.

main() -> None

Function mcp

Start wikitoolkit as a local MCP stdio server (FEAT-403).

Exposes the six wiki tools (wiki_query, wiki_page, wiki_related, wiki_remember, wiki_note, wiki_status) as native MCP tools, giving them equal standing with Grep/Read at tool-selection time. Must be run inside a repository with a built wiki (wikitoolkit build).

mcp() -> None

Function memories

List saved memories and agent-authored pages (newest first).

memories(path_: str | None, store_opt: str | None, backend_opt: str | None, category: str | None, limit: int, as_json: bool) -> None

Parameter Type Default Description
path_ str | None
store_opt str | None
backend_opt str | None
category str | None
limit int
as_json bool

Alias merge_namespaces

Re-exported from parrot.knowledge.wiki.project.merge_namespaces.

Alias normalize_issue_id

Re-exported from parrot.knowledge.wiki.ledger.service.normalize_issue_id.

Function note

Append an attributed note to an existing wiki page.

With --ns <name> the note is written into that namespace's own plane; PAGE_ID may be given qualified (name::file:a.py).

note(page_id: str, text: str, path_: str | None, store_opt: str | None, backend_opt: str | None, ns_opt: str | None, by: str | None, as_json: bool) -> None

Parameter Type Default Description
page_id str
text str
path_ str | None
store_opt str | None
backend_opt str | None
ns_opt str | None
by str | None
as_json bool

Function ns

Manage federated wiki namespaces (other wikis this one can read).

ns() -> None

Function ns_add

Register NAME as a namespace this wiki can read.

This is the only writer of namespace entries — neither build nor any other command ever self-registers a wiki.

ns_add(name: str, path_: str | None, src_project: str | None, src_store: str | None, backend_opt: str | None, src_database: str | None, credentials_env: str, src_vault: str | None, description: str, weight: float, is_global: bool) -> None

Parameter Type Default Description
name str
path_ str | None
src_project str | None
src_store str | None
backend_opt str | None
src_database str | None
credentials_env str
src_vault str | None
description str
weight float
is_global bool

Function ns_list

List the namespaces visible from this project (repo + global).

ns_list(path_: str | None, as_json: bool) -> None

Parameter Type Default Description
path_ str | None
as_json bool

Attribute ns_option

Function ns_remove

Remove namespace NAME from this repo (or the global registry).

ns_remove(name: str, path_: str | None, is_global: bool) -> None

Parameter Type Default Description
name str
path_ str | None
is_global bool

Alias open_namespace_store

Re-exported from parrot.knowledge.wiki.federation.open_namespace_store.

Alias pack_results

Re-exported from parrot.knowledge.wiki.context.pack_results.

Function page

Read one wiki page in full (progressive disclosure).

PAGE_ID may carry a namespace prefix (other::file:a.py); with --ns <name> a bare id is resolved inside that namespace.

page(page_id: str, path_: str | None, max_tokens: int | None, store_opt: str | None, backend_opt: str | None, ns_opt: str | None, as_json: bool) -> None

Parameter Type Default Description
page_id str
path_ str | None
max_tokens int | None
store_opt str | None
backend_opt str | None
ns_opt str | None
as_json bool

Alias parrot_home

Re-exported from parrot.knowledge.wiki.project.parrot_home.

Alias parse_sym_id

Re-exported from parrot.knowledge.wiki.symbols.parse_sym_id.

Attribute path_option

Alias persistence_for_project

Re-exported from parrot.knowledge.wiki.runtime.persistence_for_project.

Alias plan_fix_batch

Re-exported from parrot.knowledge.wiki.ledger.fix_planner.plan_fix_batch.

Alias qualify_id

Re-exported from parrot.knowledge.wiki.context.qualify_id.

Function query

Scoped question against the codebase KB (lexical BM25 search).

Returns a token-budgeted context pack of page stubs (or a human-facing Rich table with --table). Point --store at any pre-built wiki (e.g. docs/parrot) to query it directly. Follow up with wikitoolkit page <id> to read a full page, or wikitoolkit related <id> to walk the graph.

query(question: str, path_: str | None, top_k: int, budget: int, category: str | None, store_opt: str | None, backend_opt: str | None, ns_opt: str | None, as_table: bool, show_body: bool, as_json: bool) -> None

Parameter Type Default Description
question str
path_ str | None
top_k int
budget int
category str | None
store_opt str | None
backend_opt str | None
ns_opt str | None
as_table bool
show_body bool
as_json bool

Function related

List pages linked to PAGE_ID by typed edges.

PAGE_ID may carry a namespace prefix (other::dir:pkg); with --ns <name> a bare id is resolved inside that namespace.

related(page_id: str, path_: str | None, rel: str | None, direction: str, store_opt: str | None, backend_opt: str | None, ns_opt: str | None, as_json: bool) -> None

Parameter Type Default Description
page_id str
path_ str | None
rel str | None
direction str
store_opt str | None
backend_opt str | None
ns_opt str | None
as_json bool

Function remember

Save a fact, decision, or lesson into the wiki (persistent memory).

The page id is a deterministic hash of title+category, so re-remembering the same thing updates the existing memory instead of duplicating it. With sync_graph enabled in .parrot/wiki.json the memory is also mirrored into the project's knowledge graph as an audited commit.

remember(text: str, path_: str | None, store_opt: str | None, backend_opt: str | None, title: str | None, category: str, links: tuple[str, ...], rel: str, ns_opt: str | None, source_uri: str | None, by: str | None, extract_: bool, as_json: bool, type_: str | None = None, project: str | None = None, status: str | None = None, date_: str | None = None, due: str | None = None, owner: str | None = None) -> None

Parameter Type Default Description
text str
path_ str | None
store_opt str | None
backend_opt str | None
title str | None
category str
links tuple[str, ...]
rel str
ns_opt str | None
source_uri str | None
by str | None
extract_ bool
as_json bool
type_ str | None None
project str | None None
status str | None None
date_ str | None None
due str | None None
owner str | None None

Alias remote_cli

Re-exported from parrot.knowledge.wiki.remote_cli.

Alias resolve_entry_base

Re-exported from parrot.knowledge.wiki.project.resolve_entry_base.

Alias resolve_namespaces

Re-exported from parrot.knowledge.wiki.federation.resolve_namespaces.

Alias resolve_sources

Re-exported from parrot.knowledge.wiki.documents.resolve_sources.

Alias save_env_overlay

Re-exported from parrot.knowledge.wiki.project.save_env_overlay.

Alias save_fingerprint

Re-exported from parrot.knowledge.wiki.languages.fingerprint.save_fingerprint.

Alias save_global_registry

Re-exported from parrot.knowledge.wiki.project.save_global_registry.

Alias save_project_config

Re-exported from parrot.knowledge.wiki.project.save_project_config.

Alias scan_repository

Re-exported from parrot.knowledge.wiki.repo_scan.scan_repository.

Function schema

Manage the SQL schema plane (sources, sync, DDL ingest, diff, lookup).

schema() -> None

Function schema_add_source

Declare a source in .parrot/wiki.json under schema.sources.

schema_add_source(alias: str | None, dialect: str, dsn_env: str, schemas: str, tables: str | None) -> None

Parameter Type Default Description
alias str | None
dialect str
dsn_env str
schemas str
tables str | None

Function schema_diff

Report live-vs-DDL divergence for ORIGIN without resolving it.

schema_diff(origin: str, to_ledger: bool) -> None

Parameter Type Default Description
origin str
to_ledger bool

Function schema_ingest_ddl

Fold SQL files into the schema plane without requiring a database.

With --changed and neither PATHS nor --origin (the post-commit / post-merge hook's invocation), every declared schema.sources entry is scanned for DDL files touched by the last HEAD move, each ingested with its own dialect. --range names the scanned range explicitly.

schema_ingest_ddl(paths: tuple[Path, ...], origin: str | None, dialect: str | None, changed: bool, diff_range: str | None, as_json: bool, quiet: bool) -> None

Parameter Type Default Description
paths tuple[Path, ...]
origin str | None
dialect str | None
changed bool
diff_range str | None
as_json bool
quiet bool

Function schema_lookup

Show a table page for REF.

schema_lookup(ref: str, as_json: bool) -> None

Parameter Type Default Description
ref str
as_json bool

Function schema_sources

List declared sources without exposing DSN values.

schema_sources() -> None

Function schema_sync

Introspect ORIGIN and write its table pages.

schema_sync(origin: str, tables: str | None, changed: bool, as_json: bool) -> None

Parameter Type Default Description
origin str
tables str | None
changed bool
as_json bool

Function serve

Serve one or more wikis as MCP Streamable HTTP at <base_path>/ (FEAT-569).

Runs ONE process; sessions are in-memory. Put a reverse proxy in front for TLS and high availability. Requires pip install 'ai-parrot[wikitoolkit-server]'.

serve(config_path: Path, host: str | None, port: int | None, ssl_cert: Path | None, ssl_key: Path | None) -> None

Parameter Type Default Description
config_path Path
host str | None
port int | None
ssl_cert Path | None
ssl_key Path | None

Alias shared_log_files

Re-exported from parrot.knowledge.wiki.ledger.shared_log.shared_log_files.

Alias split_namespaced_id

Re-exported from parrot.knowledge.wiki.context.split_namespaced_id.

Alias sqlite_policy_from_config

Re-exported from parrot.knowledge.wiki.project.sqlite_policy_from_config.

Function status

Show wiki plane statistics, namespaces, and source staleness.

status(path_: str | None, ns_opt: str | None, as_json: bool) -> None

Parameter Type Default Description
path_ str | None
ns_opt str | None
as_json bool

Alias structural_enabled

Re-exported from parrot.knowledge.wiki.languages.render.structural_enabled.

Function symbols

Query the codebase's structural symbol plane (FEAT-498).

symbols() -> None

Function symbols_blast

Find every symbol that transitively depends on (calls/extends/implements) SYMBOL.

symbols_blast(path_: str | None, ns_opt: str | None, symbol: str, relations: tuple[str, ...], depth: int, include_inferred: bool, include_tests: bool, as_json: bool) -> None

Parameter Type Default Description
path_ str | None
ns_opt str | None
symbol str
relations tuple[str, ...]
depth int
include_inferred bool
include_tests bool
as_json bool

Function symbols_lookup

Find a symbol (function/class/method) by name or qualname.

symbols_lookup(path_: str | None, ns_opt: str | None, query: str, kind: str | None, language: str | None, path_prefix: str | None, limit: int, as_json: bool) -> None

Parameter Type Default Description
path_ str | None
ns_opt str | None
query str
kind str | None
language str | None
path_prefix str | None
limit int
as_json bool

Function symbols_outline

Get the symbol outline of a file: file:, sym:#, or a relative path.

symbols_outline(path_: str | None, ns_opt: str | None, target: str, depth: int, include_source: bool, as_json: bool) -> None

Parameter Type Default Description
path_ str | None
ns_opt str | None
target str
depth int
include_source bool
as_json bool

Function sync

Push/pull authored knowledge (memories, notes) with a shared plane.

The local identity used to attribute writes and filter pull is always human:<local-user> in v1 — there is no override flag yet.

sync obsidian is the third direction: a one-way mirror of wiki planes into an Obsidian vault, configured by page category/folder.

sync() -> None

Function sync_obsidian_cmd

Mirror wiki planes into an Obsidian vault as markdown notes.

Which categories sync and which vault folder each one maps onto is driven by the obsidian_sync section of .parrot/wiki.json (categories/folders/root_folder/namespaces); flags override per run. One-way wiki -> vault: notes land under the configured root folder with a wiki_sync frontmatter marker, and edges between synced pages become [[wikilinks]] in a Related section.

sync_obsidian_cmd(path_: str | None, vault_opt: str | None, ns_opt: str | None, category_opt: tuple[str, ...], prune_opt: bool | None, dry_run: bool, verbose_: bool) -> None

Parameter Type Default Description
path_ str | None
vault_opt str | None
ns_opt str | None
category_opt tuple[str, ...]
prune_opt bool | None
dry_run bool
verbose_ bool

Function sync_pull_cmd

Pull memories/notes/asserted edges from the ENV plane.

By default, records authored by the local identity (human:<user>) are excluded (--all switches to pure last-write-wins). In remote mode the pages come through wiki_sync_pull and --env is ignored.

sync_pull_cmd(path_: str | None, target_env: str, dry_run: bool, include_own: bool) -> None

Parameter Type Default Description
path_ str | None
target_env str
dry_run bool
include_own bool

Function sync_push_cmd

Push local memories/notes/asserted edges to the ENV plane.

Every local memory page moves — push never filters by authorship. In remote mode the pages travel through wiki_sync_push and --env is ignored.

sync_push_cmd(path_: str | None, target_env: str, dry_run: bool) -> None

Parameter Type Default Description
path_ str | None
target_env str
dry_run bool

Alias truncate_to_tokens

Re-exported from parrot.knowledge.wiki.context.truncate_to_tokens.

Function upsert

Incrementally re-ingest specific files (or last-commit changes).

Used by the git post-commit hook installed via parrot claude install to keep the wiki fresh. Deleted files have their pages removed. Directory overview pages are refreshed by the next full wikitoolkit build.

upsert(paths: tuple[str, ...], path_: str | None, changed: bool, quiet: bool, no_push: bool) -> None

Parameter Type Default Description
paths tuple[str, ...]
path_ str | None
changed bool
quiet bool
no_push bool

Function usage

Per-spec token and cost reporting.

usage() -> None

Function usage_report

Render tokens and cost for one feature.

usage_report(feat_id: str, by: str, fmt: str, root: Path | None) -> None

Parameter Type Default Description
feat_id str
by str
fmt str
root Path | None

Alias validate_namespace_name

Re-exported from parrot.knowledge.wiki.project.validate_namespace_name.

Function wiki

LLM Wiki — codebase knowledge base for agents (FEAT-260).

Build a machine-first knowledge graph of the current repository and query it with scoped, token-budgeted questions instead of grepping raw files.

wiki(ctx: click.Context, verbose: bool) -> None

Parameter Type Default Description
ctx click.Context
verbose bool

Alias wiki_backend_names

Re-exported from parrot.knowledge.wiki.store.wiki_backend_names.

Alias wiki_write_lock

Re-exported from parrot.knowledge.wiki.project.wiki_write_lock.

Architecture

Clients

Bots & Agents

Memory

Knowledge

Tools & Toolkits

Flows

Experts

Skills

Stores & Loaders

MCP & A2A

Server & APIs

Integrations

Outputs & A2UI

Prompts

Security

Operations

Migration

SDD Tooling

LLM Wiki

Deployment

Decisions

API Reference

Clone this wiki locally