Shoving 50 k lines of code into ChatGPT?

RepoSnap flattens the whole thing into one prompt‑ready file in < 10 s.

Below I show exactly how it works—and why you can ditch those brittle Bash scripts and bloated SaaS alternatives.


Why RepoSnap exists

  • Token ceilings Large‑language models accept 100 k + contexts, but practical accuracy slides off a cliff once you blow past ≈ 60 k tokens. Keeping prompts lean matters.
  • DIY scripts Bash or Python one‑offs work, yet they're brittle, non‑visual, and painful to tweak when you need to exclude dist/ or __snapshots__/.
  • Existing options Subscription tools can feel like overkill if you just need a clean, local snapshot.

RepoSnap delivers a visual picker, instant token feedback, and a single consolidated file—no telemetry, no subscription (one‑time license, first 3 projects free), and zero setup gymnastics.


Ten‑second demo

RepoSnap demo gif

  1. Select your repo folder.
  2. Review the tree—checkboxes let you prune tests, mocks, or any noisy sub‑dirs.
  3. Copy Snapshot—the flattened output is now on your clipboard, ready for ChatGPT, Claude, Gemini, you name it.

Architecture at a glance

Rust core   →  ultra‑fast tree‑walk + token count + file watching
Tauri shell →  native app wrapper, auto‑updates
React UI    →  file‑tree visualisation + controls

Everything runs locally—zero network calls.


The flatten algorithm (Rust, abridged)

The core logic reads the files selected in the UI, respects your .gitignore (plus some defaults like node_modules/), checks for binary content, and formats the output.

// Simplified representation of building the snapshot string
fn build_snapshot_string(selected_paths: &[PathBuf]) -> String {
    let mut output = String::from("\n");

    for path in selected_paths {
        if path.is_file() {
            let extension = path.extension().and_then(|s| s.to_str()).unwrap_or("");
            let file_header = format!("File: {}\n", path.display());
            output.push_str(&file_header);

            output.push_str("```

");
            output.push_str(extension);
            output.push('\n');

            if is_likely_binary(path) { // Hypothetical function
                output.push_str("[Binary file]\n");
            } else {
                match std::fs::read_to_string(path) {
                    Ok(content) => {
                        output.push_str(&content);
                        if !content.ends_with('\n') {
                            output.push('\n');
                        }
                    }
                    Err(_) => output.push_str("[Could not read content]\n"),
                }
            }
            output.push_str("

```\n\n");
        }
    }
    output.push_str("");
    output
}


`

tiktoken-rs gives a live token estimate; the UI turns orange past 50 k and red past 60 k.


Everyday wins

Scenario RepoSnap advantage
"Explain this legacy app" in GPT‑4o Paste one trimmed file—no scrolling, no omissions
License audits Regex the snapshot, skip IDE indexing
Pre‑merge code reviews Send reviewers a single diff‑safe snapshot
Docs / blog generation Feed your entire codebase to an LLM summariser

Getting started

Want to see it in action without installing? Try the live web demodemo.reposnap.io

  1. Download the DMG / EXE / AppImage from reposnap.io.
  2. Open → pick your repo folder.
  3. Copy Snapshot → paste into your favourite model.

No brew install, no npm i, no API keys.


Limitations & roadmap

  • Signed Windows build pending certificate turnaround.
  • Custom ignore rules and additional filtering
  • More integrations (VS Code extension, etc.)? → Suggest features here!

Transparency beats hype; hold me to this list.


TL;DR

RepoSnap slashed my prompt‑prep time by ~80 % and retired a graveyard of shell scripts.

🎁 Grab the latest buildreposnap.io

💬 I'm @ShipWithAlex on X—DM feedback, feature requests, or benchmarks.

Happy flattening.