Skip to content

CLI Reference

Complete reference for the folder2md command. This mirrors folder2md --help; run that at any time for the authoritative list on your installed version.

Usage

folder2md [OPTIONS] [PATH]

PATH is the directory to process. It defaults to the current directory (.).

Options

Option Short Description
--output <file> -o Output file path. Defaults to output.md.
--limit <size> Size limit for the output; automatically enables smart condensing. Use t for tokens or c for characters, e.g. 80000t, 200000c.
--condense Enable code condensing for supported languages, using the defaults from your config file.
--config <file> -c Path to a custom configuration file.
--clipboard Copy the final output to the system clipboard.
--init-ignore Generate a .folder2md_ignore template in the target directory.
--force Overwrite an existing .folder2md_ignore when used with --init-ignore.
--no-suggestions Disable automatic file analysis and ignore-pattern suggestions.
--disable-update-check Disable the automatic check for new versions.
--verbose -v Enable verbose logging.
--changelog [<version>] Show the changelog for the current or a specific version.
--changelog-recent <N> Show the last N changelog versions (use with --changelog).
--upgrade Upgrade folder2md4llms to the latest version.
--upgrade-check Check for available updates without upgrading.
--yes -y Skip the confirmation prompt when upgrading.
--version Show the installed version and exit.
--help -h Show the help message and exit.

There are no --include-pattern / --exclude-pattern flags. File selection is controlled by .folder2md_ignore and .gitignore (see Configuration).

Examples

Process the current directory:

folder2md .

Process a specific directory and write to a custom file:

folder2md /path/to/my-project -o my-project-analysis.md

Set a token limit (auto-enables smart condensing):

folder2md . --limit 80000t

Set a character limit instead:

folder2md . --limit 250000c

Enable default code condensing:

folder2md . --condense

Copy the result to the clipboard:

folder2md . --clipboard

Generate an ignore template, then edit it before your next run:

folder2md --init-ignore

Configuration file

Anything beyond these flags is set in a folder2md.yaml file in the directory you process. See the Configuration reference for the full key list.