README.md
March 27, 2026 · View on GitHub
pbi-search
A CLI for searching and fetching Power BI and tabular modeling documentation as markdown
Searches across Tabular Editor docs, DAX.guide, SQLBI, Microsoft Learn (Power BI + Fabric), the TE blog, and Data Goblins. All output is clean markdown.
Installation
cargo install pbi-search
Prebuilt binaries for macOS and Linux are available on the Releases page.
Quick start
# Sync the local manifest cache (required before first search)
pbi-search sync
# Search everything
pbi-search search "calculated columns"
# Fetch any doc as markdown
pbi-search fetch https://dax.guide/calculate/
Sources
| ID | Name | Content |
|---|---|---|
te-docs | Tabular Editor Docs | GitHub markdown — features, how-tos, KB, references, tutorials |
ms-learn | Microsoft Learn | Power BI and Fabric sections — queried live via public MCP endpoint |
dax-guide | DAX.guide | ~1,000 DAX function reference pages |
te-blog | Tabular Editor Blog | Blog posts (local markdown or remote sitemap) |
sqlbi | SQLBI | Up to 50 articles from sqlbi.com |
data-goblins | Data Goblins | Power BI posts from data-goblins.com |
CLI reference
All commands return markdown by default. Add --json for structured output.
search
pbi-search search <QUERY> [--source <ID>]... [--json] [--excerpts] [--limit <N>] [--quiet]
| Flag | Description |
|---|---|
--source <ID> | Restrict to one or more sources (repeatable). Omit to search all. |
--json | Structured output: { "results": [...], "warnings": [...] } |
--excerpts | Fetch a 500-char content excerpt per result (adds network latency) |
--limit <N> | Max results (default: 10) |
--quiet | Suppress progress output — for pipelines and agent contexts |
# All sources
pbi-search search "row context vs filter context"
# Tabular Editor docs
pbi-search search "creating measures" --source te-docs
pbi-search search "BPA rules" --source te-docs --excerpts
# DAX function reference
pbi-search search "CALCULATE" --source dax-guide
pbi-search search "iterator functions" --source dax-guide --excerpts
# Microsoft Learn — Power BI and Fabric (live, no sync needed)
pbi-search search "row level security" --source ms-learn
pbi-search search "DirectLake" --source ms-learn --json
# SQLBI articles
pbi-search search "calculated column performance" --source sqlbi
pbi-search search "DAX query plans" --source sqlbi --excerpts
# Tabular Editor blog
pbi-search search "semantic model" --source te-blog
# Data Goblins
pbi-search search "calculation groups" --source data-goblins
# Multiple sources
pbi-search search "measures vs columns" --source te-docs --source dax-guide --json
pbi-search search "DAX" --json --quiet | jq '.results[0].url'
fetch
pbi-search fetch <URL-OR-PATH> [--section <HEADING>] [--max-chars <N>] [--json]
Fetches a document and returns it as markdown. Source is auto-detected from the URL. GitHub blob URLs are normalised to raw automatically.
| Flag | Description |
|---|---|
--section <HEADING> | Extract only the matching markdown section |
--max-chars <N> | Truncate output to N Unicode characters |
--json | Output { "url", "source", "content", "truncated" } |
# Tabular Editor docs — bare path or full URL
pbi-search fetch features/creating-measures
pbi-search fetch https://docs.tabulareditor.com/features/creating-measures
pbi-search fetch features/kb/DAX0001 --section "How to fix"
# DAX.guide function pages
pbi-search fetch https://dax.guide/calculate/
pbi-search fetch https://dax.guide/sumx/ --max-chars 3000
# SQLBI article
pbi-search fetch https://www.sqlbi.com/articles/understanding-dax-query-plans/
# Tabular Editor blog post
pbi-search fetch https://tabulareditor.com/blog/announcing-tabular-editor-3
# Data Goblins post
pbi-search fetch https://data-goblins.com/power-bi/calculation-groups-basics
# Microsoft Learn
pbi-search fetch https://learn.microsoft.com/en-us/power-bi/transform-model/desktop-calculated-columns
pbi-search fetch https://learn.microsoft.com/en-us/fabric/data-warehouse/intro --max-chars 5000
# JSON output for agents
pbi-search fetch https://dax.guide/calculate/ --json
pbi-search fetch features/creating-measures --json | jq '.content'
sync
pbi-search sync [--source <ID>]...
Refreshes the local manifest cache. Idempotent. ms-learn is remote-only and cannot be synced.
pbi-search sync # all sources
pbi-search sync --source te-docs
pbi-search sync --source dax-guide --source sqlbi
sources
pbi-search sources [--json]
Lists all sources with sync status and entry counts.
pbi-search sources
pbi-search sources --json
pbi-search sources --json | jq '.[] | select(.stale) | .id'
Configuration
Config file: ~/Library/Application Support/pbi-search/config.json (macOS) · ~/.config/pbi-search/config.json (Linux)
Override location via env: TE_DOCS_CONFIG_DIR=/path/to/dir
{
"github_token": "ghp_...",
"te_blog_local_path": "/path/to/te-blog-content/articles",
"http_timeout_secs": 10,
"max_results": 10,
"stale_after_days": 7,
"source_stale_overrides": { "dax-guide": 30, "te-blog": 3 },
"ms_learn_filter_paths": ["/power-bi/", "/fabric/", "/analysis-services/"],
"default_sources": ["te-docs", "ms-learn", "dax-guide", "te-blog"]
}
github_token raises the GitHub API rate limit from 60 to 5,000 req/hr — recommended for frequent syncs.
Agent use
All commands support --json. The --quiet flag suppresses progress on stderr.
Search response:
{
"results": [
{
"source": "te-docs",
"source_name": "Tabular Editor Docs",
"title": "Creating Measures",
"url": "https://docs.tabulareditor.com/features/creating-measures",
"section": "Features",
"excerpt": "Measures are DAX expressions...",
"_score": 0.92
}
],
"warnings": ["sqlbi: manifest is 9 days old — run 'pbi-search sync --source sqlbi'"]
}
Fetch response:
{
"url": "https://dax.guide/calculate/",
"source": "dax-guide",
"content": "# CALCULATE\n\n...",
"truncated": false
}
Exit codes: 0 = success · 1 = error
Notes
ms-learncallshttps://learn.microsoft.com/api/mcp— the same public endpoint used by the VS Code Copilot extension. No API key required.- Live integration tests (hits real URLs):
cargo test --features live_tests --test live
Kurt Buhler · Data Goblins · part of Tabular Editor