CLI reference

Every OneSource argument, option, alias and command.

Syntax and boolean values

Command
onesource [PATH] [OPTIONS]
onesource [PATH] profile <COMMAND>
onesource [PATH] explain <PATHS>... [OPTIONS]
onesource update
onesource help profile update

Persistable boolean options and --show-arg accept a bare flag (true) or =true/=false; use --no-tree=false, not --no-tree false. Action flags such as --copy, --save and --dry-run do not accept =false. Top-level options are not global: put root and top-level options before the subcommand. Explain and profile create/update have their own options after the subcommand.

All arguments and options

SyntaxField, type, defaultCommands and profile storageBehavior and example
[PATH]path
directory; .
Top level
Profile: no
Scan root; must exist and be a directory. Put before subcommands. Config is read only from PATH/.onesourcerc; no ancestor search.

onesource ./my-project --dry-run

Preview the given root.

-o, --output-path PATHoutput_path
path; <root-name>.onesource
Normal + explain + profile create/update
Profile: yes
Relative to the working directory, even with another scan root. Current output is always excluded. Parent must already exist for file output.

onesource -o review.txt

Write review.txt in the working directory.

-i, --include GLOBSinclude
string; unset (all)
Normal + explain + profile create/update
Profile: yes
Comma-separated patterns. Empty string clears the filter; blacklist and ignore still apply. Tree inherits unless overridden.

onesource -i "*.rs" --dry-run

Preview eligible Rust files.

-x, --exclude GLOBSexclude
string; unset
Normal + explain + profile create/update
Profile: yes
Exclude wins over include. Empty string clears this filter. Tree inherits unless overridden.

onesource -x "*.log" --dry-run

Remove log paths from content and inherited tree.

--tree-include, --ti GLOBStree_include
string; inherit include
Normal + explain + profile create/update
Profile: yes
Overrides only the tree include; use ="" to show all otherwise eligible tree paths.

onesource -i "*.rs" --ti "*.toml" --dry-run

Tree shows TOML; content selects Rust.

--tree-exclude, --tx GLOBStree_exclude
string; inherit exclude
Normal + explain + profile create/update
Profile: yes
Overrides only the tree exclude; empty string removes inherited exclusions.

onesource -x "*.log" --tx "" --dry-run

Tree no longer inherits log exclusion.

--no-ignore[=BOOL]no_ignore
boolean; false
Normal + explain + profile create/update
Profile: yes
Disables standard ignore filters for content. Tree inherits unless tree-no-ignore is set. Does not disable blacklist.

onesource --no-ignore --dry-run

Ignore rules bypassed, blacklist retained.

--tree-no-ignore[=BOOL]tree_no_ignore
boolean; inherit no_ignore
Normal + explain + profile create/update
Profile: yes
Independent ignore override for tree. Explicit false keeps tree ignore rules even with --no-ignore.

onesource --no-ignore --tree-no-ignore=false --dry-run

Tree still honors ignore.

--no-tree[=BOOL]no_tree
boolean; false
Normal + explain + profile create/update
Profile: yes
Omits the tree only; file content is unaffected.

onesource --no-tree --dry-run

No tree, file preview remains.

--no-blacklist[=BOOL]no_blacklist
boolean; false
Normal + explain + profile create/update
Profile: yes
Disables built-in blacklist for both content and tree. Current output still excluded; ignore and glob filters remain.

onesource explain .env --no-blacklist

No built-in blacklist block for .env.

-m, --max-size KIBmax_size
nonnegative usize; 500 KiB
Normal + explain + profile create/update
Profile: yes
Content only. Rejects bytes > KIB × 1024; equality is allowed. Zero admits only empty files. Tree unaffected.

onesource -m 1 --dry-run

At most 1024 bytes per content file.

--desc TEXTdescription
string; unset
Normal + explain + profile create/update
Profile: yes
Stored with --save or profile create/update. Does not change selection. Empty string is allowed. Explain accepts but ignores it.

onesource --desc "Review" --save --dry-run

Store description in default.

-p, --profile NAMEprofile
string; default
Normal + explain
Profile: no
Loads exactly one profile, without merging default into named profiles. Missing explicit profile is an error unless --no-config.

onesource -p review --dry-run

Preview with an existing review profile.

--no-configno_config
flag; false
Normal + explain
Profile: no
Skips loading config; --save still reads and writes the config document.

onesource --no-config --dry-run

Use built-in values and explicit CLI options.

--dry-rundry_run
flag; false
Normal + explain
Profile: no
Reads files and estimates output without writing bundle or clipboard. --save still persists config before scan.

onesource --dry-run

Print expectations and estimates; no bundle.

-c, --copycopy
flag; false
Normal + explain
Profile: no
Copies entire bundle instead of writing file. --dry-run suppresses copy. Clipboard failures stop execution.

onesource --copy

Copy bundle; no output file.

--savesave
flag; false
Normal + explain
Profile: no
Upserts explicit persistable options into active profile before scan; a later scan failure does not undo save.

onesource -i "*.rs" --save --dry-run

Merge explicit include into default.

--replacereplace
flag; false
Normal + explain
Profile: no
Requires --save in normal runs; discards unspecified saved fields. profile update also supports --replace.

onesource --save --replace -i "*.rs" --dry-run

Stored default contains only explicit include.

--show-arg[=BOOL]show_arg
boolean; false
Normal + explain
Profile: no
Prints resolved AppConfig after normal execution and statistics. Explain accepts but does not print it.

onesource --show-arg --dry-run

Print resolved arguments after statistics.

-h, --helphelp
flag; no execution
All commands
Profile: no
Shows help for the current command. help subcommand is also available. Not a setting.

onesource explain --help

Show diagnostic command help.

-V, --versionversion
flag; no execution
Top level
Profile: no
Shows executable version at top level; not a setting.

onesource --version

Print installed version and exit.

Overrides and help

Command
onesource --no-config --no-tree=false -m 1 --dry-run
onesource --include="" --tree-exclude="" --dry-run
onesource explain src/main.rs --no-ignore=false
onesource profile --help
onesource profile update --help
onesource explain --help
onesource --version

The first preview allows content up to 1024 bytes and keeps the tree. Empty filters override saved strings. For each option, the behavior column describes its interactions; use the corresponding detailed page for output examples.