mirror of
https://github.com/0xrsydn/idx-cli.git
synced 2026-08-07 01:33:52 +00:00
3.1 KiB
3.1 KiB
Unified CLI Test Report
Date: 2026-03-06
Summary
- Unified CLI commands tested:
msn,news,export,extractor - Parser/validation tested with valid and invalid arguments
- Error handling standardized: command modules return errors; root handles exit code
- Remaining hard exit: only top-level
main()callsos.Exit(runRoot(...))
Command Matrix (Representative)
Root
go run .-> usage printed, exit1go run . --help-> usage printed, exit1go run . unknown-> usage +unknown command, exit1
MSN
go run . msn --help-> MSN usage, exit1go run . msn badcmd-> error unknown subcommand, exit1go run . msn lookup BBCA TLKM XXXX-> success, resolves BBCA/TLKM, unknown marked not found, exit0
msn screener
--help-> screener usage, exit0--region(missing value) -> error, exit1--limit nope-> parse error, exit1--filter invalid-> validation error, exit1- valid invocation attempted -> DNS failure to
assets.msn.comin this environment, exit1
msn fetch
--help-> fetch usage, exit0- no id source -> validation error, exit
1 --inputmissing value -> error, exit1--tickersmissing value -> error, exit1--concurrency nope-> parse error, exit1--inputmissing file -> FS error, exit1- valid with tickers -> success, output
/tmp/fetch_tickers.json, exit0 - valid with ids -> success, output
/tmp/fetch_ids.json, exit0
msn fetch-all
--help-> fetch-all usage, exit0--dbmissing value -> error, exit1--delay oops-> format error, exit1--rps nope-> parse error, exit1- valid
--index weird --limit 1-> fallback to all, success,/tmp/fetchall_weird.db, exit0 - valid
--index idx30 --limit 1-> success,/tmp/fetchall_idx30.db, exit0
News
go run . news --help-> news usage, exit1- valid news request attempted -> fails with missing
BRAVE_API_KEYin current shell env, exit1 --from bad-date-> parse error, exit1--to bad-date-> parse error, exit1--count nope-> parse error, exit1--concurrency nope-> parse error, exit1--outputmissing value -> error, exit1
Export
go run . export --help-> usage, exit1go run . export badtarget-> validation error, exit1go run . export dashboard --db /tmp/fetchall_idx30.db --output /tmp/dashboard_refactor.xlsx-> success, exit0go run . export history --db /tmp/fetchall_idx30.db --output /tmp/history_refactor.xlsx-> success, exit0
Extractor
go run . extractor-> usage, exit1go run . extractor --help-> usage, exit1
Produced Artifacts
/tmp/fetch_one.json/tmp/fetch_tickers.json/tmp/fetch_ids.json/tmp/fetchall_weird.db/tmp/fetchall_idx30.db/tmp/dashboard_refactor.xlsx/tmp/history_refactor.xlsx
Notes
- Network/API behavior is environment-dependent (DNS and API key availability).
newscommand requiresBRAVE_API_KEYin the running shell environment.- CLI behavior now consistently reports parse/validation/runtime errors without deep
log.Fatalexits.