GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - alpha912/codebase-md: CodebaseMD: A VS Code extension that converts codebases into structured Markdown documentation, optimized for LLMs and agentic coding tools. Features include syntax highlighting, directory visualization, project statistics, and our unique Micro Export format that intelligently condenses code into semantic patterns. Ideal for AI-assisted coding.

BranchesTags
Open more actions menu

Latest commit

 

History

26 Commits
26 Commits

Folders and files

NameName
Last commit message
Last commit date
.github
.github
 
 
CodebaseMD-Web
CodebaseMD-Web
 
 
LICENSES
LICENSES
 
 
assets
assets
 
 
docs
docs
 
 
releases
releases
 
 
scripts
scripts
 
 
src
src
 
 
.editorconfig
.editorconfig
 
 
.gitattributes
.gitattributes
 
 
.gitignore
.gitignore
 
 
.vscodeignore
.vscodeignore
 
 
AGENTS.md
AGENTS.md
 
 
CHANGELOG.md
CHANGELOG.md
 
 
CODE_OF_CONDUCT.md
CODE_OF_CONDUCT.md
 
 
CONTRIBUTING.md
CONTRIBUTING.md
 
 
LICENSE.md
LICENSE.md
 
 
README.md
README.md
 
 
REUSE.toml
REUSE.toml
 
 
SECURITY.md
SECURITY.md
 
 
SUPPORT.md
SUPPORT.md
 
 
biome.json
biome.json
 
 
bun.lock
bun.lock
 
 
package.json
package.json
 
 
tsconfig.json
tsconfig.json
 
 

Repository files navigation

CodebaseMD

CodebaseMD is a VS Code extension that exports a workspace, a selection or your Git changes as one Markdown, XML or plain-text document, ready to paste into an AI assistant or a review.

Download · Documentation · Changelog · Contributing · Security · Support

Latest release CI Visual Studio Marketplace License: MIT REUSE compliant

Status: 4.0.0 is the current release and requires VS Code 1.146 or later. On an older VS Code, or a fork based on one, use 3.0.0, which runs on 1.70 and later. See the changelog and the limitations.

Contents

  • What CodebaseMD is
  • A short example
  • Install
  • Commands
  • Settings
  • Choosing what is shared
  • How it works
  • Limitations
  • Repository layout
  • Development
  • Documentation
  • Contributing
  • License

What CodebaseMD is

Giving an assistant or a reviewer the right code usually means copying files one at a time. CodebaseMD does it in one step: pick a scope, and it writes a single document with a folder tree, per-language statistics, a token estimate and the contents of each file.

  • Scopes: the workspace, selected files and folders, changes against HEAD, or the current file (including unsaved edits).
  • Formats: Markdown with a linked contents list, escaped XML, or plain text.
  • Destinations: a file, the clipboard, or a new editor tab.
  • Content modes: full source, a compact Micro summary, or a declaration skeleton, for fitting more files into a context budget.
  • Guard rails: recognizable secrets are redacted by default, ignore rules are respected, symbolic links are not followed, and a warning appears before an export exceeds your token budget.

CodebaseMD runs entirely on your machine. It does not upload source code, call an AI provider or collect telemetry.

A short example

A workspace with three files:

├── .env
├── README.md
└── src/
    └── greet.ts

.env holds a token:

API_TOKEN="sk_live_abc…"

Run CodebaseMD: Export Wizard, choose Workspace → Full → Markdown → Clipboard, and paste.

The token is replaced before the export leaves the editor, and the summary line reports one redaction.

# Project Export

3 files | 28 estimated content tokens (characters / 4) | 1 redactions | full mode

## Languages

| Language | Files | Estimated tokens |
| --- | ---: | ---: |
| dotenv | 1 | 7 |
| markdown | 1 | 2 |
| typescript | 1 | 19 |

## Contents

