zero dependencies · pure Node.js

2chatty

Pick your source files. Dump them into markdown. Feed your AI.

Working with AI assistants outside your IDE? Context windows are precious. 2chatty lets you hand-pick exactly the files that matter, bundle them into a single chat.md file, and attach it directly to any AI chat — giving the model exactly the context it needs, nothing more.

View on GitHub
npx @avol-io/2chatty ts tsx

Run from your project root. Requires Node.js ≥ 18.

zsh — my-project

One command. One file. Any AI.

Run the tool, pick your files interactively, and get a ready-to-attach markdown document.

terminal
npx @avol-io/2chatty ts tsx
◆ File Collector exts: ts, tsx
Selected: 3 / 24
[~] ▾ src/ (18 files)
  [✓] Button.tsx
  [✓] Input.tsx
  [ ] ▸ hooks/ (6)
  [✓] app.ts
✓ Done! Appended 3 file(s) → chat.md
appended to
📄 chat.md
### `src/Button.tsx`
tsx
import React from 'react';
interface ButtonProps {
• • •
### `src/Input.tsx`
tsx
export const Input = ({
  value, onChange
• • •
### `src/app.ts`
ts
import { createApp } from './';
const config: AppConfig = {
• • •
### `src/Button.tsx`
tsx
import React from 'react';
interface ButtonProps {
• • •
### `src/Input.tsx`
tsx
export const Input = ({
  value, onChange
• • •
### `src/app.ts`
ts
import { createApp } from './';
const config: AppConfig = {
• • •
Zero dependencies

Pure Node.js built-ins only — no packages to install or audit. Requires only Node.js ≥ 18.

🎯
Surgical context control

Hand-pick files down to the individual level. Keep your AI context window focused on what matters.

🌲
Smart tree traversal

Traverses your entire project tree, automatically skipping node_modules, build artifacts, and common IDE folders.

🔌
Any AI, any chat

Output is plain markdown. Works with ChatGPT, Claude, Gemini, or any tool that accepts file attachments.

📁
Progressive context building

Run it multiple times with different filters and selections — each run appends to chat.md.

🔍
Filter by extension

Pass extensions as arguments or collect all files. Either way, the interactive UI lets you refine the selection.

Example commands

Run from your project root. No global install needed.

npx @avol-io/2chatty ts tsx TypeScript + React — collect only .ts and .tsx files
npx @avol-io/2chatty js java JavaScript + Java — mix languages freely
npx @avol-io/2chatty ts tsx scss json Full-stack sweep — include styles and config
npx @avol-io/2chatty No filter — collect all files (will prompt for confirmation first)

Output is appended to chat.md in your current directory. Delete it manually to start fresh.

Shortcuts

Full keyboard control — no mouse required.

/
Move cursor up / down
Expand folder or enter first child
Collapse folder or jump to parent
Space
Toggle file — or bulk-toggle all files in folder
A
Select all / deselect all
E
Expand all folders
W
Collapse all folders
PgUp/PgDn
Scroll one page up / down
Home/End
Jump to first / last item
Enter
Confirm selection and write chat.md
Q/Ctrl+C
Quit without writing