Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>CodePacker AI: Codebase to TXT for AINew to Visual Studio Code? Get it now.
CodePacker AI: Codebase to TXT for AI

CodePacker AI: Codebase to TXT for AI

KiranLabs

|
3 installs
| (0) | Free
Instantly export full codebases or selected folders to clean TXT or clipboard for AI prompting (ChatGPT, Claude, Gemini, DeepSeek). By KiranLabs.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info
CodePacker AI Icon

CodePacker AI

Codebase to TXT & Clipboard for AI Models

Developed by KiranLabs

Version License: MIT Pure JavaScript

Supercharge your AI development workflow. Export entire codebases or selected folders into a structured, token-efficient .txt file or instant clipboard copy.


🌟 Why CodePacker AI?

When using AI models like ChatGPT, Claude 3.5, Gemini 1.5 Pro, or DeepSeek, the quality of their answers depends directly on giving them clean, complete codebase context. Manually copying files is slow, tedious, and prone to missing critical imports.

CodePacker AI solves this instantly:

  • ⚡ One-Click Export: Right-click any directory, file, or export your whole workspace.
  • 📋 Direct to Clipboard: Instantly copies with statistics, ready to Ctrl + V into your AI chat.
  • 🌳 Automatic Project Tree: Generates a clean ASCII file tree at the top of the context so the AI understands your directory structure and file hierarchy.
  • 🛡️ Intelligent Filtering: Automatically respects .gitignore, skips node_modules, .git, build output, lock files, and binary files (images, audio, PDFs, archives).
  • 📊 Token & Line Stats: Gives you accurate file, line, and estimated token counts before sending.

🚀 Quick Usage

1. File Explorer (Right-Click)

Right-click on any folder or file in VS Code's sidebar and choose:

  • CodePacker AI: Export to .txt File and Copy to Clipboard (Recommended)
  • CodePacker AI: Export Codebase to .txt File
  • CodePacker AI: Copy Codebase to Clipboard

2. Command Palette

Press Ctrl + Shift + P (or Cmd + Shift + P on Mac) and type:

CodePacker AI

📄 Output Preview

Here is an example of what CodePacker AI generates (with folder locations and code line numbers):

================================================================================
CODEBASE EXPORT FOR AI
Project: my-project
Generated: 2026-09-27 23:38:00
Total Files: 3
Total Lines: 120
Total Size: 4.2 KB
Estimated Tokens: ~1,050 tokens
================================================================================

================================================================================
PROJECT DIRECTORY & FOLDER STRUCTURE:
================================================================================
└── 📁 src/
    ├── 📁 components/
    │   └── 📄 Button.jsx
    ├── 📄 index.js
    └── 📄 utils.js

================================================================================
FILE CONTENTS (WITH LINE NUMBERS & LOCATIONS):
================================================================================

================================================================================
FILE: src/components/Button.jsx
LOCATION: src/components/
FILENAME: Button.jsx
LINES: 24 | SIZE: 0.85 KB
--------------------------------------------------------------------------------
   1 | import React from 'react';
   2 | 
   3 | export const Button = ({ label, onClick }) => {
   4 |   return (
   5 |     <button className="btn-primary" onClick={onClick}>
   6 |       {label}
   7 |     </button>
   8 |   );
   9 | };

⚙️ Settings & Customization

Configure preferences under VS Code Settings (Ctrl + , -> search CodePacker AI):

Setting Default Description
aiCodePacker.outputFileName codebase_ai_context.txt Base name for exported file
aiCodePacker.appendTimestamp true Creates unique date/time stamped file on each run
aiCodePacker.includeLineNumbers true Aligned line numbers while strictly preserving code indentation
aiCodePacker.outputFormat txt Format: 'txt' (clean ASCII dividers) or 'markdown' (fenced code blocks)
aiCodePacker.includeDirectoryTree true Include visual directory tree with folders and files
aiCodePacker.respectGitignore true Automatically parse .gitignore rules
aiCodePacker.maxFileSizeKB 1024 Skip files exceeding this limit (in KB)
aiCodePacker.additionalIgnorePatterns Lock files & minified files Extra glob patterns to exclude

📦 About KiranLabs

KiranLabs builds developer tooling to make programming with AI fast, seamless, and reliable.

More extensions from KiranLabs coming soon!


📄 License

MIT License. Free to use, modify, and distribute.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft