@bloomai/cli 0.1.9 → 0.1.10

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 CHANGED
@@ -17,6 +17,7 @@ export BLOOM_API_KEY=<your-key>
17
17
 
18
18
  ```bash
19
19
  # 1. Find what you need
20
+ bloom feed --limit 5 # Bloom's curated stories worth researching
20
21
  bloom info AAPL # fundamentals, ratings, peers
21
22
  bloom info AAPL --fields basic_metadata,bottom_line_ratings # specific sections only
22
23
 
@@ -37,6 +38,7 @@ jq '.data[] | select(.revenue_growth > 0.1)' /tmp/bloom/aapl-revenue.json
37
38
  ### Core Research
38
39
  | Command | What it does | Example |
39
40
  |---------|-------------|---------|
41
+ | `feed` | Bloom's shared discovery feed, in ranked order | `bloom feed --limit 5 --format json` |
40
42
  | `info` (alias: `quote`) | Company fundamentals, ratings, peers, current price | `bloom info AAPL MSFT` |
41
43
  | `news` | Recent news headlines | `bloom news AAPL --limit 5` |
42
44
  | `price` | Historical price data | `bloom price AAPL --timeframes 1d,1m,1y` |
@@ -49,6 +51,11 @@ jq '.data[] | select(.revenue_growth > 0.1)' /tmp/bloom/aapl-revenue.json
49
51
  | `transcript` | Search earnings call transcripts | `bloom transcript AAPL "AI" "services"` |
50
52
  | `compare` | Side-by-side stock comparison | `bloom compare AAPL MSFT GOOG` |
51
53
 
54
+ `bloom feed` reads the latest eligible prepared stories each time. It defaults
55
+ to 10 stories (range: 1–50). The JSON output includes the headline, available
56
+ summary, tickers, timestamps, and a link to the Bloom story for each item.
57
+ Results are shared across users and available with a Bloom MCP API key.
58
+
52
59
  ### Valuation & Risk
53
60
  | Command | What it does | Example |
54
61
  |---------|-------------|---------|
@@ -132,7 +139,7 @@ done
132
139
  ### Screen → Deep Dive
133
140
  ```bash
134
141
  # Find cheap large-caps
135
- bloom screen "market_cap > 50B" "pe_ratio < 20" "dividend_yield > 2" -o /tmp/bloom/screened.json
142
+ bloom screen "market_cap > 50B" "pe_ratio < 20" "dividend_yield > 2%" -o /tmp/bloom/screened.json
136
143
 
137
144
  # Get the tickers
138
145
  tickers=$(jq -r '.results[].symbol' /tmp/bloom/screened.json | head -5 | tr '\n' ' ')
package/SKILL.md CHANGED
@@ -13,6 +13,7 @@ export BLOOM_API_KEY=<your-key>
13
13
 
14
14
  ```bash
15
15
  # 1. Find what you need
16
+ bloom feed --limit 5 --format json # shortlist of developments selected by Bloom
16
17
  bloom info AAPL # fundamentals, ratings, peers (`bloom quote` is an alias)
17
18
  bloom info AAPL --fields basic_metadata,bottom_line_ratings # specific sections only
18
19
 
@@ -32,6 +33,7 @@ jq '.data[] | select(.revenue_growth > 0.1)' /tmp/bloom/aapl-revenue.json
32
33
 
33
34
  | Command | What it does | Example |
34
35
  |---------|-------------|---------|
36
+ | `feed` | Curated stories in Bloom's shared discovery order | `bloom feed --limit 5 --format json` |
35
37
  | `info` | Company fundamentals, ratings, peers | `bloom info AAPL MSFT` |
36
38
  | `news` | Recent news headlines | `bloom news AAPL --limit 5` |
37
39
  | `price` | Historical price data | `bloom price AAPL --timeframes 1d,1m,1y` |
@@ -55,6 +57,13 @@ jq '.data[] | select(.revenue_growth > 0.1)' /tmp/bloom/aapl-revenue.json
55
57
  | `search` | Web search via Serper (Google) | `bloom search "nvidia earnings Q1 2026"` |
56
58
  | `scrape` | Scrape a web page via Firecrawl | `bloom scrape https://example.com` |
57
59
 
60
+ For “what should I pay attention to?”, start with `bloom feed` or call the Bloom
61
+ MCP tool `get_feed` with `{"limit": 5}`. Both default to 10 stories and allow
62
+ 1–50. Keep the returned order. Summarize the development using the headline
63
+ and any available summary, and cite its `story_url`. These are leads for
64
+ research. If `items` is empty, report that no prepared stories are available.
65
+ On error, report that Bloom's feed could not be read.
66
+
58
67
  ## Environment Variables
59
68
 
60
69
  | Variable | Required for | Description |
@@ -95,7 +104,7 @@ done
95
104
  ### Screen → Deep Dive
