Bruce Doc Converter
Agent-facing document converter CLI.
When to use
Use this skill when the user asks to:
- Convert
.docx,.xlsx,.pptx,.pdf, or.mdfiles. - Read, summarize, inspect, or analyze Office/PDF documents.
- Export Markdown as Word.
- Process uploaded document files whose content the agent cannot directly read.
Installation
First, check if bdc is already available:
command -v bdc # macOS / Linux
where bdc # Windows
If not installed, try the following in order — stop at the first that succeeds:
# 1. pipx (preferred — isolated, bdc lands in PATH)
pipx install bruce-doc-converter
# 2. uv (if available — fast, isolated, bdc lands in PATH)
uv tool install bruce-doc-converter
# 3. pip --user (most universally available, bdc lands in PATH)
pip install --user bruce-doc-converter # or: python3 -m pip install --user bruce-doc-converter
# 4. venv fallback (works everywhere, but bdc will NOT be in PATH)
python3 -m venv .venv
.venv/bin/pip install bruce-doc-converter
# Windows: .venv\Scripts\pip install bruce-doc-converter
venv note: If you used the venv fallback, replace every
bdccommand below with.venv/bin/bdc(macOS/Linux) or.venv\Scripts\bdc(Windows).
Windows note: Use
pythoninstead ofpython3if the former is not recognized.
Command
Run:
bdc convert "<file>"
For batch conversion:
bdc batch "<directory>"
For Markdown to Word, initialize the Node.js dependencies explicitly before first use:
bdc setup-node
The CLI prints JSON to stdout by default. Progress logs may appear on stderr.
Output handling
Parse stdout as JSON.
On success:
successistrue.output_pathpoints to the generated file.- Office/PDF inputs include
markdown_contentfor direct analysis. .mdinputs produce a.docxfile and may omitmarkdown_content.
On failure:
successisfalse.- Use
error_code,retryable, optionalnext_command,error, and optionalsuggestionto decide the next step. - Do not pre-check Python dependencies. Run the command first and react to JSON failure.
- If Markdown to Word returns
DEPENDENCY_INSTALL_REQUIRED, runnext_commandwhen present, otherwise runbdc setup-node, then retry. bdc setup-nodeis idempotent and may returnalready_installed: truewithinstall_action: "skipped".
Troubleshooting installation
| Error | Cause | Fix |
|---|---|---|
SOCKS support / proxy connection error | all_proxy or http_proxy env vars set | Run unset all_proxy http_proxy https_proxy (macOS/Linux) or set all_proxy= (Windows CMD), then retry |
command not found: pipx | pipx not installed | Try uv tool install or pip install --user instead |
externally-managed-environment | Python 3.11+ system Python forbids global pip | Use pipx, uv tool install, or the venv fallback |
| Permission denied | No write access to install location | Add --user flag, or use venv fallback |
bdc: command not found after venv install | venv bin not in PATH | Use full path: .venv/bin/bdc (macOS/Linux) or .venv\Scripts\bdc (Windows) |
Supported formats
| Input | Output |
|---|---|
.docx | Markdown |
.xlsx | Markdown |
.pptx | Markdown |
.pdf | Markdown |
.md | Word .docx |