CLI Options Reference

A complete guide to every command and flag available in forg.

Commands

CommandDescription
initInitialise forg and create a default ~/.forg/config.json.
uninstallRemove the forg binary and all configuration files.
self-updateUpdate forg to the latest version.

Positional Arguments

ArgumentDescription
[TARGET_DIR]The directory to organize (relative to your Home directory).

Options & Flags

OptionShorthandDescriptionDefault
--dry-run-dPreview changes without moving files.false
--on-conflict-cConflict resolution mode: skip, replace, versioned.skip
--allow-hiddenProcess files starting with ..false
--ignore-caseMake regex matching case-insensitive.false
--file-list-LShow real-time transformation mapping (e.g., old -> new) as files are processed.false
--pattern-pDefine a one-off regex pattern (requires -t).N/A
--dest-tDefine a one-off destination directory (requires -p).N/A
--help-hPrint help information.N/A
--version-VPrint version information.N/A

Technical Implementation Details

Global Regex Modifiers

The --ignore-case flag acts as a global modifier. It overrides the default case-sensitive behavior of the Rust regex engine for all active patterns, including those defined in config.json, the on-the-fly --pattern, and the secondary .ignore.json layer.

Environment Variables

forg relies on the $HOME environment variable to resolve paths. Ensure it is correctly set (standard on almost all Unix systems).

On this page
Commands Positional Arguments Options & Flags Technical Implementation Details Global Regex Modifiers Environment Variables