@bloomai/cli 0.1.5 → 0.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/dist/index.js +162 -34
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -234,6 +234,7 @@ bloom sectors
|
|
|
234
234
|
|
|
235
235
|
## Tips
|
|
236
236
|
|
|
237
|
+
- **Every command has `--help` with examples.** Run `bloom <command> --help` to see usage patterns, available options, and practical examples.
|
|
237
238
|
- Use `-o` to download data to files, then `jq` to extract. Saves context tokens.
|
|
238
239
|
- Batch multiple tickers: `bloom info AAPL MSFT GOOG` (up to 10).
|
|
239
240
|
- Use `bloom screen` first to narrow your universe, then deep-dive with other commands.
|
package/dist/index.js
CHANGED
|
@@ -376,7 +376,12 @@ function formatSection(obj, indent = "") {
|
|
|
376
376
|
function registerNewsCommand(program2) {
|
|
377
377
|
addGlobalOptions(
|
|
378
378
|
program2.command("news").description("Recent news from Benzinga channels").argument("<symbols...>", "Ticker symbols").option("--limit <n>", "Max articles (default: 15)", "15")
|
|
379
|
-
).
|
|
379
|
+
).addHelpText("after", `
|
|
380
|
+
Examples:
|
|
381
|
+
$ bloom news AAPL Latest Apple news
|
|
382
|
+
$ bloom news AAPL MSFT GOOGL News for multiple stocks
|
|
383
|
+
$ bloom news TSLA --limit 5 Last 5 Tesla articles
|
|
384
|
+
`).action(async (symbols, opts) => {
|
|
380
385
|
const data = await callTool("get_news_for_symbols", {
|
|
381
386
|
symbols: symbols.map((s) => s.toUpperCase()),
|
|
382
387
|
limit: parseIntSafe(opts.limit, 15)
|
|
@@ -412,7 +417,13 @@ function formatNews(data, opts) {
|
|
|
412
417
|
function registerPriceCommand(program2) {
|
|
413
418
|
addGlobalOptions(
|
|
414
419
|
program2.command("price").description("Historical price data").argument("<symbol>", "Ticker symbol").option("--timeframes <tf>", "Comma-separated: 1d,1w,1m,3m,6m,ytd,1y,2y,5y", "1d,1m,1y").option("--ohlc", "Include full OHLC data")
|
|
415
|
-
).
|
|
420
|
+
).addHelpText("after", `
|
|
421
|
+
Examples:
|
|
422
|
+
$ bloom price AAPL Default timeframes (1d, 1m, 1y)
|
|
423
|
+
$ bloom price TSLA --timeframes 1d,5y Daily and 5-year price history
|
|
424
|
+
$ bloom price MSFT --ohlc Include open/high/low/close
|
|
425
|
+
$ bloom price AAPL -f csv -o prices.csv Export to CSV file
|
|
426
|
+
`).action(async (symbol, opts) => {
|
|
416
427
|
const data = await callTool("get_price_charts", {
|
|
417
428
|
symbol: symbol.toUpperCase(),
|
|
418
429
|
timeframes: opts.timeframes.split(",").map((t) => t.trim()),
|
|
@@ -481,7 +492,13 @@ var CHART_TYPES = [
|
|
|
481
492
|
function registerFinancialsCommand(program2) {
|
|
482
493
|
addGlobalOptions(
|
|
483
494
|
program2.command("financials").description("Quarterly/annual financial data with YoY growth").argument("<symbol>", "Ticker symbol").option("--type <type>", "Chart type: " + CHART_TYPES.join(", "), "revenue")
|
|
484
|
-
).
|
|
495
|
+
).addHelpText("after", `
|
|
496
|
+
Examples:
|
|
497
|
+
$ bloom financials AAPL Revenue (default)
|
|
498
|
+
$ bloom financials TSLA --type operating_margin Operating margin trend
|
|
499
|
+
$ bloom financials MSFT --type free_cash_flow Free cash flow history
|
|
500
|
+
$ bloom financials NVDA --type net_earnings_growth Earnings growth rate
|
|
501
|
+
`).action(async (symbol, opts) => {
|
|
485
502
|
const data = await callTool("get_financial_charts", {
|
|
486
503
|
symbol: symbol.toUpperCase(),
|
|
487
504
|
chart_type: opts.type
|
|
@@ -500,7 +517,11 @@ var SECTIONS = [
|
|
|
500
517
|
function registerSentimentCommand(program2) {
|
|
501
518
|
addGlobalOptions(
|
|
502
519
|
program2.command("sentiment").description("Market mood: AAII, Fear&Greed, VIX, momentum").option("--sections <s>", "Comma-separated: " + SECTIONS.join(","))
|
|
503
|
-
).
|
|
520
|
+
).addHelpText("after", `
|
|
521
|
+
Examples:
|
|
522
|
+
$ bloom sentiment All sentiment indicators
|
|
523
|
+
$ bloom sentiment --sections aaii_sentiment,cnn_fear_greed Just AAII and Fear & Greed
|
|
524
|
+
`).action(async (opts) => {
|
|
504
525
|
const args = {};
|
|
505
526
|
if (opts.sections) {
|
|
506
527
|
args.sections = opts.sections.split(",").map((s) => s.trim());
|
|
@@ -536,7 +557,14 @@ function formatSentiment(data) {
|
|
|
536
557
|
function registerMarketCommand(program2) {
|
|
537
558
|
addGlobalOptions(
|
|
538
559
|
program2.command("market").description("Market performance, sectors, global").option("--type <type>", "top_movers|sector_breakdown|global_markets|major_indexes", "top_movers").option("--period <p>", "1d|1w|1m|3m|6m|ytd|1y|5y", "1d").option("--limit <n>", "Max stocks for top_movers", "24").option("--universe <u>", "all|sp500|international|crypto|community", "all")
|
|
539
|
-
).
|
|
560
|
+
).addHelpText("after", `
|
|
561
|
+
Examples:
|
|
562
|
+
$ bloom market Today's top movers
|
|
563
|
+
$ bloom market --type sector_breakdown Sector performance
|
|
564
|
+
$ bloom market --type global_markets Global market overview
|
|
565
|
+
$ bloom market --type top_movers --period 1w Weekly top movers
|
|
566
|
+
$ bloom market --universe sp500 --limit 10 Top 10 S&P 500 movers
|
|
567
|
+
`).action(async (opts) => {
|
|
540
568
|
const data = await callTool("get_market_map", {
|
|
541
569
|
map_type: opts.type,
|
|
542
570
|
period: opts.period,
|
|
@@ -551,7 +579,13 @@ function registerMarketCommand(program2) {
|
|
|
551
579
|
function registerCollectionsCommand(program2) {
|
|
552
580
|
addGlobalOptions(
|
|
553
581
|
program2.command("collections").description("Curated stock collections by theme").option("--section <s>", "GET_STARTED|VALUE|TRENDS|BEAT_UP|FAMOUS_INVESTORS|HIGH_FLYERS|SECTORS|GEO|LEADERBOARDS", "GET_STARTED").option("--limit <n>", "Max collections", "6")
|
|
554
|
-
).
|
|
582
|
+
).addHelpText("after", `
|
|
583
|
+
Examples:
|
|
584
|
+
$ bloom collections Default collections
|
|
585
|
+
$ bloom collections --section VALUE Value investing picks
|
|
586
|
+
$ bloom collections --section FAMOUS_INVESTORS Famous investor portfolios
|
|
587
|
+
$ bloom collections --section TRENDS --limit 3 Top 3 trending collections
|
|
588
|
+
`).action(async (opts) => {
|
|
555
589
|
const data = await callTool("get_collections", {
|
|
556
590
|
section: opts.section,
|
|
557
591
|
limit: parseIntSafe(opts.limit, 6)
|
|
@@ -618,7 +652,11 @@ function formatScreen(data, opts) {
|
|
|
618
652
|
function registerEarningsCommand(program2) {
|
|
619
653
|
addGlobalOptions(
|
|
620
654
|
program2.command("earnings").description("Earnings history, estimates, surprises").argument("<symbols...>", "Ticker symbols (up to 5)")
|
|
621
|
-
).
|
|
655
|
+
).addHelpText("after", `
|
|
656
|
+
Examples:
|
|
657
|
+
$ bloom earnings AAPL Apple earnings history and surprises
|
|
658
|
+
$ bloom earnings AAPL MSFT GOOGL Compare earnings for multiple stocks
|
|
659
|
+
`).action(async (symbols, opts) => {
|
|
622
660
|
const data = await callTool("analyze_earnings", {
|
|
623
661
|
symbols: symbols.map((s) => s.toUpperCase()).slice(0, 5)
|
|
624
662
|
});
|
|
@@ -630,16 +668,24 @@ function registerEarningsCommand(program2) {
|
|
|
630
668
|
function registerEarningsCalendarCommand(program2) {
|
|
631
669
|
addGlobalOptions(
|
|
632
670
|
program2.command("earnings-calendar").description(
|
|
633
|
-
"Upcoming earnings dates
|
|
634
|
-
).argument("
|
|
635
|
-
).
|
|
671
|
+
"Upcoming earnings dates (all companies, or filter by symbols)"
|
|
672
|
+
).argument("[symbols...]", "Ticker symbols (omit to show all)").option("--days <n>", "Look-ahead window in days (1-90)", "28")
|
|
673
|
+
).addHelpText("after", `
|
|
674
|
+
Examples:
|
|
675
|
+
$ bloom earnings-calendar AAPL MSFT GOOGL Upcoming earnings for these stocks
|
|
676
|
+
$ bloom earnings-calendar TSLA --days 7 Earnings within the next week
|
|
677
|
+
$ bloom earnings-calendar NVDA --days 90 Earnings within 90 days
|
|
678
|
+
`).action(
|
|
636
679
|
async (symbols, opts) => {
|
|
637
680
|
const days = parseIntSafe(opts.days, 28);
|
|
638
|
-
const
|
|
639
|
-
|
|
640
|
-
symbols
|
|
641
|
-
|
|
642
|
-
|
|
681
|
+
const params = { days: String(days) };
|
|
682
|
+
if (symbols.length > 0) {
|
|
683
|
+
params.symbols = symbols.map((s) => s.toUpperCase()).join(",");
|
|
684
|
+
}
|
|
685
|
+
const data = await callRest(
|
|
686
|
+
"/markets/earnings-calendar/",
|
|
687
|
+
params
|
|
688
|
+
);
|
|
643
689
|
const items = data.results ?? [];
|
|
644
690
|
outputResult(items, opts, (d, o) => {
|
|
645
691
|
const rows = d;
|
|
@@ -665,7 +711,13 @@ var SECTIONS2 = ["technical_indicators", "options_analysis", "insider_activity"]
|
|
|
665
711
|
function registerTechnicalsCommand(program2) {
|
|
666
712
|
addGlobalOptions(
|
|
667
713
|
program2.command("technicals").description("RSI, MAs, patterns, options flow, insider trades").argument("<symbols...>", "Ticker symbols (up to 5)").option("--sections <s>", "Comma-separated: " + SECTIONS2.join(","))
|
|
668
|
-
).
|
|
714
|
+
).addHelpText("after", `
|
|
715
|
+
Examples:
|
|
716
|
+
$ bloom technicals AAPL All technical data
|
|
717
|
+
$ bloom technicals TSLA --sections technical_indicators RSI, MAs, patterns only
|
|
718
|
+
$ bloom technicals NVDA --sections options_analysis Options flow only
|
|
719
|
+
$ bloom technicals AAPL --sections insider_activity Insider trades only
|
|
720
|
+
`).action(async (symbols, opts) => {
|
|
669
721
|
const args = {
|
|
670
722
|
symbols: symbols.map((s) => s.toUpperCase()).slice(0, 5)
|
|
671
723
|
};
|
|
@@ -681,7 +733,13 @@ function registerTechnicalsCommand(program2) {
|
|
|
681
733
|
function registerOptionsCommand(program2) {
|
|
682
734
|
addGlobalOptions(
|
|
683
735
|
program2.command("options-history").description("Options sentiment evolution over time").argument("<symbol>", "Ticker symbol").option("--days <n>", "Lookback days (7-90)", "30").option("--weekly", "Use weekly sampling (default)").option("--daily", "Use daily data").option("--greeks", "Include advanced Greeks analysis")
|
|
684
|
-
).
|
|
736
|
+
).addHelpText("after", `
|
|
737
|
+
Examples:
|
|
738
|
+
$ bloom options-history AAPL 30-day options sentiment (default)
|
|
739
|
+
$ bloom options-history TSLA --days 90 90-day lookback
|
|
740
|
+
$ bloom options-history NVDA --daily Daily granularity
|
|
741
|
+
$ bloom options-history AAPL --greeks Include advanced Greeks analysis
|
|
742
|
+
`).action(
|
|
685
743
|
async (symbol, opts) => {
|
|
686
744
|
const data = await callTool("analyze_options_history", {
|
|
687
745
|
symbol: symbol.toUpperCase(),
|
|
@@ -717,7 +775,11 @@ function registerPortfolioCommand(program2) {
|
|
|
717
775
|
function registerTradesCommand(program2) {
|
|
718
776
|
addGlobalOptions(
|
|
719
777
|
program2.command("trades").description("AI trade evaluation").argument("<trades...>", 'Trade descriptions: "Buy AAPL 30% because..." "Sell MSFT 20% because..."')
|
|
720
|
-
).
|
|
778
|
+
).addHelpText("after", `
|
|
779
|
+
Examples:
|
|
780
|
+
$ bloom trades "Buy AAPL 30% because of strong iPhone sales"
|
|
781
|
+
$ bloom trades "Sell MSFT 20% to take profits" "Buy GOOGL 15% on AI momentum"
|
|
782
|
+
`).action(async (tradeStrs, opts) => {
|
|
721
783
|
const trades = tradeStrs.map(parseTrade);
|
|
722
784
|
const data = await callTool("analyze_trades", { trades });
|
|
723
785
|
outputResult(data, opts);
|
|
@@ -750,7 +812,11 @@ Format: "Buy AAPL 30% because thesis" or JSON object`
|
|
|
750
812
|
function registerCatalystsCommand(program2) {
|
|
751
813
|
addGlobalOptions(
|
|
752
814
|
program2.command("catalysts").description("Forward-looking value catalysts").argument("<symbols...>", "Ticker symbols (up to 5)")
|
|
753
|
-
).
|
|
815
|
+
).addHelpText("after", `
|
|
816
|
+
Examples:
|
|
817
|
+
$ bloom catalysts AAPL Upcoming catalysts for Apple
|
|
818
|
+
$ bloom catalysts TSLA NVDA AMZN Catalysts for multiple stocks
|
|
819
|
+
`).action(async (symbols, opts) => {
|
|
754
820
|
const data = await callTool("generate_catalysts", {
|
|
755
821
|
symbols: symbols.map((s) => s.toUpperCase()).slice(0, 5)
|
|
756
822
|
});
|
|
@@ -896,7 +962,12 @@ function truncate2(s, max) {
|
|
|
896
962
|
function registerAiPortfolioCommand(program2) {
|
|
897
963
|
addGlobalOptions(
|
|
898
964
|
program2.command("ai-portfolio").description("Current portfolio positions held by AI models (InvestingArena live accounts)").option("--model <m>", "Filter by AI model: claude|openai|gemini")
|
|
899
|
-
).
|
|
965
|
+
).addHelpText("after", `
|
|
966
|
+
Examples:
|
|
967
|
+
$ bloom ai-portfolio All AI model portfolios
|
|
968
|
+
$ bloom ai-portfolio --model claude Claude's current positions
|
|
969
|
+
$ bloom ai-portfolio --model openai OpenAI's current positions
|
|
970
|
+
`).action(async (opts) => {
|
|
900
971
|
const args = {};
|
|
901
972
|
if (opts.model) args.ai_model = opts.model;
|
|
902
973
|
const data = await callTool("get_ai_trade_ideas", args);
|
|
@@ -1117,7 +1188,12 @@ function fmtNum(v) {
|
|
|
1117
1188
|
function registerCorrelationCommand(program2) {
|
|
1118
1189
|
addGlobalOptions(
|
|
1119
1190
|
program2.command("correlation").description("Correlation matrix for a set of symbols").argument("<symbols...>", "Ticker symbols (2+)").option("--start <date>", "Start date (YYYY-MM-DD)").option("--end <date>", "End date (YYYY-MM-DD)")
|
|
1120
|
-
).
|
|
1191
|
+
).addHelpText("after", `
|
|
1192
|
+
Examples:
|
|
1193
|
+
$ bloom correlation AAPL MSFT GOOGL Correlation matrix
|
|
1194
|
+
$ bloom correlation AAPL TSLA --start 2025-01-01 Since Jan 2025
|
|
1195
|
+
$ bloom correlation SPY QQQ IWM --start 2024-01-01 --end 2024-12-31 Full year
|
|
1196
|
+
`).action(async (symbols, opts) => {
|
|
1121
1197
|
const params = {
|
|
1122
1198
|
symbols: symbols.map((s) => s.toUpperCase()).join(",")
|
|
1123
1199
|
};
|
|
@@ -1143,7 +1219,11 @@ function formatCorrelation(data) {
|
|
|
1143
1219
|
function registerRiskCommand(program2) {
|
|
1144
1220
|
addGlobalOptions(
|
|
1145
1221
|
program2.command("risk").description("Risk factors for a stock").argument("<symbol>", "Ticker symbol")
|
|
1146
|
-
).
|
|
1222
|
+
).addHelpText("after", `
|
|
1223
|
+
Examples:
|
|
1224
|
+
$ bloom risk AAPL Risk factors for Apple
|
|
1225
|
+
$ bloom risk TSLA Risk factors for Tesla
|
|
1226
|
+
`).action(async (symbol, opts) => {
|
|
1147
1227
|
const data = await callRest(`investments/${symbol.toUpperCase()}/risk_factors/`);
|
|
1148
1228
|
outputResult(data, opts, formatRisk);
|
|
1149
1229
|
});
|
|
@@ -1218,7 +1298,12 @@ function formatDrawdown(data) {
|
|
|
1218
1298
|
function registerMacroCommand(program2) {
|
|
1219
1299
|
addGlobalOptions(
|
|
1220
1300
|
program2.command("macro").description("Macroeconomic indicators (GDP, CPI, unemployment, fed funds, treasury, inflation)").option("--indicators <list>", "Comma-separated: GDP,CPI,UNEMPLOYMENT,FED_FUNDS,TREASURY_10Y,INFLATION")
|
|
1221
|
-
).
|
|
1301
|
+
).addHelpText("after", `
|
|
1302
|
+
Examples:
|
|
1303
|
+
$ bloom macro All macro indicators
|
|
1304
|
+
$ bloom macro --indicators GDP,CPI,UNEMPLOYMENT Specific indicators only
|
|
1305
|
+
$ bloom macro --indicators FED_FUNDS,TREASURY_10Y Interest rates
|
|
1306
|
+
`).action(async (opts) => {
|
|
1222
1307
|
const args = {};
|
|
1223
1308
|
if (opts.indicators) {
|
|
1224
1309
|
args.indicators = opts.indicators;
|
|
@@ -1255,7 +1340,11 @@ function formatMacro(data) {
|
|
|
1255
1340
|
function registerSectorsCommand(program2) {
|
|
1256
1341
|
addGlobalOptions(
|
|
1257
1342
|
program2.command("sectors").description("Sector performance across time periods")
|
|
1258
|
-
).
|
|
1343
|
+
).addHelpText("after", `
|
|
1344
|
+
Examples:
|
|
1345
|
+
$ bloom sectors Sector performance across all time periods
|
|
1346
|
+
$ bloom sectors -f json Output as JSON
|
|
1347
|
+
`).action(async (opts) => {
|
|
1259
1348
|
const data = await callTool("get_sector_performance", {});
|
|
1260
1349
|
outputResult(data, opts, formatSectors);
|
|
1261
1350
|
});
|
|
@@ -1309,7 +1398,11 @@ function formatSectors(data) {
|
|
|
1309
1398
|
function registerDcfCommand(program2) {
|
|
1310
1399
|
addGlobalOptions(
|
|
1311
1400
|
program2.command("dcf").description("Discounted cash flow valuation").argument("<symbol>", "Ticker symbol")
|
|
1312
|
-
).
|
|
1401
|
+
).addHelpText("after", `
|
|
1402
|
+
Examples:
|
|
1403
|
+
$ bloom dcf AAPL Discounted cash flow valuation for Apple
|
|
1404
|
+
$ bloom dcf TSLA DCF valuation for Tesla
|
|
1405
|
+
`).action(async (symbol, opts) => {
|
|
1313
1406
|
const sym = symbol.toUpperCase();
|
|
1314
1407
|
const result = await callTool("get_dcf_valuation", { symbol: sym });
|
|
1315
1408
|
outputResult(result, opts, () => formatDcf(result, sym));
|
|
@@ -1336,7 +1429,12 @@ function formatDcf(data, symbol) {
|
|
|
1336
1429
|
function registerHoldersCommand(program2) {
|
|
1337
1430
|
addGlobalOptions(
|
|
1338
1431
|
program2.command("holders").description("Institutional and mutual fund holders").argument("<symbol>", "Ticker symbol").option("--type <t>", "institutional or mutual-fund (default: both)").option("--limit <n>", "Max holders to show", "15")
|
|
1339
|
-
).
|
|
1432
|
+
).addHelpText("after", `
|
|
1433
|
+
Examples:
|
|
1434
|
+
$ bloom holders AAPL All holders (institutional + mutual fund)
|
|
1435
|
+
$ bloom holders TSLA --type institutional Institutional holders only
|
|
1436
|
+
$ bloom holders NVDA --limit 5 Top 5 holders
|
|
1437
|
+
`).action(async (symbol, opts) => {
|
|
1340
1438
|
const sym = symbol.toUpperCase();
|
|
1341
1439
|
const limit = parseIntSafe(opts.limit, 15);
|
|
1342
1440
|
const args = { symbol: sym };
|
|
@@ -1378,7 +1476,11 @@ function fmtNum2(v) {
|
|
|
1378
1476
|
function registerShortInterestCommand(program2) {
|
|
1379
1477
|
addGlobalOptions(
|
|
1380
1478
|
program2.command("short-interest").description("Short interest history").argument("<symbol>", "Ticker symbol").option("--limit <n>", "Number of records", "10")
|
|
1381
|
-
).
|
|
1479
|
+
).addHelpText("after", `
|
|
1480
|
+
Examples:
|
|
1481
|
+
$ bloom short-interest GME Short interest history for GameStop
|
|
1482
|
+
$ bloom short-interest AMC --limit 20 Last 20 short interest records
|
|
1483
|
+
`).action(async (symbol, opts) => {
|
|
1382
1484
|
const sym = symbol.toUpperCase();
|
|
1383
1485
|
const limit = parseIntSafe(opts.limit, 10);
|
|
1384
1486
|
const data = await callTool("get_short_interest", { symbol: sym, limit });
|
|
@@ -1411,7 +1513,11 @@ function fmtNum3(v) {
|
|
|
1411
1513
|
function registerInsiderCommand(program2) {
|
|
1412
1514
|
addGlobalOptions(
|
|
1413
1515
|
program2.command("insider").description("Insider trading activity (SEC Form 4)").argument("<symbol>", "Ticker symbol").option("--limit <n>", "Max transactions to show", "20")
|
|
1414
|
-
).
|
|
1516
|
+
).addHelpText("after", `
|
|
1517
|
+
Examples:
|
|
1518
|
+
$ bloom insider AAPL Recent insider trades for Apple
|
|
1519
|
+
$ bloom insider TSLA --limit 5 Last 5 insider transactions
|
|
1520
|
+
`).action(async (symbol, opts) => {
|
|
1415
1521
|
const sym = symbol.toUpperCase();
|
|
1416
1522
|
const limit = parseIntSafe(opts.limit, 20);
|
|
1417
1523
|
const data = await callTool("get_insider_trading", { symbol: sym, limit });
|
|
@@ -1445,7 +1551,12 @@ function fmtNum4(v) {
|
|
|
1445
1551
|
function registerDividendsCommand(program2) {
|
|
1446
1552
|
addGlobalOptions(
|
|
1447
1553
|
program2.command("dividends").description("Dividend history for a stock").argument("<symbol>", "Ticker symbol").option("--limit <n>", "Number of records", "20").option("--from <date>", "Start date (YYYY-MM-DD)")
|
|
1448
|
-
).
|
|
1554
|
+
).addHelpText("after", `
|
|
1555
|
+
Examples:
|
|
1556
|
+
$ bloom dividends KO Dividend history for Coca-Cola
|
|
1557
|
+
$ bloom dividends AAPL --limit 8 Last 8 dividends
|
|
1558
|
+
$ bloom dividends JNJ --from 2024-01-01 Dividends since Jan 2024
|
|
1559
|
+
`).action(async (symbol, opts) => {
|
|
1449
1560
|
const sym = symbol.toUpperCase();
|
|
1450
1561
|
const limit = parseIntSafe(opts.limit, 20);
|
|
1451
1562
|
const args = { symbol: sym, limit };
|
|
@@ -1471,7 +1582,11 @@ function formatDividends(data) {
|
|
|
1471
1582
|
function registerSplitsCommand(program2) {
|
|
1472
1583
|
addGlobalOptions(
|
|
1473
1584
|
program2.command("splits").description("Stock split history").argument("<symbol>", "Ticker symbol").option("--from <date>", "Start date (YYYY-MM-DD)")
|
|
1474
|
-
).
|
|
1585
|
+
).addHelpText("after", `
|
|
1586
|
+
Examples:
|
|
1587
|
+
$ bloom splits AAPL Stock split history for Apple
|
|
1588
|
+
$ bloom splits TSLA --from 2020-01-01 Splits since 2020
|
|
1589
|
+
`).action(async (symbol, opts) => {
|
|
1475
1590
|
const sym = symbol.toUpperCase();
|
|
1476
1591
|
const args = { symbol: sym };
|
|
1477
1592
|
if (opts.from) args.from_date = opts.from;
|
|
@@ -1492,7 +1607,11 @@ function formatSplits(data) {
|
|
|
1492
1607
|
function registerIpoCommand(program2) {
|
|
1493
1608
|
addGlobalOptions(
|
|
1494
1609
|
program2.command("ipo").description("Upcoming and recent IPOs").option("--from <date>", "Start date (YYYY-MM-DD)").option("--to <date>", "End date (YYYY-MM-DD)")
|
|
1495
|
-
).
|
|
1610
|
+
).addHelpText("after", `
|
|
1611
|
+
Examples:
|
|
1612
|
+
$ bloom ipo Recent and upcoming IPOs
|
|
1613
|
+
$ bloom ipo --from 2025-01-01 --to 2025-06-30 IPOs in H1 2025
|
|
1614
|
+
`).action(async (opts) => {
|
|
1496
1615
|
const args = {};
|
|
1497
1616
|
if (opts.from) args.from_date = opts.from;
|
|
1498
1617
|
if (opts.to) args.to_date = opts.to;
|
|
@@ -1525,7 +1644,12 @@ function fmtNum5(v) {
|
|
|
1525
1644
|
function registerCompareCommand(program2) {
|
|
1526
1645
|
addGlobalOptions(
|
|
1527
1646
|
program2.command("compare").description("Side-by-side comparison of stocks").argument("<symbols...>", "Ticker symbols (2-10)")
|
|
1528
|
-
).
|
|
1647
|
+
).addHelpText("after", `
|
|
1648
|
+
Examples:
|
|
1649
|
+
$ bloom compare AAPL MSFT Side-by-side comparison
|
|
1650
|
+
$ bloom compare AAPL MSFT GOOGL AMZN Compare big tech stocks
|
|
1651
|
+
$ bloom compare TSLA RIVN LCID Compare EV manufacturers
|
|
1652
|
+
`).action(async (symbols, opts) => {
|
|
1529
1653
|
const syms = symbols.map((s) => s.toUpperCase()).slice(0, 10);
|
|
1530
1654
|
const data = await callTool("get_symbols_metadata", { symbols: syms });
|
|
1531
1655
|
outputResult(data, opts, (d) => formatComparison(d, syms));
|
|
@@ -1582,7 +1706,11 @@ function fmtCap(v) {
|
|
|
1582
1706
|
function registerRatingsCommand(program2) {
|
|
1583
1707
|
addGlobalOptions(
|
|
1584
1708
|
program2.command("ratings").description("Analyst ratings, grades, and price targets").argument("<symbol>", "Ticker symbol").option("--limit <n>", "Max records to show", "20")
|
|
1585
|
-
).
|
|
1709
|
+
).addHelpText("after", `
|
|
1710
|
+
Examples:
|
|
1711
|
+
$ bloom ratings AAPL Analyst ratings and price targets
|
|
1712
|
+
$ bloom ratings NVDA --limit 5 Last 5 analyst actions
|
|
1713
|
+
`).action(async (symbol, opts) => {
|
|
1586
1714
|
const sym = symbol.toUpperCase();
|
|
1587
1715
|
const limit = parseIntSafe(opts.limit, 20);
|
|
1588
1716
|
const result = await callTool("get_analyst_ratings", { symbol: sym, limit });
|
|
@@ -1629,7 +1757,7 @@ function fmtNum6(v) {
|
|
|
1629
1757
|
var program = new Command();
|
|
1630
1758
|
var __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
1631
1759
|
var pkgPath = path.join(__dirname, "..", "package.json");
|
|
1632
|
-
var compiledVersion = "0.1.
|
|
1760
|
+
var compiledVersion = "0.1.6".length > 0 ? "0.1.6" : void 0;
|
|
1633
1761
|
var envVersion = process.env.BLOOM_CLI_VERSION ?? process.env.npm_package_version;
|
|
1634
1762
|
var fallbackVersion = compiledVersion ?? "unknown";
|
|
1635
1763
|
var cliVersion = envVersion ?? fallbackVersion;
|