- [\.env](#file-1) — dotenv, ~7 tokens
- [README\.md](#file-2) — markdown, ~2 tokens
- [src/greet\.ts](#file-3) — typescript, ~19 tokens

### \.env

```dotenv
API_TOKEN="***REDACTED***"
```

### src/greet\.ts

```typescript
export function greet(name: string): string {
  return `Hello, ${name}`;
}
```

The output above is abridged: a real export also lists the largest files and the folder tree. XML and plain-text exports carry the same information.

Install

  1. Download the .vsix from GitHub Releases. A SHA-256 checksum is published next to it.
  2. In VS Code, open Extensions → … → Install from VSIX… and select the file.
  3. Open a local folder and run CodebaseMD: Export Wizard from the Command Palette.

The extension is also on the Visual Studio Marketplace. Marketplace publication is a separate step and can lag behind GitHub Releases. Git is needed only for Git exports. See installation for details.

Commands

Command Palette title What it does
CodebaseMD: Export Wizard Four steps: scope, content mode, format, destination
CodebaseMD: Export Git Changes Files changed against HEAD plus untracked files, using your settings
CodebaseMD: Copy Current File Copies the active saved file, including unsaved edits
Export Codebase as Markdown Whole workspace folder to a Markdown file
Export Selected as Markdown Selected files and folders to a Markdown file
Export Micro Codebase Whole workspace folder as a Micro summary
Export Selected as Micro Codebase Selected files and folders as a Micro summary

The two selected-export commands also appear in the Explorer context menu. Multi-root workspaces prompt for one folder per export. Usage walks through each command.

Settings

Search for CodebaseMD in Settings. Every key has the codebaseMD. prefix and can be set per workspace folder.

Setting Default Meaning
format markdown markdown, xml or text
contentMode full full, micro or skeleton
target file file, clipboard or editor
tokenBudget 32000 Warn above this estimate; 0 disables the warning
redactSecrets true Replace recognizable secrets before exporting
maxFileSizeKB 1024 Largest file content or diff to include, in KiB
exclude [] Extra gitignore-style patterns to leave out entirely
respectGitignore true Apply root and nested .gitignore files
includeDiff false Add tracked-file diffs to Git exports
lineNumbers false Number the lines of the exported representation
customHeader empty Text added to the top of each export, such as your task

The wizard starts from these values. The four original commands always save Markdown in their full or Micro mode, and Copy Current File always uses the clipboard. Configuration has examples.

Choosing what is shared

Rule Effect
.gitignore (root and nested) and codebaseMD.exclude Matching files are left out entirely, including their paths
.codebaseignore in the workspace root Matching files keep their path in the tree; their content is omitted
Built-in exclusions Dependency and build directories, lockfiles, archives and codebase-export.* are skipped
Size and binary checks Oversized and binary files get an omission notice instead of content
Symbolic links and junctions Never followed, even when selected explicitly

The same rules apply to explicit selections and to Git exports.

How it works

VS Code command ──► config.ts ──► exporter.ts ──► formatters.ts ──► file / clipboard / editor
   (extension.ts)   validated      │
                    settings       ├─ fsUtils.ts   ignore rules, containment, directory walk
                                   ├─ git.ts       changed files and filtered diffs
                                   ├─ secrets.ts   redaction, before any transformation
                                   ├─ analyzer.ts  Micro summaries, language mapping
                                   ├─ skeleton.ts  declaration outlines
                                   └─ tokens.ts    characters / 4 estimate

Only extension.ts and config.ts touch VS Code APIs. The export pipeline is plain Node code, which is why the unit tests can run it against temporary directories and Git repositories without an editor. Nothing is written until the export has been prepared and the budget check has passed. Architecture describes each stage and the safety properties it keeps.

Limitations

  • Token estimates are ceil(characters / 4), not a model tokenizer. Real usage can differ substantially.
  • Secret redaction is heuristic. It recognizes common provider tokens, JWTs, private keys and password or token assignments; it can miss secrets and can redact ordinary values. Review exports before sharing them. Paths stay visible unless excluded.
  • Micro and skeleton modes use regular expressions, not language parsers. They can miss multiline declarations or misread signatures. Use full mode when exact source matters.
  • Git exports reflect the disk and index against HEAD. Unsaved buffers do not select a file, diffs do not include untracked files, and Git exports require a trusted workspace.
  • Workspaces must be local folders, one folder per export. Virtual filesystems and untitled files are not supported.
  • Platforms: CI covers Linux and Windows. macOS is expected to work but is not tested in CI.

Repository layout

Path Contents
src/ Extension source; one module per pipeline stage
src/test/unit/ Unit tests for the pipeline and helpers (no VS Code needed)
src/test/suite/ Tests that run inside a VS Code extension host
docs/ User and developer documentation
releases/ Release notes per version, and VSIX files of releases before 3.0
scripts/ Release publishing script used by CI
assets/ Icon, logo and banner
.github/ CI workflow, Dependabot, issue and pull request templates
CodebaseMD-Web/ Placeholder for a separate web prototype; not part of the extension

Development

You need Bun 1.4+, Node.js 22.12+ (24 recommended) and Git.

bun install --frozen-lockfile
bun run check              # Biome lint and format check, then unit tests
bun run test:integration   # extension-host tests (Linux: prefix with xvfb-run -a)
bun run package            # build the VSIX

CI runs the same steps on Linux and Windows, audits dependencies, checks REUSE licensing metadata and keeps the built VSIX as an artifact. See CONTRIBUTING.md for the workflow and AGENTS.md for a short guide aimed at coding agents.

Documentation

Document For
Installation Installing and verifying the extension
Usage Each command, step by step
Configuration Settings, ignore files and limits
Micro export format The compact summary notation
Troubleshooting Common problems and fixes
Architecture Pipeline stages and safety properties
Developer reference Modules, command IDs and the exportCodebase contract
Changelog and release notes What changed in each version

Contributing

Bug reports, fixes and documentation improvements are welcome. Start with CONTRIBUTING.md; use the issue templates for bugs and ideas, and SECURITY.md for vulnerabilities. Everyone taking part is expected to follow the Code of Conduct.

License

MIT © Alphin Tom. The repository follows the REUSE specification: source files carry SPDX headers and REUSE.toml covers the rest. The Code of Conduct is adapted from the Contributor Covenant under CC BY 4.0.

About

CodebaseMD: A VS Code extension that converts codebases into structured Markdown documentation, optimized for LLMs and agentic coding tools. Features include syntax highlighting, directory visualization, project statistics, and our unique Micro Export format that intelligently condenses code into semantic patterns. Ideal for AI-assisted coding.

marketplace.visualstudio.com/items?itemName=alpha912.codebase-md

Topics

code-analysiscode-exportcode-sharingcodebase-visualizationdeveloper-toolsdocumentationmarkdownproductivityproject-documentationvscode-extension

Resources

Readme
MIT license

Code of conduct

Code of conduct

Contributing

Contributing

Security policy

Security policy
Activity

Stars

18 stars

Watchers

1 watching

Forks

2 forks
Report repository

Releases

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.