@secapi/cli 1.0.1 → 1.0.2
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 +5 -1
- package/dist/index.js +88 -15
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -40,6 +40,10 @@ Run `bun run scripts/validate/check_cli_doc_snippets.ts` whenever CLI examples,
|
|
|
40
40
|
command names, or public Mintlify snippets change; it rewrites
|
|
41
41
|
`ops/docs-health/cli-doc-snippets/latest.json`.
|
|
42
42
|
|
|
43
|
+
Release order: publish `@secapi/sdk-js@1.0.2` before `@secapi/cli@1.0.2`.
|
|
44
|
+
The CLI package depends on `@secapi/sdk-js@^1.0.2`; validating the CLI against a
|
|
45
|
+
local sibling SDK is not enough until the SDK version is available on npm.
|
|
46
|
+
|
|
43
47
|
## Connect an agent
|
|
44
48
|
|
|
45
49
|
Wire the hosted MCP server into your agent client in one command:
|
|
@@ -102,7 +106,7 @@ secapi config profiles
|
|
|
102
106
|
Two binaries are installed: the preferred `secapi` and the compatibility alias `omni-sec`.
|
|
103
107
|
|
|
104
108
|
```bash
|
|
105
|
-
secapi --version # prints the bare package version, e.g. 1.0.
|
|
109
|
+
secapi --version # prints the bare package version, e.g. 1.0.2
|
|
106
110
|
secapi --help # short task-oriented help for common workflows
|
|
107
111
|
secapi help all # full command inventory
|
|
108
112
|
secapi examples # local starter workflows for humans and agents
|
package/dist/index.js
CHANGED
|
@@ -24249,7 +24249,7 @@ var APP_ONLY_DATABASE_URL_PARAMS = new Set([
|
|
|
24249
24249
|
]);
|
|
24250
24250
|
var DEFAULT_BASE_URL = "https://api.secapi.ai";
|
|
24251
24251
|
var DEFAULT_API_VERSION = "2026-03-19";
|
|
24252
|
-
var SDK_VERSION = "1.0.
|
|
24252
|
+
var SDK_VERSION = "1.0.2";
|
|
24253
24253
|
var POSTHOG_CAPTURE_HOST = "https://us.i.posthog.com";
|
|
24254
24254
|
var SAFE_RETRY_METHODS = new Set(["GET", "HEAD", "OPTIONS"]);
|
|
24255
24255
|
var RETRYABLE_STATUSES = new Set([408, 429, 502, 503, 504]);
|
|
@@ -26518,6 +26518,34 @@ function factorResponseParams2() {
|
|
|
26518
26518
|
include: getListFlag("--include") ?? getListFlag("--expand")
|
|
26519
26519
|
};
|
|
26520
26520
|
}
|
|
26521
|
+
function getMacroResponseModeFlag(name = "--response-mode") {
|
|
26522
|
+
const raw = getEnumFlag(name, ["compact", "standard", "verbose", "agent", "default"], "macro response mode");
|
|
26523
|
+
return raw === "default" ? "standard" : raw;
|
|
26524
|
+
}
|
|
26525
|
+
function getMacroViewResponseModeFlag(name = "--view") {
|
|
26526
|
+
const raw = getUniqueFlag(name);
|
|
26527
|
+
if (raw === undefined)
|
|
26528
|
+
return;
|
|
26529
|
+
const aliases = {
|
|
26530
|
+
agent: "agent",
|
|
26531
|
+
compact: "compact",
|
|
26532
|
+
default: "standard",
|
|
26533
|
+
standard: "standard",
|
|
26534
|
+
verbose: "verbose"
|
|
26535
|
+
};
|
|
26536
|
+
const normalized = raw.trim().toLowerCase();
|
|
26537
|
+
const mapped = aliases[normalized];
|
|
26538
|
+
if (mapped)
|
|
26539
|
+
return mapped;
|
|
26540
|
+
throw new Error(`${name} must be one of: default, agent, compact, standard, verbose (macro response view)`);
|
|
26541
|
+
}
|
|
26542
|
+
function macroResponseParams() {
|
|
26543
|
+
const include = getListFlag("--include") ?? getListFlag("--expand");
|
|
26544
|
+
return {
|
|
26545
|
+
response_mode: getMacroResponseModeFlag("--response-mode") ?? getMacroViewResponseModeFlag("--view"),
|
|
26546
|
+
include: include?.join(",")
|
|
26547
|
+
};
|
|
26548
|
+
}
|
|
26521
26549
|
function factorKeySelectionParams() {
|
|
26522
26550
|
return {
|
|
26523
26551
|
keys: getListFlag("--keys") ?? getListFlag("--factors"),
|
|
@@ -26984,10 +27012,40 @@ var COMMAND_HELP = {
|
|
|
26984
27012
|
examples: ["secapi macro search --q inflation --country US --limit 10"]
|
|
26985
27013
|
},
|
|
26986
27014
|
"macro indicators": {
|
|
26987
|
-
usage: "secapi macro indicators --indicator <key> [--country <country>]",
|
|
27015
|
+
usage: "secapi macro indicators --indicator <key> [--country <country>] [--response-mode compact|standard|verbose|agent]",
|
|
26988
27016
|
summary: "Fetch macro observations for one country and indicator key.",
|
|
26989
|
-
flags: ["--indicator <key>", "--indicator-key <key>", "--country <country>", "--limit <n>"],
|
|
26990
|
-
examples: ["secapi macro indicators --country US --indicator CPIAUCSL --limit 12"]
|
|
27017
|
+
flags: ["--indicator <key>", "--indicator-key <key>", "--country <country>", "--limit <n>", "--response-mode <mode>", "--view <mode>", "--include <fields>", "--expand <fields>"],
|
|
27018
|
+
examples: ["secapi macro indicators --country US --indicator CPIAUCSL --limit 12 --response-mode compact"]
|
|
27019
|
+
},
|
|
27020
|
+
"macro high-signal-pack": {
|
|
27021
|
+
usage: "secapi macro high-signal-pack [--country <country>] [--response-mode compact|standard|verbose|agent]",
|
|
27022
|
+
summary: "Fetch the compact high-signal macro pack for a country, with expansion controls for full series and trust metadata.",
|
|
27023
|
+
flags: ["--country <country>", "--response-mode <mode>", "--view <mode>", "--include <fields>", "--expand <fields>"],
|
|
27024
|
+
examples: ["secapi macro high-signal-pack --country US", "secapi macro high-signal-pack --country US --response-mode standard --include series,trust"]
|
|
27025
|
+
},
|
|
27026
|
+
"macro releases": {
|
|
27027
|
+
usage: "secapi macro releases [--country <country>] [--status released|scheduled] [--limit <n>]",
|
|
27028
|
+
summary: "Fetch released macro history by default, or upcoming scheduled events with --status scheduled.",
|
|
27029
|
+
flags: ["--country <country>", "--indicator <key>", "--indicator-key <key>", "--status <released|scheduled>", "--days <n>", "--limit <n>", "--response-mode <mode>", "--view <mode>", "--include <fields>", "--expand <fields>"],
|
|
27030
|
+
examples: ["secapi macro releases --country US --status released --limit 10", "secapi macro releases --country US --status scheduled --days 45 --response-mode compact"]
|
|
27031
|
+
},
|
|
27032
|
+
"macro calendar": {
|
|
27033
|
+
usage: "secapi macro calendar [--country <country>] [--days <n>] [--limit <n>]",
|
|
27034
|
+
summary: "Fetch upcoming scheduled macro releases only.",
|
|
27035
|
+
flags: ["--country <country>", "--indicator <key>", "--indicator-key <key>", "--days <n>", "--limit <n>", "--response-mode <mode>", "--view <mode>", "--include <fields>", "--expand <fields>"],
|
|
27036
|
+
examples: ["secapi macro calendar --country US --days 30 --limit 12 --response-mode compact"]
|
|
27037
|
+
},
|
|
27038
|
+
"macro forecasts": {
|
|
27039
|
+
usage: "secapi macro forecasts [--country <country>] [--indicator <key>] [--horizons <n>]",
|
|
27040
|
+
summary: "Fetch compact baseline macro forecasts; country-wide calls default to compact at the API.",
|
|
27041
|
+
flags: ["--country <country>", "--indicator <key>", "--indicator-key <key>", "--horizons <n>", "--response-mode <mode>", "--view <mode>", "--include <fields>", "--expand <fields>"],
|
|
27042
|
+
examples: ["secapi macro forecasts --country US --horizons 2 --response-mode compact"]
|
|
27043
|
+
},
|
|
27044
|
+
"macro regimes": {
|
|
27045
|
+
usage: "secapi macro regimes [--country <country>] [--lookback <window>]",
|
|
27046
|
+
summary: "Fetch the current macro regime classification as a list envelope.",
|
|
27047
|
+
flags: ["--country <country>", "--lookback <window>", "--response-mode <mode>", "--view <mode>", "--include <fields>", "--expand <fields>"],
|
|
27048
|
+
examples: ["secapi macro regimes --country US --lookback 18m --response-mode compact"]
|
|
26991
27049
|
},
|
|
26992
27050
|
"macro credit-ratings": {
|
|
26993
27051
|
usage: "secapi macro credit-ratings [--country <country>]",
|
|
@@ -27686,7 +27744,12 @@ var AGENT_CONTEXT_COMMAND_OVERRIDES = {
|
|
|
27686
27744
|
"intelligence security": { requiredFlags: ["--ticker|--cik"], examples: ["secapi intelligence security --ticker AAPL --view compact"] },
|
|
27687
27745
|
"limits show": { output: "human_or_json", examples: ["secapi limits show", "secapi limits show --json=false"] },
|
|
27688
27746
|
"macro search": { requiredFlags: ["--q|--query"], examples: ["secapi macro search --q inflation --country US"] },
|
|
27689
|
-
"macro indicators": { requiredFlags: ["--indicator|--indicator-key"], examples: ["secapi macro indicators --country US --indicator CPIAUCSL"] },
|
|
27747
|
+
"macro indicators": { requiredFlags: ["--indicator|--indicator-key"], examples: ["secapi macro indicators --country US --indicator CPIAUCSL --response-mode compact"] },
|
|
27748
|
+
"macro high-signal-pack": { examples: ["secapi macro high-signal-pack --country US", "secapi macro high-signal-pack --country US --response-mode standard --include series,trust"] },
|
|
27749
|
+
"macro releases": { examples: ["secapi macro releases --country US --status released --limit 10"] },
|
|
27750
|
+
"macro calendar": { examples: ["secapi macro calendar --country US --days 30 --limit 12 --response-mode compact"] },
|
|
27751
|
+
"macro forecasts": { examples: ["secapi macro forecasts --country US --horizons 2 --response-mode compact"] },
|
|
27752
|
+
"macro regimes": { examples: ["secapi macro regimes --country US --lookback 18m --response-mode compact"] },
|
|
27690
27753
|
"macro credit-ratings": { examples: ["secapi macro credit-ratings --country US"] },
|
|
27691
27754
|
"macro credit-rating": { requiredFlags: ["--country"], examples: ["secapi macro credit-rating --country US"] },
|
|
27692
27755
|
me: { output: "human_or_json", examples: ["secapi me", "secapi me --json=false"] },
|
|
@@ -28848,14 +28911,16 @@ Run 'secapi ${implementedCommandKey} --help' for supported options.`);
|
|
|
28848
28911
|
}
|
|
28849
28912
|
if (group === "macro" && command === "high-signal-pack") {
|
|
28850
28913
|
print(await apiClient.macroHighSignalPack({
|
|
28851
|
-
country: getFlag("--country")
|
|
28914
|
+
country: getFlag("--country"),
|
|
28915
|
+
...macroResponseParams()
|
|
28852
28916
|
}));
|
|
28853
28917
|
return;
|
|
28854
28918
|
}
|
|
28855
28919
|
if (group === "macro" && command === "regimes") {
|
|
28856
28920
|
print(await apiClient.macroRegimes({
|
|
28857
28921
|
country: getFlag("--country"),
|
|
28858
|
-
lookback: getFlag("--lookback")
|
|
28922
|
+
lookback: getFlag("--lookback"),
|
|
28923
|
+
...macroResponseParams()
|
|
28859
28924
|
}));
|
|
28860
28925
|
return;
|
|
28861
28926
|
}
|
|
@@ -28866,7 +28931,8 @@ Run 'secapi ${implementedCommandKey} --help' for supported options.`);
|
|
|
28866
28931
|
print(await apiClient.macroIndicators({
|
|
28867
28932
|
country: getFlag("--country") ?? "US",
|
|
28868
28933
|
indicator_key: indicatorKey,
|
|
28869
|
-
limit: getNumberFlag("--limit")
|
|
28934
|
+
limit: getNumberFlag("--limit"),
|
|
28935
|
+
...macroResponseParams()
|
|
28870
28936
|
}));
|
|
28871
28937
|
return;
|
|
28872
28938
|
}
|
|
@@ -28874,14 +28940,20 @@ Run 'secapi ${implementedCommandKey} --help' for supported options.`);
|
|
|
28874
28940
|
print(await apiClient.macroReleases({
|
|
28875
28941
|
country: getFlag("--country"),
|
|
28876
28942
|
indicator_key: getFlag("--indicator") ?? getFlag("--indicator-key"),
|
|
28877
|
-
|
|
28943
|
+
status: getEnumFlag("--status", ["released", "scheduled"], "macro release status"),
|
|
28944
|
+
days: getNumberFlag("--days"),
|
|
28945
|
+
limit: getNumberFlag("--limit"),
|
|
28946
|
+
...macroResponseParams()
|
|
28878
28947
|
}));
|
|
28879
28948
|
return;
|
|
28880
28949
|
}
|
|
28881
28950
|
if (group === "macro" && command === "calendar") {
|
|
28882
28951
|
print(await apiClient.macroCalendar({
|
|
28883
28952
|
country: getFlag("--country"),
|
|
28884
|
-
|
|
28953
|
+
indicator_key: getFlag("--indicator") ?? getFlag("--indicator-key"),
|
|
28954
|
+
days: getNumberFlag("--days"),
|
|
28955
|
+
limit: getNumberFlag("--limit"),
|
|
28956
|
+
...macroResponseParams()
|
|
28885
28957
|
}));
|
|
28886
28958
|
return;
|
|
28887
28959
|
}
|
|
@@ -28889,7 +28961,8 @@ Run 'secapi ${implementedCommandKey} --help' for supported options.`);
|
|
|
28889
28961
|
print(await apiClient.macroForecasts({
|
|
28890
28962
|
country: getFlag("--country"),
|
|
28891
28963
|
indicator_key: getFlag("--indicator") ?? getFlag("--indicator-key"),
|
|
28892
|
-
horizons: getNumberFlag("--horizons")
|
|
28964
|
+
horizons: getNumberFlag("--horizons"),
|
|
28965
|
+
...macroResponseParams()
|
|
28893
28966
|
}));
|
|
28894
28967
|
return;
|
|
28895
28968
|
}
|
|
@@ -29692,10 +29765,10 @@ ${rendered}`);
|
|
|
29692
29765
|
" secapi macro search --q inflation --country US",
|
|
29693
29766
|
" secapi macro high-signal-pack --country US",
|
|
29694
29767
|
" secapi macro regimes --country US --lookback 18m",
|
|
29695
|
-
" secapi macro indicators --country US --indicator CPIAUCSL",
|
|
29696
|
-
" secapi macro releases --country US",
|
|
29697
|
-
" secapi macro calendar --country US --days 30",
|
|
29698
|
-
" secapi macro forecasts --country US",
|
|
29768
|
+
" secapi macro indicators --country US --indicator CPIAUCSL --response-mode compact",
|
|
29769
|
+
" secapi macro releases --country US --status released",
|
|
29770
|
+
" secapi macro calendar --country US --days 30 --limit 12 --response-mode compact",
|
|
29771
|
+
" secapi macro forecasts --country US --response-mode compact",
|
|
29699
29772
|
" secapi macro credit-ratings --country US",
|
|
29700
29773
|
"",
|
|
29701
29774
|
" # Factors",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@secapi/cli",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "SEC API CLI for SEC data shaped for investors and agents",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"access": "public"
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@secapi/sdk-js": "^1.0.
|
|
43
|
+
"@secapi/sdk-js": "^1.0.2"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
46
|
"@types/node": "^24.10.1",
|