CLI
compat-finder provides two CLI subcommands: interactive for guided troubleshooting, and next for one-step calculations from existing answers.
Help
compat-finder --helpcompat-finder --help interactivecompat-finder --help nextCommands
interactive
Start a full interactive troubleshooting flow:
compat-finder interactive --count 4compat-finder i -c 4 -n "A,B,C,D"Supported input:
y/yes/issue/1/true: the issue reproducesn/no/pass/0/false: the issue does not reproduceu/undo: undo the previous answerq/quit: quit
next
Calculate the next targets to test from existing answers, or return the final result:
compat-finder next -c 3compat-finder n -c 3 -a "y,n"compat-finder next -c 4 -a "issue,pass,1,0" -n "A,B,C,D"Returned fields:
status:testingmeans the currenttargetsshould be tested;completemeans the final result is availabletargetCount: the total number of targets in the current checktargets: whenstatusistesting, the targets to test; whenstatusiscomplete, the final resultextraAnswerCount: optional; returned only whenstatusiscompleteand extraanswersvalues were provided
Supported answers values:
y/yes/issue/1/true: the issue reproducesn/no/pass/0/false: the issue does not reproduce
If answers includes extra values after the session is already complete, the CLI still returns the final result and adds extraAnswerCount to the JSON output.
Example 1:
compat-finder next -c 3 -n "Alpha,Beta,Gamma" -a "y"Expected JSON output:
{
"status": "testing",
"targetCount": 3,
"targets": ["Alpha"]
}Example 2:
compat-finder next -c 3 -n "Alpha,Beta,Gamma" -a "y,n"Expected JSON output:
{
"status": "testing",
"targetCount": 3,
"targets": ["Beta"]
}Example 3:
compat-finder next -c 3 -n "Alpha,Beta,Gamma" -a "y,n,n"Expected JSON output:
{
"status": "complete",
"targetCount": 3,
"targets": ["Alpha", "Beta"]
}Locale
CLI messages can be localized with a command-line option or environment variables.
Priority:
- Command-line option:
--locale/-l - Environment variable:
COMPAT_FINDER_LOCALE - Environment variable:
LC_ALL - Environment variable:
LC_MESSAGES - Environment variable:
LANG - Default:
en
Supported locales:
enzh-Hans
Legacy Simplified Chinese locale tags such as zh-CN and zh-SG are normalized to zh-Hans.
Unsupported explicit values, including other Chinese variants such as zh-TW and zh-Hant, are rejected instead of being silently switched to English.
Unsupported locale values from environment variables are ignored while the resolver continues through the priority list and finally falls back to en.
Algorithms
Both CLI subcommands accept --algorithm <name> and --algo <name>.
binary-split: the default troubleshooting algorithmleave-one-out: test by excluding one target per round
To learn more about the difference between these two algorithms, see Algorithm Performance.