# FileConcat documentation
Index: https://fileconcat.com/llms.txt
Generated from the MDX sources at https://github.com/CeamKrier/file-concat. Every page below is the
raw Markdown content of the corresponding doc on fileconcat.com/docs.
# Getting started
---
title: "Introduction - what FileConcat is and how it works"
description: "FileConcat packs the files you pick into one LLM-ready document, as XML, Markdown or plain text. What it gives you, how it works, the sources it reads, and where to go next."
---
# Introduction
FileConcat is a privacy-first tool that packs the files you pick into a
single LLM-ready bundle. The output is one XML, Markdown, or plain-text file you
can paste into Claude, ChatGPT, Gemini, or any other assistant that
takes long-form context.
## What it gives you
- A single page at [fileconcat.com](https://fileconcat.com) to drop,
filter, and copy files.
- A published npm CLI (`pnpm add -g @fileconcat/cli`, or
`npx @fileconcat/cli`) for the same flow from a shell.
- Live token counting with OpenAI's `o200k_base` tokenizer, so you
know how much of your context window the output consumes
before you paste it.
- Text extraction from documents: drop a PDF, Word, Excel or PowerPoint
file, or [any other format it reads](/docs/formats), and its text is
pulled out and included automatically, in your browser. Your files
are not uploaded to us. Audio and video can be transcribed on request.
- The same for files that are technically text but unreadable as text.
A Jupyter notebook arrives as markdown instead of JSON wrapped around
base64 plots. An `.srt` or `.vtt` caption track arrives as the
transcript instead of a timestamp every two seconds. A saved `.eml`
message arrives as the correspondence instead of MIME boundaries and
base64 attachments.
- A [send check](/docs/send-check) before you paste: API keys, tokens
and private keys found in the bundle are replaced with a placeholder,
database passwords and the emails, IBANs and card numbers in documents
are listed for you to mask, and names you list are hidden everywhere.
## How it works
Your files are not uploaded to us. The whole thing runs in your browser,
with no upload step and no intermediate server. Anonymous usage
analytics do run, and the [privacy page](/privacy) says what they see.
The core library (`@fileconcat/core`) is the same on fileconcat.com and
in the CLI. What differs is the surface you drive it from.
## Supported sources
You can feed FileConcat from any of these:
- Local files and folders, dropped in or chosen with the file picker
- GitHub repositories, including subdirectories
- GitHub Gists
- GitLab repositories, including nested groups
- GitLab Snippets
- Bitbucket repositories
- Any other public URL via the URL fallback adapter
## Next steps
- [Quick start](/docs/quick-start) walks through the first import.
- [File filtering](/docs/file-filtering) covers the filter box, the
type chips and the glob patterns that narrow the output.
- [Token estimation](/docs/token-estimation) explains the counter and
the model selector.
---
---
title: "Quick start - from a folder to a pasteable bundle"
description: "Two paths to a filtered, tokenised bundle in under a minute: drop local files or archives, or paste a remote repository URL. Then filter and emit."
---
# Quick start
You can be looking at a tokenised, filtered project bundle in under a
minute. The two paths below cover almost every use.
## Path 1: local files
1. Open [fileconcat.com](https://fileconcat.com).
2. Drop a folder, files, or an archive (zip, 7z, rar, tar and
[the others it unpacks](/docs/formats)) onto the drop zone on the landing
page, or use **Browse files** / **Browse folder**. Archives are unpacked
automatically and their contents flow through the same filtering.
3. FileConcat narrates the work (reading your files, skipping noise,
counting tokens) and then lands on the result screen, "Your bundle is
ready." The screen shows the files combined, the token count, and how
much noise was skipped.
4. Click **Copy** or **Download** to take the output with you. Either
way you get the whole bundle as one file.
## Path 2: remote source
1. On the landing page, find the link field under the drop target.
2. Paste a repository, Gist or page link into it. The field reads the URL
and tells you what it found. The host select next to it only decides
where a bare `owner/repo` goes.
3. Press **Fetch**. FileConcat fetches the files and runs the same
processing as a local drop, then shows the result screen.
4. Adjust and emit as in Path 1.
## Filter and emit
Both paths land on the same result screen:
- The result screen's **Format** control switches the output between
**XML**, **Markdown**, and **Plain**.
- The **Adjust what's included** button in the top bar opens the
**Files** pane. It holds a filter box, By type chips, the file tree
with each file's share, and the **Ignore** and **Only include** glob
textareas. Every change updates the bundle live.
## See also
- [File filtering](/docs/file-filtering) for the pattern syntax.
- [Filter precedence](/docs/filter-precedence) for the four-layer
pipeline that decides what survives.
- [Token costs](/docs/token-costs) for which choices cost tokens.
---
---
title: "What FileConcat reads: every file format, and what each one loses"
description: "Every file format FileConcat reads in your browser, from PDF and scanned pages to Excel, Kindle, Outlook, archives and recordings, with what comes through and what is left out."
---
# What FileConcat reads
Anything that is already text, such as source code, markdown, CSV, JSON or logs, goes into the
bundle as it is. The formats below hold their text inside a container, and FileConcat reads it out
in your browser. Your files are not uploaded to us.
A file is recognised by its first bytes, not its name, so a renamed or extensionless document is
still read. Most formats are read as soon as you drop them. Images and recordings wait until you
ask, because recognition and transcription take seconds to minutes. A recording also needs a
speech model downloaded once, which the [privacy page](/privacy) describes.
A document's own title, when its properties hold one, comes first as `[Title: ...]`. The author's
name and the other properties are left out.
A picture's alternative text, the words its author wrote for a reader who cannot see it, comes
through as `[Image: ...]` where the picture sits (in a saved web page, as a Markdown image), and a table's caption and description as
`[Table: ...]` above the table. In a PDF the figures' text follows the page it is on. A picture
with no alternative text, or only a default name such as "Picture 3", is still left out.
A link comes through as `[text](address)` where it sits, in documents, slides, PDFs and email. In a
spreadsheet the cells come first, then each linked cell as `[Link, B2: address]`. A link to another
place in the same file, or one whose text already is its address, is written as plain text.
Each entry also says what is left out, so you know what the model will not see before you paste.
How well each one reads against other tools, at the latest version measured, is on
[the benchmarks page](/benchmarks). The studies behind it are
[the extraction benchmark](/blog/browser-text-extraction-benchmark) and, for how much of each format comes
through comment by comment and chart by chart against Apache Tika and markitdown,
[markitdown vs Tika](/blog/markitdown-vs-tika-text-extraction).
The [command-line version](/docs/cli-usage) reads fewer of these. This page describes FileConcat in
your browser.
---
# Sources
---
title: "GitHub import - paste a repository URL, get one text bundle"
description: "How FileConcat imports a public GitHub repository: the URL shapes it parses, what one import costs in API requests, what happens when GitHub's limit is used up or a repository is too large, and what happens without an account."
---
# GitHub import
Paste a public GitHub repository URL into the import panel and press
**Fetch**, and FileConcat fetches the file tree on demand. It needs no
GitHub account, and no server sits in between. The same panel opens
[GitHub repo to text](/how-to/github-repo-to-text), next to what 60
public repositories weigh in tokens.
## Supported URL shapes
The GitHub adapter at `packages/core/src/sources/adapters/github.ts`
parses these shapes:
```text
https://github.com/owner/repo
https://github.com/owner/repo/tree/branch
https://github.com/owner/repo/tree/branch/subdirectory
https://github.com/owner/repo/blob/branch/path/to/file.ts
```
A link copied from the address bar works as it is: `www.`, a trailing
slash, `.git`, `?tab=readme-ov-file` and `#readme` are all ignored. Any
other page under the repository, such as its issues, imports the
repository itself. The optional branch defaults to the repository's
default branch when omitted. When a subdirectory or a file is included,
only files at or under that path are imported.
**A branch name containing a slash does not work.** The branch segment
stops at the first slash, so `tree/release/2.0` is read as the branch
`release` with the subdirectory `2.0`. The URL itself is ambiguous and
GitHub resolves it on its own servers; FileConcat does not. If a branch
named `release` also exists you get that branch's `2.0` directory
instead of an error. Import the default branch instead.
[Bitbucket import](/docs/bitbucket-import) is the one source here that
handles slashed branch names, because it resolves the ref to a commit
before it lists anything.
## What one import costs in API requests
One request to `api.github.com` per import: the recursive file tree,
read at `HEAD` when the URL names no branch, which is the default
branch.
File contents do not go through that API at all. They stream from
`raw.githubusercontent.com`, one request per file, twelve at a time
(`DEFAULT_DOWNLOAD_CONCURRENCY` in
`packages/core/src/sources/pooled-map.ts`).
GitHub's documented primary rate limit for unauthenticated REST
requests is 60 per hour, per IP address (GitHub, *Rate limits for the
REST API*, read September 2026). Because the per-file downloads are
served by a different host, **the number of files in a repository is
not what exhausts that budget**. Repeated imports are.
When a request is denied, the message in the import panel comes from
`classifyResponseError`
(`packages/core/src/sources/adapters/_errors.ts`). Status 401, 403 and
429 each carry their own wording, so "rate limited" reads differently
from "private repository". When the limit is used up, the message names
the time GitHub says it resets and links GitHub's own ZIP of the
repository. Download it and drop it into FileConcat: a dropped ZIP is
unpacked in the browser and costs no API request.
For private repositories, download the project to your computer and
drop the folder into FileConcat instead. Token-authenticated imports
are not shipped at the time of writing.
## Very large repositories need the ZIP
GitHub caps a recursive tree at 100,000 entries and 7 MB, and sets
`truncated` on the response when the listing it returned is incomplete
(GitHub, *REST API endpoints for Git trees*, read September 2026).
FileConcat does not bundle a partial repository. GitHub's archive
download does not allow requests from other sites, so a browser tool
cannot fetch it on your behalf. The import stops with a message and a
link to the repository's ZIP: download it and drop it into FileConcat.
## When a download fails
A file that fails to download does not fail the import. Each failure is
recorded with its path and reason, and the rest of the bundle is
assembled without it. Compare the file count in the result against
what you expected.
A 429 whose `Retry-After` hint fits inside 30 seconds is retried once,
automatically. Anything longer surfaces as an error rather than a long
silent wait.
## Raw URLs
Raw file URLs like `https://raw.githubusercontent.com/owner/repo/...`
are not handled by the GitHub adapter. They go to the URL fallback
adapter instead, which downloads the single file you point it at and
shows it in the result screen. Use this for "give me one file from
GitHub" cases.
## Gists
GitHub Gists are handled by a separate adapter that lives next to the
others. URL shape:
```text
https://gist.github.com/owner/gistId
```
The `owner` segment is required by the regex; bare gist URLs without
the owner part are not matched. Gists are flat (no subdirectories);
every file in the gist comes in together.
The same adapter also matches GitLab Snippet URLs; see
[GitLab import](/docs/gitlab-import) for those.
## See also
- [GitLab import](/docs/gitlab-import) and
[Bitbucket import](/docs/bitbucket-import), which reach the same
result through very different request budgets.
- [File filtering](/docs/file-filtering) to narrow the imported tree
before assembling the output.
- [Token estimation](/docs/token-estimation) to keep the import
inside your model's context window.
---
---
title: "GitLab import - paste a project URL, get one text bundle"
description: "How FileConcat imports a public GitLab project: nested group URLs, the paginated tree walk, what the anonymous rate limits allow, and where Snippets go instead."
---
# GitLab import
Paste a public GitLab repository URL into the import panel and press
**Fetch**, and FileConcat fetches the project tree.
## Supported URL shapes
The GitLab adapter at `packages/core/src/sources/adapters/gitlab.ts`
matches `gitlab.com` URLs only. Self-hosted GitLab instances are not
recognised.
```text
https://gitlab.com/owner/repo
https://gitlab.com/group/subgroup/project
https://gitlab.com/owner/repo/-/tree/branch
https://gitlab.com/owner/repo/-/tree/branch/subdirectory
```
GitLab supports nested groups, which means the "owner" segment can
itself be a path of group and subgroup names. The adapter handles
any depth of nesting before the `-/tree/...` marker. A trailing
`.git` is tolerated and stripped.
When a branch is omitted, the project's default branch is read from the
project API. If that lookup fails, the adapter falls back to `main`
rather than giving up. So a project whose default branch is `master`
and whose metadata request was rate limited reports a missing branch,
not a rate limit. Put the branch in the URL to skip the lookup
entirely.
When a subdirectory is included, only files at or under that path are
imported.
**A branch name containing a slash does not work.** The branch segment
after `-/tree/` stops at the first slash, so `-/tree/release/2.0` is
read as the branch `release` with the subdirectory `2.0`. Import the
default branch instead. [Bitbucket import](/docs/bitbucket-import) is
the one source here that handles slashed branch names.
## What one import costs in API requests
Every part of a GitLab import goes through `gitlab.com/api/v4`,
including the file contents. That is the difference from
[GitHub import](/docs/github-import), where only the tree is an API
call.
- One request for the project's default branch, skipped when the branch
is in the URL.
- The tree is paginated at 100 entries per page, so a project with
2,400 entries costs 24 listing requests before a single file is
downloaded. The panel counts files as it walks so a deep tree does
not look frozen.
- One request per file, twelve at a time.
GitLab.com documents 500 requests each minute for unauthenticated
traffic from an IP address, and the same 500 each minute for repository
files (GitLab, *GitLab.com settings*, read September 2026). That is a
per-minute ceiling rather than a small hourly total. What limits a
large project here is how fast the requests go out, not how many files
it has.
When a request is denied, the import panel surfaces a message produced
by `classifyResponseError`
(`packages/core/src/sources/adapters/_errors.ts`). Status 401, 403 and
429 each carry distinct wording. A 429 whose `Retry-After` hint fits
inside 30 seconds is retried once automatically.
A file that fails to download does not fail the import. The failure is
recorded with its path and reason, and the rest of the bundle is
assembled without it. Check the file count in the result against
what you expected.
Public repositories work without authentication. Private repositories
are not accessible at the time of writing. Token-authenticated
imports are tracked as separate work.
## Snippets
GitLab Snippets do not go to the GitLab adapter. They go to the Gist
adapter, which handles both GitHub Gists and GitLab Snippets behind
one URL shape group. Recognised forms:
```text
https://gitlab.com/snippets/12345
https://gitlab.com/-/snippets/12345
https://gitlab.com/owner/snippets/12345
https://gitlab.com/owner/-/snippets/12345
```
Paste a Snippet URL into the import panel and FileConcat routes it
automatically.
## See also
- [GitHub import](/docs/github-import) and
[Bitbucket import](/docs/bitbucket-import), which reach the same
result through very different request budgets.
- [File filtering](/docs/file-filtering) to trim the imported tree
before output assembly.
- [Token estimation](/docs/token-estimation) for the token budget.
---
---
title: "Bitbucket import - paste a repository URL, get one text bundle"
description: "How FileConcat imports a public Bitbucket Cloud repository: the URL shapes it parses, why slashed branch names work here, and the anonymous request budget that decides how large a repository can be."
---
# Bitbucket import
Paste a public Bitbucket repository URL into the import panel and press
**Fetch**, and FileConcat fetches the project tree.
## Supported URL shapes
The Bitbucket adapter at
`packages/core/src/sources/adapters/bitbucket.ts` matches
`bitbucket.org` URLs only. Bitbucket Server and Data Center (the
self-hosted products) are not supported.
```text
https://bitbucket.org/workspace/repo
https://bitbucket.org/workspace/repo/src/branch
https://bitbucket.org/workspace/repo/src/branch/subdirectory
```
A trailing `.git` is tolerated and stripped. When a subdirectory is
included, only files at or under that path are imported.
The Bitbucket workspace name fills the same slot as `owner` does for
GitHub and GitLab URLs.
## The ref is resolved to a commit first
Before listing anything, the adapter requests the repository's `/src`
endpoint and reads the commit hash out of the URL it was redirected to
(`resolveBitbucketRef`). Only then does it walk the tree, at that
commit.
That extra request buys two things the other two sources do not have:
- The default branch is whatever the repository uses. Nothing
is guessed and nothing falls back to `main`.
- **Branch names containing a slash work.** `src/release/2.0` resolves
through the redirect instead of being split into a branch and a
subdirectory, which is what happens on
[GitHub import](/docs/github-import) and
[GitLab import](/docs/gitlab-import).
## What one import costs in API requests
Bitbucket has no single recursive-tree endpoint, so the adapter walks
directories. For one import:
- One request to resolve the ref.
- One request per directory, plus one more for each 100 entries inside
it.
- One request per file, twelve at a time.
Every one of those goes through `api.bitbucket.org`. Atlassian
documents a strict limit of 60 requests per hour for anonymous callers,
across all API resources (Atlassian, *API request limits*, read
September 2026).
Put the two together before you paste a URL. A 40-file project spread
over 8 directories costs about 49 requests, which is most of one hour's
anonymous budget. **Bitbucket is the source here where repository size
decides whether the import finishes**. The ceiling is a few dozen files
rather than a few thousand. Point the URL at a subdirectory to stay
under it, or download the project and drop the folder into FileConcat
instead.
## When a request is denied or a file fails
Errors surface through the same `classifyResponseError` helper used by
the GitHub and GitLab adapters
(`packages/core/src/sources/adapters/_errors.ts`), with distinct
wording for 401, 403 and 429 responses. A 429 whose `Retry-After` hint
fits inside 30 seconds is retried once automatically.
A file that fails to download does not fail the import. The failure is
recorded with its path and reason, and the rest of the bundle is
assembled without it. Check the file count in the result against
what you expected.
Public repositories work without authentication. Private repositories
are not accessible at the time of writing. Token-authenticated
imports are tracked as separate work.
## See also
- [GitHub import](/docs/github-import) and
[GitLab import](/docs/gitlab-import), which reach the same result
through very different request budgets.
- [File filtering](/docs/file-filtering) for narrowing the imported
tree.
- [Token estimation](/docs/token-estimation) for tracking the token
budget.
---
---
title: "Browser clipper: save pages, threads, transcripts and conversations as Markdown"
description: "How the FileConcat Clipper extension saves an article, a YouTube transcript, a Reddit thread, a Hacker News discussion or a ChatGPT, Claude or Gemini conversation as Markdown and pushes it into your bundle."
---
# Browser clipper
FileConcat Clipper is a Chrome extension that turns the page you are
reading into Markdown and pushes it into an open fileconcat.com tab.
There it joins your bundle like any dropped file. It covers articles on
any site, plus YouTube transcripts, Reddit threads, Hacker News
discussions, and ChatGPT, Claude and Gemini conversations.
There is a page about it at [/clipper](/clipper), and the extension
itself is on the
[Chrome Web Store](https://chromewebstore.google.com/detail/fileconcat-clipper/nhjmkijlimliapgbidajgbkangddnlhn).
## Install and open
1. Install it from the Chrome Web Store.
2. Reload any tab you already had open. Chrome does not inject content
scripts into tabs that existed before an extension was installed, so
a YouTube or fileconcat.com tab from before will not answer.
3. Click the toolbar icon to open the side panel. It stays open while
you browse.
The panel's **Now** block names the page it is looking at. It re-reports
itself on every tab switch, every navigation, and whenever the page
grows. Scrolling a feed to load more rows updates the list without a
click, and the panel never describes the page you came from.
## What it reads
**Any article.** If a page reads as an article, the panel offers **Clip
this page**. Mozilla's Readability decides what the body is and Turndown
renders it. That covers Substack, Medium, documentation sites, news and
blogs with no per-site code. Navigation, sidebars, cookie bars and
footers are left behind.
**YouTube.** A watch page offers **Clip this video** and the clipping
carries the video's description and its full transcript. A channel's
Videos tab and a search page list every video the page has loaded, with
a tap target on each row. A channel's Playlists tab lists playlists
instead, and taking one row takes every video that playlist holds, filed
under the playlist's name. **Include comments** adds the top 60
threads and the first page of replies under the 25 most-replied of them.
It is off by default, because it costs about 30 more requests, five
seconds, and three to four times the tokens.
**Reddit.** A thread offers **Clip this post** and takes the post plus
the comments the page has rendered, keeping every author, score and level
of nesting. **Expand more comments** clicks the thread's own "more
replies" three rounds deep and is off by default because it is slower.
Clipping from a subreddit listing instead fetches each post's full body
but not its comments, which Reddit renders on the client. That clipping
says so in place of its comment section and never overwrites a fuller
clipping of the same post.
**Hacker News.** A thread returns its entire comment tree in one
request, however deep it runs. The front page lists its stories with a
tap target on each.
**ChatGPT, Claude and Gemini.** All three pages render a window of the
conversation (4 of 82 messages on a measured ChatGPT page, 2 of 11 on Claude,
2 of 105 on Gemini). So the extension reads the conversation the way the
site's own client does: one or two same-origin requests, using the page's
session, nothing stored. The file holds every turn with the assistant's own
Markdown. The opt-in adds reasoning and tool activity, measured at 3 to 6.5
times the clipping's size on ChatGPT, 1 to 3.7 times on Claude and 1 to 2.1
times on Gemini. Files a Claude conversation wrote, and HTML apps a Gemini
conversation built, arrive as their own files under the conversation's folder.
## Sending into a bundle
Clips collect in the panel's cart. **Peek** reads a clipping's Markdown
back inside the panel before you send it. That is where a wrong page or
a transcript that stopped early shows up, while it is still cheap to fix.
**Send** pushes every finished clipping into an open fileconcat.com tab,
opening one if there is none. A send extends the bundle rather than
replacing it, and de-duplicates by path. So a repository and the
discussion about it can sit in one bundle in either order, re-sending a
corrected clipping fixes it in place, and sending the same set twice
does not double it. **Start over** on fileconcat.com is the only thing that
clears a bundle.
Closing the panel does not stop a batch. The clipping runs in the
extension's service worker, so the panel reads the finished result
whenever you open it again.
## What it does not do
Nothing is read from a page until you ask for it. There is no background
crawling, no page is touched because you happened to visit it, and no
clipping is sent anywhere except the fileconcat.com tab you are looking
at. There is no account and no server of ours in the path. Clippings are
held in your browser's own storage between the clip and the send. The
sent list is a receipt rather than a library: rows leave after seven
days. The [privacy page](/privacy) covers the extension alongside the
site.
## Walkthroughs
Three site-specific guides cover what the manual route loses on each and
what the panel returns instead: [saving a Hacker News
thread](/blog/save-hacker-news-thread), [saving a Reddit thread as
Markdown](/blog/save-reddit-thread-as-markdown), and [getting a YouTube
transcript into ChatGPT](/blog/youtube-transcript-to-chatgpt).
---
# Reference
---
title: "File filtering - include and ignore patterns"
description: "How the Files pane narrows your output: the filter box, the By type chips, the Include and Ignore patterns, what the glob patterns mean, and per-file toggles. Everything applies live."
---
# File filtering
The **Files** pane, opened by **Adjust what's included**, is the surface for narrowing your output
to the files you want to share with an assistant. Everything you
type here applies live: the file tree updates as you type, with no Apply
button.
## Include and Ignore textareas
Two textareas drive pattern filtering:
- **Include** is empty by default. When you put glob patterns in it,
only files matching at least one of them survive.
- **Ignore** carries a default list (the same list the CLI uses) of
common build outputs, lockfiles, binary directories and, since
2026-09-09, test files by the naming convention of each ecosystem
(`*.test.ts`, `*_test.go`, `test_*.py`, `*Test.java` and their
siblings). Patterns you add here exclude their matches; delete a
default pattern to let its files through.
Both lists judge what a folder or an archive brings along. A file you drop
or pick by itself is read whatever its name, so a lone `debug.log` comes
through. See [Filter precedence](/docs/filter-precedence).
Both textareas accept a **comma-separated list of globs**. Newlines
between commas are fine for readability. The two interact in one
surprising way described in
[Filter precedence](/docs/filter-precedence): if Include has any
content, Ignore is skipped entirely. Treat Include as an exclusive
whitelist when you use it.
## Hidden files
A file whose own name starts with a dot (`.gitignore`, `.editorconfig`,
`.env`) is held back before any pattern runs. It shows dimmed in the
tree with the reason "Hidden file"; tick it to include it. A file you
tick back in goes through the [send check](/docs/send-check) like any
other, so a key in it is replaced before you copy. A directory
that starts with a dot is not held back here: `.github/workflows/ci.yml`
comes through unless a pattern names it. The CLI walks differently and
skips everything under a dot directory as well. See
[CLI usage](/docs/cli-usage) for the config key that turns that off.
## Pattern semantics
Patterns are matched against each file's path using the `pathMatches`
helper in `packages/core/src/path-utils/glob-match.ts`. Two rules cover
every case:
- **A bare directory or filename pattern matches anywhere in the path.**
Typing `node_modules` matches `apps/web/node_modules/react/index.js`,
not only a top-level `node_modules` directory. The same goes for
`*.log`, which matches every `.log` file at any depth.
- **A slashed pattern matches the full path or any suffix obtained by
stripping leading directories.** Typing `src/**/*.ts` matches both
`src/app.ts` and `myrepo/src/app.ts`. This lets patterns work
whether you dropped a folder by its repo name or by its inner `src/`.
A few examples that catch what most projects need:
```text
node_modules, dist, build, .git, *.lock, *.log
```
```text
src/**/*.ts, src/**/*.tsx, README.md
```
## Filter box and By type chips
The filter box at the top of the pane narrows the list as you type. Plain
text matches anywhere in the path, ignoring case. Text with `*` or `?`
is read as a glob, with the same rules as the textareas. Typing only
changes what is shown. **Take out N** moves every match out of the
bundle, **Keep only these N** moves everything else out, and **Undo**
puts the previous state back.
The **By type** chips list each readable extension with its file count
and its share of the text, heaviest first. A click takes the whole type
out, or puts it back. **Reset to defaults** clears the manual choices
and restores the default patterns, with an Undo too.
The pattern textareas sit in a closed **Patterns** section at the bottom
of the pane.
## Manual file toggles
Each file in the tree has a checkbox that overrides the pattern
decision for that one file. Manual toggles are sticky: if you tick a
checkbox to include a file, then later edit your Ignore textarea, the
file stays included.
The pane's file list is headed with a live count of how many files
are going into the output and their share of the readable text. Each
row shows its own share. Rows sort largest first or A to Z. Auto-skipped noise (binaries and anything
your patterns exclude) stays visible but dimmed, so
you can see what was left out and re-check it by hand.
## See also
- [Filter precedence](/docs/filter-precedence) for the full ordering
of pruning, validation, patterns, and overrides.
- [Configuration](/docs/configuration) for the output format choice,
the Files pane, and the settings that persist across reloads.
---
---
title: "Filter precedence - the four layers that decide what ships"
description: "FileConcat picks files through four layers in order: the drop-time prune, the validation cache, the pattern layer, and manual overrides. Knowing the order explains why a file appears or disappears."
---
# Filter precedence
FileConcat decides which files end up in your output through a four-layer
pipeline. Each layer runs in order and the next one only sees what survived
the previous. Knowing the order makes it easier to predict why a file
appears or disappears when you type a pattern.
## The four layers
1. **Drop-time prune** runs at ingestion.
2. **Validation cache** runs once per file at ingestion.
3. **Pattern layer** runs live every time you edit a textarea.
4. **Manual overrides** are sticky and applied last.
The pipeline is deterministic. Same inputs produce the same `included`
decision for every file.
## Layer 1: drop-time prune
Two kinds of path are left out before a byte of them is read:
- **A directory the default ignore list names by itself**: `.git`,
`node_modules`, `vendor`, `dist`, `build`, `target`, `__pycache__`,
`.venv`, `coverage`, `.next` and the rest of the plain names in that
list. The walker that traverses a dropped folder never enters one, and
the folder picker leaves their files out of its list.
- **A file whose extension never holds text**: fonts, audio and video,
compiled code and libraries (`.o`, `.dll`, `.class`, `.pyc`, `.jar`),
databases, and data or model files. Images are not on this list: a
dropped image gets the recognition offer instead. Neither is an
extension a text format also uses (`.dat`, `.mat`, `.nc`, `.obj`,
`.orc`, `.pdb`, `.pkl`, `.pt`, `.res`): those files are read, and their
bytes decide whether they are text.
Until 2026-09-15 only `.git` and `node_modules` were pruned here, and
everything else was read into memory first and hidden by the pattern
layer. A file that never reaches the bundle still cost a read and a
classification, and the largest drops were mostly such files.
The folder you drop is exempt. Drop `dist` by itself and it is read,
whatever it is called, and the result's ledger says it was read because
you chose it. Only what sits inside a drop is judged by name. The ledger
names what this layer turned away (the folders, and the files by
extension). A drop turned away whole says so on the empty screen.
An archive in the drop is opened, and its contents go through the same
check with the archive as their root. `build.zip` is opened whatever it is
called, and the `fonts/` and `node_modules/` inside it are turned away
like the ones beside it. Until 2026-09-15 an archive's contents skipped
this layer, so a zipped build tree was read in full while the unzipped
one next to it was not.
What this layer leaves out cannot be turned back on from the drawer, because
it never entered memory. Every glob and every plain file name in the
default list (`*.log`, `*.test.ts`, `package-lock.json`) runs at filter
time instead, and those can be. The test is `prunedAtWalk` in
`packages/core/src/path-utils/skip-paths.ts`.
## Layer 2: validation cache
When a file is ingested, FileConcat checks its content and records the
result in a sticky `validations` map:
- Is the content binary? A file with no text to recover (an executable,
a font, an archive FileConcat cannot open) is left out for good and
shows locked in the tree. Images and recordings are offered for text
recognition or transcription, which runs only when you ask.
**Extractable documents** (PDF, Word, Excel,
PowerPoint and the rest of [the formats list](/docs/formats)) are the
exception. Their text is pulled out
and included as text, in your browser, instead of the file being
excluded. A video's own subtitle track is read the same way. Jupyter
notebooks, `.srt` / `.vtt` caption tracks, saved `.eml` messages and
web pages saved from a browser take the same path for the opposite
reason. They are already text, but the text is a serialization, so
what lands in the bundle is the document rather than the file. Scanned
PDF pages are read by text recognition in your browser. It starts on
its own for up to three such documents and 8 MB per drop, and is
offered past that. A document that still yields no text (an encrypted
PDF, say) is surfaced as excluded rather than silently left out.
There is no size check. A large file is read like any other, and the
result screen reports how much of the context window the bundle fills.
This check runs once per file. Pattern edits do not retrigger it, which
is why pattern changes feel instantaneous even on large drops.
## Layer 3: pattern layer
Two textareas in the **Patterns** section of the Files pane drive this layer:
- **Include** is a comma-separated list of glob patterns. Empty means
every surviving file passes.
- **Ignore** is a comma-separated list of glob patterns. Files matching
any of them are excluded.
A file you drop or pick by itself skips this layer. Drop `debug.log` alone
and it is read, although `*.log` is on the default list: the list is for
what a folder brings along, not for a file you named. Until 2026-11-07 a
lone log came out as an empty result. Files inside a dropped folder or an
archive, and files from an import, are still judged by name. The one
exception is a Terraform state file, which carries credentials and stays
held back while its pattern is on the Ignore list.
There is one rule that surprises people: **if the Include textarea has
any non-empty content, the Ignore textarea is skipped entirely.** The
include list is treated as an exclusive whitelist. To go back to "every
file except these", you have to clear the Include textarea.
Pattern matching uses the `pathMatches` helper in
`packages/core/src/path-utils/glob-match.ts`. Two semantics matter:
- **Bare directory or filename patterns match anywhere in the path.**
Typing `node_modules` matches `apps/web/node_modules/react/index.js`,
not only a top-level `node_modules`. The same goes for `*.log`,
matching every `.log` file at any depth.
- **Slashed patterns match the full path or any path suffix obtained by
stripping leading directories.** Typing `src/**/*.ts` matches
`src/app.tsx` and also `myrepo/src/app.tsx`. This lets patterns work
when you drop a folder whose name you do not want to type.
See [File filtering](/docs/file-filtering) for the pattern syntax in
more detail.
## Layer 4: manual overrides
Every checkbox in the pane's file tree writes to a sticky map called
`userToggled`. An entry for a path can be `"include"` or `"exclude"`,
and either value wins over whatever the pattern layer decided.
The map only stores divergences. If you tick a checkbox so that the
file's state matches the pattern decision anyway, the entry is removed
instead of recorded. So the override map stays small and tracks only
the deliberate exceptions.
The pane's bulk actions (**Take out N**, **Keep only these N** and the
**By type** chips) write here too, one entry per file. Pattern edits
never touch this map, so an include rewrite cannot accidentally lose
your individual decisions. **Reset to defaults** clears it on purpose,
with an Undo. Starting over clears the bundle and the overrides
together.
## Worked example
You drop a Node project into FileConcat:
1. Drop-time prune removes `.git/`, `node_modules/`, `dist/` and the
fonts under `public/`. Everything else lands in memory.
2. Validation marks any binaries (PNGs) as excluded.
3. You type `examples` into the Ignore textarea. The file tree updates
immediately. Every file under `examples/` disappears.
4. You manually re-check one file at `examples/quickstart.ts` because
you want it in the context.
`userToggled["examples/quickstart.ts"] = "include"`.
5. You edit the Ignore textarea to add `docs`. Pattern layer hides
`docs/*` but the override for `examples/quickstart.ts` is untouched.
Every other interaction in FileConcat is a variation on this loop.
---
---
title: "Send check - which keys, passwords and personal numbers FileConcat removes before you paste"
description: "Before you copy or download a bundle, FileConcat checks it in your browser for API keys, tokens, private keys, database passwords, and the emails, IBANs, card and phone numbers in documents. What it removes, what it only lists, how to hide names, and what it does not check."
---
# Send check
When your bundle is ready, FileConcat checks the text of every file in it for keys, passwords and
a few kinds of personal numbers before anything leaves the page. A key it recognises is replaced in the bundle, so Copy, Download,
Share, the split parts, the preview and the token count all carry the replaced text. The check runs
in your browser, like the rest of FileConcat. Your files are not uploaded to us.
The result screen shows what happened under the export card, in a block called "Checked before you
send". A bundle with nothing found shows one line instead: "No keys or passwords found. Names and
addresses are not checked."
## What is removed by default
Each of these is replaced with a placeholder that names what was there. The rules are ported from
[gitleaks](https://github.com/gitleaks/gitleaks) (MIT), with its keyword checks, its minimum
randomness for each key and its allowlists, so a string that only looks like a key, such as
`AKIAIOSFODNN7EXAMPLE` from AWS's own documentation, stays as it is.
## What the bundle says instead
Only the secret is replaced. The quotes, the variable name and the rest of the line stay, so the
model still sees that a key was configured and where:
```ts
export const github = "[Secret removed: GitHub token]";
```
A private key that spans many lines becomes one placeholder followed by the same number of line
breaks, so with line numbers turned on, line 40 in the bundle is still line 40 in your file.
How Repomix, gitingest and code2prompt handle the same key is measured in
[Repomix vs gitingest vs code2prompt](/blog/repomix-vs-gitingest-vs-code2prompt).
## Database passwords are listed, not removed
A connection string with a password in it, such as `postgres://app:...@db:5432/app`, is named in
the block with a **Mask** button rather than replaced, because most of the ones found in real
repositories are examples or test values. Mask replaces only the password: user, host and database
stay readable.
```yaml
DATABASE_URL: postgres://app:[Secret removed: database password]@db:5432/app
```
A password that is plainly a placeholder is never listed: a template such as `${DB_PASSWORD}` or
``, and words such as `password`, `secret`, `changeme` or `example`.
## Emails, IBANs, card and phone numbers in documents
In documents, FileConcat also looks for the identifiers that are exact enough to find without
guessing. Each kind gets its own row with a **Mask** button, and none is masked until you press it,
because a bundle of contracts or invoices is often meant to carry them.
| Kind | Found when | Replaced with |
| --- | --- | --- |
| Email | an address with a real domain ending; `logo@2x.png` is not one | `[Email removed]` |
| IBAN | the country's length and the IBAN check digits both hold | `[IBAN removed]` |
| US social security number | it follows "SSN" or "social security" on the same line and is a number the US could issue | `[SSN removed]` |
| Card number | it follows "card", "credit", "debit", "Visa", "Mastercard" or "Amex" on the same line and its check digit holds | `[Card number removed]` |
| Phone number | it comes right after "phone", "tel", "mobile", "cell", "fax" or "call" on the same line and has 7 to 15 digits | `[Phone number removed]` |
Documents here are PDFs, Word, Excel, PowerPoint, OpenDocument and RTF files, ebooks, emails,
subtitles, Markdown and plain text, and CSV, TSV and vCard files, where a contact list usually is. Code and
config files are not searched for these, because an email in code is mostly a package author or a
licence line.
An SSN or card number needs its label because 9 to 19 digits in a row are mostly something else.
We ran the check over 2,277 public documents and 60 code repositories: a card-shaped number with
no label matched more than 14,000 times, all of them ids, DOIs and table numbers, and a labelled
one matched none of them. A phone number needs its label for the same reason: without one, the
phone-shaped numbers in those documents were mostly table and course numbers, and with one, 40 of
40 we read were phones.
## Hiding names and other words
Names, client names and project code names have no shape a check can find, so you list them. **Hide
names** opens a field under "Always hide these words". Separate entries with commas or new lines;
an entry can be several words, such as `Jane Doe`. Press Enter or click away to apply the list.
Every place an entry stands as whole words is replaced with `[Hidden]`, in every file, code included,
with capitals ignored. `Jane` hides "jane" and "JANE" but not "Janet". The bundle's file and
folder names, its file tree, its project name, the name of a downloaded file and the source address
are masked the same way; the extension stays, so `Acme Corp/acme-q3.pdf` goes out as
`[Hidden]/[Hidden]-q3.pdf`. The result screen keeps the real names, since only you see it. The block says how many places
were hidden. The list is held in memory for this bundle only: it is not saved on your device, never
sent anywhere, and **Start over** forgets it.
When a hidden word overlaps a key or a masked identifier, the whole stretch is replaced once, so
no part of either is left.
## Review comments
Office documents, RTF files and PDFs can carry review comments, which the readers keep in the text. The
block names them, as in "12 review comments, in q3-report.docx", so a comment you forgot about does
not reach the model unseen. There is nothing to mask: delete them in the document if they should
not go.
## Keeping a key
A key the model needs, such as a test token in a fixture, can be sent as written. **Keep
originals** keeps every key on screen, and **Show each** lists them one by one with their file and
line, each with its own **Keep**. **Remove again** undoes it.
A choice covers the keys you saw when you made it. A key that arrives later, from a file you add or
a scan that finishes reading, is removed like any other. **Start over** clears every choice, and
none of them is stored on your device or sent anywhere.
## While files are still being read
Scanned pages and recordings get their text after the result screen shows. Each file is checked
when its text lands, and until then the block says "Still reading 2 files. They are checked when
their text lands." instead of the nothing-found line. A file the check fails on is named ("Could
not check notes.pdf.") and goes into the bundle as it is.
## What is not checked
- Names and addresses, unless you list them to hide.
- Keys, passwords and the identifiers above in file and folder names: those are masked in the
text of a file only. Hidden words are masked in names too.
- IP addresses, and ID, passport and tax numbers.
- An SSN, a card number or a phone number with no label next to it, and any of the identifiers
above in a code or config file.
- A key with no recognisable shape, such as `api_key = "..."` with a random value. A rule for
these finds far more ordinary strings than keys, so it is off.
- A password that is not part of a connection string, and an `Authorization` header in a `curl`
example.
- Text in an image or a scan that has not been read yet.
- The repository address in the bundle header.
Files whose names start with a dot, such as `.env`, are held back before the check runs; see
[File filtering](/docs/file-filtering). A `.env` you tick back in is checked like any
other file.
The check removes what it recognises and says so. It does not make a bundle safe to share, and what
you then paste into an assistant is your own choice. The [privacy page](/privacy) says what our
anonymous counts record about the check: which kind was found, and whether it was kept or masked,
never the finding itself or the file it was in, and that the hide list was used, never its words.
---
---
title: "Token estimation - how the counter reaches its number"
description: "The result screen counts tokens with a WebAssembly build of OpenAI's tokenizer, samples above 1 MB rather than counting whole, and lets you switch the model it counts for."
---
# Token estimation
The token counter on the result screen tells you how much of your model's
context window the current output will consume. It updates live as
files come and go.
## How the count is produced
Token counting runs against `@dqbd/tiktoken`, a WebAssembly build of
OpenAI's tokenizer. The encoding is `o200k_base`, the one
`o1-preview-2024-09-12` uses, and it is fixed. Claude and Gemini
tokenize differently, so for them the count is an approximation.
What gets counted is the **whole assembled output**, what the copy button
copies: the XML root or Markdown
headings, the per-file tags, the header and the file tree, not only the
text of your files. Those wrappers are charged for like everything else.
Measured across 60 public repositories on 2026-09-07 they are a median
2.4% of the bundle, and 17.8% on a repository of many small files.
The encoder runs synchronously after the page boots, so toggling files
on and off does not introduce a perceptible delay for typical projects.
## Above 1 MB the count is sampled
Running the WASM encoder over a multi-megabyte bundle blocks the main
thread long enough to feel like the page has frozen. So above 1 MiB of
text the count is extrapolated instead of taken. 64 evenly spaced 4 KiB
slices are tokenized for real, and the total is scaled by the ratio
those slices show. The cost is a flat 256 KiB of tokenizing whatever the
bundle's size. The constants live in `apps/web/src/lib/tokens-client.ts`
and the threshold in `apps/web/src/lib/tokens.ts`.
Before 2026-09-07 this path was `Math.ceil(length / 4)`, an
English-prose ratio applied to every language. On the 30 repositories of
that 60 repository sample that crossed the threshold, it ran a median
13.5% off. On a repository written in Chinese it ran 62.5% off. Sampling
brings the same 30 to a median 0.8% off and 4.5% at worst, all of them
within 5% of the true count.
`Math.ceil(length / 4)` survives in one place only: the fallback when
the encoder itself fails to load.
If you want an exact count rather than a sampled one, narrow the output
with the filter patterns until the bundle is under 1 MiB.
## Model selector
The model selector opens from the model name in the result's fit
line, in a sheet beside the cost estimate. The catalog ships with the build and is refreshed
at every deploy from `models.dev`, the same source the cost estimates
use.
A few facts that make the picker behave the way it does:
- Models are sorted by release date descending, so the newest
Claude, GPT, Gemini, and so on appear at the top.
- The picker shows the **canonical** model (e.g. `claude-sonnet-4-6`)
and a `via {provider}` hint. The hint names the cheapest priced provider
that offers that model on the day of the deploy. If the cheapest provider
changes between deploys, the hint changes; the canonical id stays
the same so your selection survives.
- The selected model's identifier is the catalog UID
(`lab/model-id`), persisted in localStorage. Models removed from the
catalog upstream are pruned at load time.
## See also
- [Token costs](/docs/token-costs) for which toggles cost or save
tokens.
- [Filter precedence](/docs/filter-precedence) for the layered
filtering pipeline that decides which files contribute to the
count.
- [How many tokens is a codebase?](/blog/how-many-tokens-is-a-codebase)
for the 60 repository measurement the figures above come from, and
what a whole repository costs to send.
- [Context window costs](/docs/context-window-costs) for what filling
100K, 500K or 1M tokens costs across every model in the catalogue.
---
---
title: "Token costs - which output settings cost tokens"
description: "FileConcat's output controls change how much of a context window the result consumes, and some settings cost tokens rather than save them. Which is which, with measured numbers where they exist."
---
# Token costs
FileConcat has output controls that change how much of your model's context
window the output consumes. Some moves cost tokens rather than save
them. This page tells you which is which, with measured numbers where
they exist.
## Show line numbers
FileConcat leaves line numbers off, and the current UI does not surface
a toggle for them. The engine can still prefix every line of every file
with its 1-based line number. That transform lives in
`packages/core/src/file-processing/transform.ts` as `addLineNumbers`.
Measured against 8 representative repo files on 2026-06-07, turning it
on raised the token count by 44.83 percent on average, roughly 40 to 50
percent per file. That cost is why it stays off by default. Line numbers
are a navigation aid for when you want the model to refer back to a
specific line, not a saving.
## Output style
The result screen's **Format** control offers **XML**, **Markdown**,
and **Plain**. The XML style wraps each file in named tags and tends to
read better for Claude. The Markdown style uses fenced code blocks and
tends to read better for chat-style assistants that emit Markdown
themselves. Plain concatenates the files with lightweight separators and
no markup.
The choice costs almost nothing. Measured across five real codebases on
2026-08-31, the spread between the three styles was 0.24% to 1.13% of
the bundle, and the wrapper itself ran 0.6% to 3.8%. The 60 repository
measurement puts the wrapper at a median 2.4%. It reaches 17.8% on a
repository of many small files, where there are more file tags than
file contents.
So pick on fidelity and readability, not on cost.
[XML vs Markdown](/blog/xml-vs-markdown-for-llm-context) has the
per-format numbers and the published research on whether the wrapper
helps a model at all. The short version: what those numbers do **not**
say is which style a model answers better from. That has been measured
for tables and for nested data, with results that contradict each
other. It has never been measured for a bundle of source files, by us
or by anyone else.
## Cross-link
For the tokenizer itself, the sampling that takes over above 1 MB, and
the model selector, see [Token estimation](/docs/token-estimation).
For what a full context window costs to fill, priced across the whole
model catalogue, see [Context window costs](/docs/context-window-costs).
---
---
title: "Context window costs: what it costs to fill 100K, 500K and 1M tokens"
description: "What it costs to fill a model's context window, priced across the whole model catalogue at 100K, 246K, 500K and 1M tokens. Regenerated on every build, never written by hand."
---
# Context window costs
A context window is a ceiling, not a target. It tells you what a model will
accept. It says nothing about what you should send, and the price of sending it
climbs in a straight line with every token you add.
This page prices that line. It takes four input sizes and charges every model in
the catalogue for reading each one once.
## What it costs to fill a context window
## Why the window is not the target
Two things move when you send more context.
The first is the bill, and it is exactly linear. Input is priced per million
tokens, so doubling the context doubles the cost every time. A model having room
to spare is not a discount.
The second is harder to price. Retrieval accuracy does not stay flat across a
full window. Liu et al. found that performance "is often highest when relevant
information occurs at the beginning or end of the input context, and
significantly degrades" in the middle, "even for explicitly long-context
models". Chroma's sweep of 18 models across 8 input lengths reported that
"across all experiments, model performance consistently degrades with increasing
input length". Neither result says long context is useless. Both say the last
half million tokens are not free even when you can afford them.
## What a repository weighs
Across 60 public repositories tokenized on 2026-09-11, the median assembles into
236,218 tokens. Only 38% fit a 128,000 token window, 43% fit 200,000 and 72% fit
1,000,000. The spread runs from 34,860 to 3,044,662 between the 10th and 90th
percentiles.
So for most projects the question is not whether a model can hold the codebase.
It is whether sending all of it is the cheapest way to get the answer.
Filtering does less of that work than people expect. On a fresh clone the
defaults remove a median of 22.7% of tokens. About a third of that is test
files, and a clone has no `node_modules` to remove in the first
place. What moves the number past that is deciding that a whole directory does
not belong in this bundle.
## Cross-link
[How many tokens is a codebase](/blog/how-many-tokens-is-a-codebase) has the
measurement behind the 236,218 figure and the distribution around it.
[Token estimation](/docs/token-estimation) covers the tokenizer that produces
the count on the result screen, and [Token costs](/docs/token-costs) covers the
output settings that change how much of a window a bundle consumes.
[File filtering](/docs/file-filtering) is where you decide what goes in.
[ChatGPT Projects source limit](/for/chatgpt-projects) is the other kind of
ceiling, a file count per Project, which is why a folder goes in as one bundle.
## References
- [Lost in the Middle: How Language Models Use Long Contexts](https://aclanthology.org/2024.tacl-1.9/),
Liu et al., TACL vol. 12, 2024, DOI 10.1162/tacl_a_00638
- [Context Rot: How Increasing Input Tokens Impacts LLM Performance](https://research.trychroma.com/context-rot),
Chroma Research, 2025
- [models.dev](https://models.dev), the catalogue this page prices against
---
---
title: "Configuration - output format, filters and what persists"
description: "Where FileConcat keeps its choices: the output format on the result screen, the Files pane opened by Adjust what's included, the model sheet, and the defaults that survive a page reload."
---
# Configuration
FileConcat keeps its output and filtering choices in a few places: the
result screen (the output format), the **Files** pane opened by
**Adjust what's included** (what goes in), the model sheet (the cost
estimate), and
`localStorage` (the defaults that survive a page reload). This page
documents each one in the order you encounter it.
## Output controls on the result screen
Once your file is ready, the result screen carries the output format
choice.
**Format** is a segmented control offering XML, Markdown, or Plain. XML
wraps each file in named tags (recommended for Claude). Markdown uses
fenced code blocks (recommended for assistants that emit Markdown
themselves). Plain concatenates the files with lightweight separators
and no markup.
The three differ by less than a percent in tokens on a real bundle, so
the choice is about what reads unambiguously rather than what it costs.
[XML vs Markdown for LLM context](/blog/xml-vs-markdown-for-llm-context)
sets out the measurements, what the prompt-format research does and does
not support, and why there is no fourth option.
## The Files pane
The **Adjust what's included** button in the result screen's top bar
opens the **Files** pane. On a wide screen it sits beside the result,
which stays live while you work. On a phone it covers the screen, with
the token count and the context fit pinned to its bottom bar and a
**Done** button. Everything in it updates the bundle live. You never
have to touch any of it.
- The **filter box** narrows the list by name or folder, or by a glob
when you type `*` or `?`. **Take out N** and **Keep only these N** act
on every match at once, and an **Undo** follows each.
- **By type** chips put a whole extension in or out in one click.
**Reset to defaults** clears every manual choice and restores the
default patterns.
- The **file tree** gives every file a checkbox and its share of the
readable text, sorted largest first or A to Z. Auto-skipped noise
(binaries and pattern-excluded files) shows dimmed.
- **Patterns**, closed at the bottom, holds the **Ignore** and **Only
include** glob textareas. Ignore carries the default list (the same
one the CLI uses); Only include is empty by default and acts as an
exclusive whitelist when filled. See
[File filtering](/docs/file-filtering) for the pattern syntax.
The model behind the context fit and the cost estimate is picked in a
separate sheet, opened from the model name in the result's fit line.
See [Token estimation](/docs/token-estimation) for how the model list
is built.
Line numbers are off, and no control exposes a toggle for them.
The engine can prefix every line with its 1-based number
(`addLineNumbers` in `packages/core/src/file-processing/transform.ts`),
and the preference persists in your config. It is not currently a UI
control. See [Token costs](/docs/token-costs) for why it is an expensive
option.
There is no per-file size limit in the browser. A 32 MB cap used to apply at
ingestion and silently leave out anything above it. So the one large data
file or log a bundle was usually about never arrived. Nothing is excluded for
its size now. What a heavy bundle costs is reported on the result screen
instead: how much of the selected model's context window it fills, whether it
has passed the 1 MB mark where the token count becomes a sampled estimate and
Copy slows down, and which single file is carrying most of the weight.
The `maxFileSizeMB` field survives in the persisted config, unread in the
browser. The CLI still caps, but explicitly and visibly, through
[`--max-size`](/docs/cli-usage).
## Persistent configuration
The full `UserConfig` shape lives in
`apps/web/src/hooks/use-config.ts` and is persisted under the
`fileconcat-config` localStorage key. The fields that survive across
sessions:
- `includePatterns` and `ignorePatterns` (your textareas)
- `maxFileSizeMB` (kept for compatibility; the browser no longer reads it)
- `showLineNumbers`
- `outputStyle` (xml, markdown, or plain)
- `defaultSourceType` and `autoSwitchSource`
The store carries a `version` field. When FileConcat loads, anything
older than the current version is run through `migrateConfig` and the
upgraded shape is written back. The migration is silent and needs
nothing from you.
## CLI configuration
The CLI keeps its own configuration layer documented in
[CLI usage](/docs/cli-usage), including the `--config` flag and the
`FileConcatConfig` shape that file accepts.
---
---
title: "CLI usage - run FileConcat from the terminal"
description: "Install the file-concat CLI, the flags it takes, its config file, and how documents, notebooks and archives are handled. Shares the core library of fileconcat.com, no browser required."
---
# CLI usage
The `file-concat` CLI is built on the `@fileconcat/core` library
fileconcat.com uses, with the same filtering rules and no browser required.
It reads fewer formats than fileconcat.com: no scanned pages, no
97-2003 Office files, Kindle books, Outlook `.msg`, 7z or rar
archives, and no transcription. The published version can lag behind
fileconcat.com.
## Install
```bash
npm install -g @fileconcat/cli
# or
pnpm add -g @fileconcat/cli
```
Node 18 or newer. The published package is `@fileconcat/cli`; the bin
command it installs is `file-concat`.
You can also invoke it without a global install:
```bash
npx @fileconcat/cli ./src
```
## Usage
```text
file-concat [path] [options]
file-concat concat [path] [options]
```
The bare command and the explicit `concat` subcommand share the same
flag set. `[path]` defaults to the current directory.
## Flags
| Flag | Short | Default | Notes |
| ------------------------- | ----- | -------------------------- | ------------------------------------------------------------------------------------ |
| `[path]` | | `.` | Positional argument; root to process |
| `--output ` | `-o` | `output.xml` / `output.md` | Default extension follows `--style`. Ignored when `--stdout` set. |
| `--style