tree

A command that displays the folder tree of indexed Markdown files and shows whether each file matches the index.

In plain words
What is it for?
Use it to check the sync state of all files or inspect only a chosen folder or named folder scope.
Why use it?
It helps you quickly find files that are up to date, changed, newly added, or deleted since indexing.

Command

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/geckse/markdown-vdb/tree
Clone the repo
git clone --depth 1 https://github.com/geckse/markdown-vdb
Per session 19 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,561 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00019 $0.02561
Opus 5 $0.00010 $0.01281
Sonnet 5 $0.00004 $0.00512
Haiku 4.5 $0.00002 $0.00256

Measured 2d ago against content hash 7bd8c5e8028a, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

tree scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

docs/cli/commands/tree.md · 299 lines

How it starts

The opening of the file, as written. The whole thing — 299 lines — stays where its author put it; the contents beside it link to each section on GitHub.

mdvdb tree

Show a file tree of all markdown files with sync status indicators. Each file is classified by comparing the files on disk against the index: Indexed (synced, hash matches), Modified (hash changed since last ingest), New (on disk but not in the index), or Deleted (in the index but no longer on disk).

Usage

mdvdb tree [OPTIONS]

Options

Flag Default Description
--path <PREFIX> (none) Restrict tree to files under this path prefix
--shard <ID> (none) Restrict tree to a configured named Shard (conflicts with --path)

Option Details

--path <PREFIX>

Filters the tree to show only files and directories under the given path prefix. The prefix matches against the relative file paths in the tree.

When --path is used, the tree is rooted at the matching subtree. If no files match the prefix, an empty tree is displayed with zero counts.

# Show tree for docs directory only
mdvdb tree --path docs

# Show tree for a nested directory
mdvdb tree --path src/components
--shard <ID>

Resolves a configured Shard to its recursive folder scope and returns the same tree contract, rooted at that folder. Shards use the shared collection index; this option does not open a separate index. --shard conflicts with --path.

mdvdb tree --shard research
mdvdb tree --shard research --json

Global Options

These options apply to all commands. See Commands Index for details.

Flag Short Description
--verbose -v Increase log verbosity (-v info, -vv debug, -vvv trace)
--root Project root directory (defaults to current directory)
--no-color Disable colored output
--json Output results as JSON

Sync Status Indicators

Each file in the tree is classified into one of four sync states by comparing the file on disk with what is stored in the index:

Read the full file on GitHub · 299 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 299 lines · 19 tokens per session scan A 7bd8c5e8028a

Subscribe to this mod's changes

tree is a command published in the GitHub repository geckse/markdown-vdb (23 stars, last pushed 18d ago), licensed MIT. It adds 19 tokens to every session and 2,561 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.