96
105
  ```bash
97
106
  # Find cheap large-caps
98
- bloom screen "market_cap > 50B" "pe_ratio < 20" "dividend_yield > 2" -o /tmp/bloom/screened.json
107
+ bloom screen "market_cap > 50B" "pe_ratio < 20" "dividend_yield > 2%" -o /tmp/bloom/screened.json
99
108
 
100
109
  # Get the tickers
101
110
  tickers=$(jq -r '.results[].symbol' /tmp/bloom/screened.json | head -5 | tr '\n' ' ')
package/dist/index.js CHANGED
@@ -347,7 +347,7 @@ async function verifyApiKey(apiKey) {
347
347
  }
348
348
  return "unverified";
349
349
  }
350
- async function callTool(toolName, args) {
350
+ async function callTool(toolName, args, signal) {
351
351
  const apiKey = requireApiKey();
352
352
  requestId++;
353
353
  const mcpUrl = `${_apiBase}/mcp/`;
@@ -369,7 +369,8 @@ async function callTool(toolName, args) {
369
369
  Authorization: `Bearer ${apiKey}`,
370
370
  "Content-Type": "application/json"
371
371
  },
372
- body: JSON.stringify(body)
372
+ body: JSON.stringify(body),
373
+ signal
373
374
  });
374
375
  const elapsed = Math.round(performance.now() - start);
375
376
  debugLog(`\u2190 ${res.status} (${elapsed}ms)`);
@@ -716,6 +717,9 @@ var BloomClient = class _BloomClient {
716
717
  async getMarketBriefing() {
717
718
  return callTool("get_market_briefing", {});
718
719
  }
720
+ async getFeed(limit) {
721
+ return callTool("get_feed", { limit }, AbortSignal.timeout(15e3));
722
+ }
719
723
  // --- Sentiment ---
720
724
  async getSentiment(sections) {
721
725
  const args = {};
@@ -1111,6 +1115,37 @@ function registerBriefingCommand(program2) {
1111
1115
  });
1112
1116
  }
1113
1117
 
1118
+ // src/commands/feed.ts
1119
+ var MAX_STORIES = 50;
1120
+ function registerFeedCommand(program2) {
1121
+ addGlobalOptions(
1122
+ program2.command("feed").description("Bloom's curated investment discovery feed").option("--limit <n>", `Max stories (1\u2013${MAX_STORIES})`, "10")
1123
+ ).action(async (opts) => {
1124
+ const limit = parseIntArg(opts.limit, "--limit", 1, MAX_STORIES);
1125
+ const data = await BloomClient.instance().getFeed(limit);
1126
+ if (!data || typeof data !== "object" || !("items" in data) || !Array.isArray(data.items)) {
1127
+ throw new BloomError("Unexpected feed response from Bloom.");
1128
+ }
1129
+ const items = data.items;
1130
+ const rowsOnly = !opts.raw && (opts.format === "csv" || opts.format === "markdown");
1131
+ outputResult(rowsOnly ? items : data, opts, () => formatFeed(items));
1132
+ });
1133
+ }
1134
+ function terminalText(value) {
1135
+ return typeof value === "string" ? value.replace(new RegExp("\\p{Cc}+", "gu"), " ").trim() : "";
1136
+ }
1137
+ function formatFeed(items) {
1138
+ const stories = items.flatMap((item) => {
1139
+ if (!item || typeof item !== "object" || !("headline" in item)) return [];
1140
+ const headline = terminalText(item.headline);
1141
+ if (!headline) return [];
1142
+ const summary = "summary" in item ? terminalText(item.summary) : "";
1143
+ const url = "story_url" in item ? terminalText(item.story_url) : "";
1144
+ return [[headline, summary, url].filter(Boolean).join("\n")];
1145
+ });
1146
+ return stories.join("\n\n") || "No stories in the feed.";
1147
+ }
1148
+
1114
1149
  // src/commands/sentiment.ts
1115
1150
  var SECTIONS = [
1116
1151
  "aaii_sentiment",
@@ -2815,7 +2850,7 @@ Examples:
2815
2850
  var program = new Command3();
2816
2851
  var __dirname = path.dirname(fileURLToPath(import.meta.url));
2817
2852
  var pkgPath = path.join(__dirname, "..", "package.json");
2818
- var compiledVersion = "0.1.9".length > 0 ? "0.1.9" : void 0;
2853
+ var compiledVersion = "0.1.10".length > 0 ? "0.1.10" : void 0;
2819
2854
  var envVersion = process.env.BLOOM_CLI_VERSION ?? process.env.npm_package_version;
2820
2855
  var fallbackVersion = compiledVersion ?? "unknown";
2821
2856
  var cliVersion = envVersion ?? fallbackVersion;
@@ -2874,6 +2909,7 @@ registerRiskCommand(program);
2874
2909
  registerDrawdownCommand(program);
2875
2910
  registerMacroCommand(program);
2876
2911
  registerBriefingCommand(program);
2912
+ registerFeedCommand(program);
2877
2913
  registerSectorsCommand(program);
2878
2914
  registerDcfCommand(program);
2879
2915
  registerHoldersCommand(program);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bloomai/cli",
3
- "version": "0.1.9",
3
+ "version": "0.1.10",
4
4
  "description": "CLI tool for Bloom financial data - download market data to files for analysis",
5
5
  "repository": {
6
6
  "type": "git",