CodeWeaver – Turn Any Codebase Into a Single Markdown Doc
Transform any codebase into a single navigable Markdown doc for AI tools. Go CLI, MIT licensed, with file filtering and clipboard support.
TL;DR
TL;DR: CodeWeaver is a Go CLI that recursively scans a directory and outputs the entire codebase as a single, tree-structured Markdown document — ready to paste into any AI tool.
Source and Accuracy Notes
⚠️ This section is MANDATORY. All links must be verified from actual source, not guessed.
- Project page: tesserato.web.app
- Source repository: github.com/tesserato/CodeWeaver — README read and verified
- License: MIT (verified via repository
License: MITbadge) - GitHub stars: 737 · Forks: 58 · Default branch: main · Last push: 2025-12-04
What Is CodeWeaver?
CodeWeaver is a command-line tool written in Go that transforms an entire directory tree into a single, navigable Markdown document. Each file appears as a named code block within the overall document structure, preserving directory hierarchy via Markdown headings.
The core idea: instead of copying individual files or zipping a project to share with an AI, you run one command and get one text file you can paste directly into ChatGPT, Claude, or any other AI assistant.
Setup Workflow
Step 1: Install
Using go install (Recommended):
go install github.com/tesserato/CodeWeaver@latest
Requires Go 1.18 or later.
From pre-built executables:
Download from the releases page, then:
chmod +x codeweaver # On Linux/macOS
Step 2: Basic Usage
codeweaver -input /path/to/project -output codebase.md
By default, the output file is named codebase.md.
Step 3: Filter Files
Ignore patterns (blacklist):
codeweaver -ignore "\.git.*,node_modules,*.log"
Include patterns (whitelist):
codeweaver -include "\.go$,\.md$"
When -include is used, only paths matching the regex patterns are included; everything else is excluded by default.
Step 4: Copy to Clipboard
codeweaver -clipboard
This copies the generated Markdown directly to the system clipboard — no manual file opening needed before pasting into an AI prompt.
Practical Evaluation Checklist
- Works on any language codebase (uses file extension for syntax highlighting)
- No dependencies beyond the Go runtime
- Output is a single
.mdfile — no special viewer required - Regex filtering prevents leaking credentials, logs, or build artifacts
- MIT license — free for commercial use
Security Notes
CodeWeaver reads files locally and writes Markdown output. Use -ignore to exclude sensitive paths:
codeweaver -ignore "\.git.*,node_modules,\.env,secrets.*"
Do not feed generated Markdown from public repos into AI tools without reviewing the content — build artifacts and credentials sometimes slip through naive ignore patterns.
FAQ
Q: Does this work on very large codebases?
A: CodeWeaver processes files sequentially. Very large repos (100k+ files) may produce extremely long documents that exceed AI context windows. Use -include to restrict output to source files only.
Q: Which languages are supported for syntax highlighting? A: CodeWeaver uses file extensions to assign language labels to code blocks. Any language with a standard extension is supported.
Q: Can I track which files were included or excluded?
A: Yes. Use -included-paths-file and -excluded-paths-file to log the full lists.
Q: Is there a size limit on the output?
A: No hard limit, but most AI tools truncate or slow down dramatically above 100K tokens. Filter aggressively with -include for large codebases.
Conclusion
CodeWeaver is a single-purpose, dependency-free Go tool that solves one real problem: getting a full codebase into an AI context window without zip files or individual copy-pasting. MIT licensed, runs anywhere Go does, and the entire output is a plain Markdown file any AI can parse immediately.
Run it with -clipboard and paste directly into your next debugging or code review session.
Source and Accuracy Notes
- Project page: tesserato.web.app
- Source repository: github.com/tesserato/CodeWeaver
- License: MIT (verified via GitHub API
license.spdx_id) - GitHub stars: 737, Forks: 58 (verified via GitHub API)
- Last push: 2025-12-04 (verified via GitHub API
pushed_at)
Related Posts
dev-tools
Automotive Skills Suite for AI Engineering
Evaluate Automotive Skills Suite for APQP, ASPICE, HARA, safety-plan, and DIA workflows with setup notes, governance risks, and SME review guidance.
5/28/2026
dev-tools
awesome-agentic-ai-zh Roadmap Guide
Explore awesome-agentic-ai-zh as a Chinese agentic AI learning roadmap, with setup notes, track selection, study workflow, and evaluation guidance.
5/28/2026
dev-tools
Baguette iOS Simulator Automation Guide
Set up Baguette for iOS Simulator automation, web dashboards, device farms, gesture input, streaming, and camera testing with Xcode caveats.
5/28/2026