I want the installed bsdetector shell command to generate batch feature reports from a newline-delimited text file. The command should be invoked as bsdetector -i FILE [-o json|tsv|html], where -i is required and -o defaults to json.
On a successful run, the command reads the input file, splits it on newline characters, treats each non-empty line as one statement, extracts the existing bias features for each statement, and exits with status 0. With the default JSON output, stdout should be an indented JSON array; each item should contain the extracted feature fields for one non-empty input line plus a text field containing the original line. For example, if the file contains The cat sucks.\n\nThis is neutral., the JSON report should contain two objects, one with "text": "The cat sucks." and one with "text": "This is neutral.", and no object for the blank line.
With -o tsv, stdout should be a tab-separated table whose header starts with sentence followed by the feature names, and each non-empty input line should produce one row starting with the original sentence followed by the corresponding feature values. The TSV mode should also write the Excel import hint to stderr. With -o html, stdout should include the HTML usage hint and then an HTML document containing a bordered table; rows should be emitted only for input lines longer than three characters, with the first column containing the original sentence and the remaining columns containing feature values.
The command should provide argparse-style help: bsdetector --help exits 0 and prints usage including -i FILE and the -o {json,tsv,html} choices. Missing -i or an unsupported output type such as bsdetector -i input.txt -o csv should fail before analysis, print the parser error to stderr, and exit with status 2. If the input file cannot be opened, the command should fail with a non-zero exit instead of emitting a partial report.