Quick start
You need Node 18 or later (Repomix is run with npx).
pnpm add -g @lapius/repomix-auto
repomix-auto [directory] [--force] [--check] [--path] [--out <dir>] [--no-auto-exclude]
Run repomix-auto in a project directory. It writes the map to ~/.cache/repomix-auto/<name>-<4-char path hash>.md.
Options
| Option | What it does |
|---|---|
--check | Only check freshness, do not generate (fresh = exit 0, stale = exit 1) |
--force | Regenerate regardless of freshness |
--path | Print only the output path to stdout (for scripts; generates if needed) |
--out <dir> | Output directory |
--no-auto-exclude | Do not auto-exclude files from the Top 5 |
--update | Update to the latest version (pnpm add -g @lapius/repomix-auto@latest) |
-y, --yes | Run without asking, even in a directory that does not look like a project |
Environment variables: REPOMIX_AUTO_OUT (fixed output directory), REPOMIX_AUTO_PM=npm|pnpm (package manager used by --update; pnpm if available, otherwise npm).
How it works
- Output: by default
~/.cache/repomix-auto/<name>-<4-char path hash>.md. With--out <dir>orREPOMIX_AUTO_OUT, it becomes<name>.mdin a fixed directory. Anoutput.filePathin an existingrepomix.config.jsontakes priority. - Freshness: it does not regenerate unless a source file is newer than the output (under git, gitignored files are ignored).
--checkonly checks. - Config: it creates
repomix.config.jsonand, under git, adds it to.git/info/exclude. - Auto exclude: after the first run, files in the Top 5 that are i18n, migrations, data, or generated output are excluded automatically, and the reason is recorded in
headerText. Files it cannot judge are listed.
Safety
[!WARNING] To avoid running it by mistake, it refuses to run in your home directory or at the filesystem root. In a directory with no
.git,package.json, or similar marker, it asks first (non-interactive runs need--yes). If Repomix fails, the config created in that run is removed.
[!NOTE] This README was rewritten from the previous text and checked against
npm/package/bin/repomix-auto(options, environment variables, refusal rules, output path). The command was not run for this rewrite.
Development
Releases are built by .github/workflows/release.yml when a v* tag is pushed. npm/build.mjs writes the tag version into npm/package/package.json.
License
MIT