Prepare file context and directory maps for models like ChatGPT, Claude, or Gemini within VS Code. Drag files into organized tracks to copy project context in one action.
- Install the extension from the VS Code Marketplace.
- Open the Stackr view in the Activity Bar.
- Stage files by dragging them into the Staged Files panel, or right-click any file in the Explorer to add it directly.
- Quick add files with Ctrl+Alt+A / Cmd+Opt+A. Use Ctrl+A to select all or Ctrl+Space to toggle individual items in the picker.
- Preview the context with Ctrl+Shift+V / Cmd+Shift+V.
- Copy with Ctrl+Shift+C / Cmd+Shift+C when focused on the Staged Files view.
- Paste into the model.
Press F1 and type "Stackr" to see all available commands.
- Token counting: live counts as you type, with large files analyzed in the background
- Persistence: staged files survive session restarts and load automatically on open
- Folder syncing: rescan all staged folders or sync individual folders from their context menu
- Auto-sync: renames and deletes reflect automatically as the project structure changes
- Multi-root support: works with GitHub Codespaces, WSL2, and SSH Remote sessions
Create separate tracks for different tasks, for example "Bug Fix #123" or "Refactor Auth." Each track maintains its own staged file list.
- Switch tracks with Ctrl+Alt+S / Cmd+Opt+S
- Rename inline with F2
- Reorder by dragging or with Alt+↑↓ / Option+↑↓
- Pin files to keep them through a Clear Stack
- Show Pinned Only filters the view, and copy commands respect that filter
- Press Space to toggle pin on selected files
Copied output optionally includes an ASCII directory tree:
# Context Map
├── components
│ ├── Header.tsx
│ └── Footer.tsx
└── utils
└── api.ts
- Amber above 5,000 tokens
- Red above 10,000 tokens
Both thresholds are configurable in settings.
The most common commands and their default keybindings. Press F1 and type "Stackr" to see the full list.
| Command | Description | Keybinding |
|---|---|---|
Copy Stack |
Copy all staged content respecting active filters. | Ctrl+Shift+C / Cmd+Shift+C |
Copy and Clear Stack |
Copy context then clear unpinned files. | Ctrl+X / Cmd+X (when focused) |
Preview Context |
Open a Markdown preview of the current stack. | Ctrl+Shift+V / Cmd+Shift+V |
Add Files |
Open the file picker. | Ctrl+Alt+A / Cmd+Opt+A |
Switch Track |
Switch the active track. | Ctrl+Alt+S / Cmd+Opt+S |
All settings are prefixed with aiContextStacker in settings.json.
| Setting | Default | Description |
|---|---|---|
aiContextStacker.excludes |
[] |
Glob patterns to exclude from file operations. |
aiContextStacker.defaultExcludes |
[] |
Base exclude patterns applied to all tracks. |
aiContextStacker.largeFileThreshold |
5000 |
Token count for the amber warning. Red at 2x this value. |
aiContextStacker.showTreeMap |
true |
Include the ASCII directory tree in copied output. |
aiContextStacker.showTreeMapHeader |
true |
Show the header above the tree map. |
aiContextStacker.treeMapText |
# Context Map |
Custom header text for the tree map. |
aiContextStacker.includeFileContents |
true |
Include file contents in copied output. |
aiContextStacker.showFileContentsHeader |
true |
Show the header above file contents. |
aiContextStacker.fileContentsText |
# File Contents |
Custom header text for file contents. |
aiContextStacker.logLevel |
INFO |
Output channel verbosity. Options: DEBUG, INFO, WARN, ERROR. |
- Output is capped at 100MB
- Files over 5MB are excluded from context
- Token counts are approximate and may differ from model-specific tokenizers
- Binary files are skipped automatically
- Issues: GitHub Issues
- Changelog: CHANGELOG.md
