@emergentmethods/asknews-cli 0.1.0
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/LICENSE +21 -0
- package/README.md +121 -0
- package/dist/bin.js +12287 -0
- package/dist/bin.js.map +7 -0
- package/package.json +79 -0
- package/scripts/postinstall.mjs +26 -0
- package/skills/asknews-cli/SKILL.md +94 -0
- package/skills/asknews-cli/references/commands/alerts.md +135 -0
- package/skills/asknews-cli/references/commands/api-alerts.md +186 -0
- package/skills/asknews-cli/references/commands/api-analytics.md +31 -0
- package/skills/asknews-cli/references/commands/api-autofilter.md +31 -0
- package/skills/asknews-cli/references/commands/api-byok.md +72 -0
- package/skills/asknews-cli/references/commands/api-charts.md +28 -0
- package/skills/asknews-cli/references/commands/api-chat.md +108 -0
- package/skills/asknews-cli/references/commands/api-distribution.md +46 -0
- package/skills/asknews-cli/references/commands/api-forecast.md +44 -0
- package/skills/asknews-cli/references/commands/api-graph.md +41 -0
- package/skills/asknews-cli/references/commands/api-index-urls.md +32 -0
- package/skills/asknews-cli/references/commands/api-news.md +164 -0
- package/skills/asknews-cli/references/commands/api-newsletters.md +236 -0
- package/skills/asknews-cli/references/commands/api-ping.md +19 -0
- package/skills/asknews-cli/references/commands/api-profile.md +27 -0
- package/skills/asknews-cli/references/commands/api-reddit.md +34 -0
- package/skills/asknews-cli/references/commands/api-stories.md +75 -0
- package/skills/asknews-cli/references/commands/api-websearch.md +37 -0
- package/skills/asknews-cli/references/commands/api-wiki.md +33 -0
- package/skills/asknews-cli/references/commands/api.md +52 -0
- package/skills/asknews-cli/references/commands/auth.md +50 -0
- package/skills/asknews-cli/references/commands/cli.md +31 -0
- package/skills/asknews-cli/references/commands/index.md +41 -0
- package/skills/asknews-cli/references/commands/news.md +89 -0
- package/skills/asknews-cli/references/commands/reddit.md +38 -0
- package/skills/asknews-cli/references/commands/request.md +34 -0
- package/skills/asknews-cli/references/commands/research.md +73 -0
- package/skills/asknews-cli/references/commands/stories.md +74 -0
- package/skills/asknews-cli/references/commands/web.md +40 -0
- package/skills/asknews-cli/references/commands/wiki.md +39 -0
- package/skills/asknews-cli/references/task-recipes.md +164 -0
|
@@ -0,0 +1,236 @@
|
|
|
1
|
+
# api newsletters
|
|
2
|
+
|
|
3
|
+
Generated from AskNews API 0.24.95.
|
|
4
|
+
|
|
5
|
+
## Operations
|
|
6
|
+
|
|
7
|
+
### `asknews api newsletters delete-newsletter`
|
|
8
|
+
|
|
9
|
+
Delete a newsletter.
|
|
10
|
+
|
|
11
|
+
- Request: `DELETE /v1/chat/newsletters/{newsletter_id}`
|
|
12
|
+
- Operation ID: `delete_newsletter`
|
|
13
|
+
- Safety: `mutating`
|
|
14
|
+
|
|
15
|
+
**Options:**
|
|
16
|
+
|
|
17
|
+
| Option | Description |
|
|
18
|
+
| --- | --- |
|
|
19
|
+
| `--newsletter-id` | The newsletter ID Location: path. Type: string. Required. Format: uuid. |
|
|
20
|
+
|
|
21
|
+
This operation requires confirmation and `--yes` in non-interactive use.
|
|
22
|
+
|
|
23
|
+
### `asknews api newsletters delete-newsletter-contact`
|
|
24
|
+
|
|
25
|
+
Delete a newsletter contact.
|
|
26
|
+
|
|
27
|
+
- Request: `DELETE /v1/chat/newsletters/{newsletter_id}/contacts/{contact_id}`
|
|
28
|
+
- Operation ID: `delete_newsletter_contact`
|
|
29
|
+
- Safety: `mutating`
|
|
30
|
+
|
|
31
|
+
**Options:**
|
|
32
|
+
|
|
33
|
+
| Option | Description |
|
|
34
|
+
| --- | --- |
|
|
35
|
+
| `--newsletter-id` | The newsletter ID Location: path. Type: string. Required. Format: uuid. |
|
|
36
|
+
| `--contact-id` | The contact ID Location: path. Type: string. Required. |
|
|
37
|
+
|
|
38
|
+
This operation requires confirmation and `--yes` in non-interactive use.
|
|
39
|
+
|
|
40
|
+
### `asknews api newsletters get-newsletter`
|
|
41
|
+
|
|
42
|
+
Get a newsletter.
|
|
43
|
+
|
|
44
|
+
- Request: `GET /v1/chat/newsletters/{newsletter_id}`
|
|
45
|
+
- Operation ID: `get_newsletter`
|
|
46
|
+
- Safety: `read-only`
|
|
47
|
+
|
|
48
|
+
**Options:**
|
|
49
|
+
|
|
50
|
+
| Option | Description |
|
|
51
|
+
| --- | --- |
|
|
52
|
+
| `--newsletter-id` | The newsletter ID Location: path. Type: string. Required. Format: uuid. |
|
|
53
|
+
|
|
54
|
+
### `asknews api newsletters get-newsletter-contact`
|
|
55
|
+
|
|
56
|
+
Get a newsletter contact.
|
|
57
|
+
|
|
58
|
+
- Request: `GET /v1/chat/newsletters/{newsletter_id}/contacts/{contact_id}`
|
|
59
|
+
- Operation ID: `get_newsletter_contact`
|
|
60
|
+
- Safety: `read-only`
|
|
61
|
+
|
|
62
|
+
**Options:**
|
|
63
|
+
|
|
64
|
+
| Option | Description |
|
|
65
|
+
| --- | --- |
|
|
66
|
+
| `--newsletter-id` | The newsletter ID Location: path. Type: string. Required. Format: uuid. |
|
|
67
|
+
| `--contact-id` | The contact ID Location: path. Type: string. Required. |
|
|
68
|
+
|
|
69
|
+
### `asknews api newsletters get-newsletter-contacts`
|
|
70
|
+
|
|
71
|
+
Get newsletter contacts.
|
|
72
|
+
|
|
73
|
+
- Request: `GET /v1/chat/newsletters/{newsletter_id}/contacts`
|
|
74
|
+
- Operation ID: `get_newsletter_contacts`
|
|
75
|
+
- Safety: `read-only`
|
|
76
|
+
|
|
77
|
+
**Options:**
|
|
78
|
+
|
|
79
|
+
| Option | Description |
|
|
80
|
+
| --- | --- |
|
|
81
|
+
| `--newsletter-id` | The newsletter ID Location: path. Type: string. Required. Format: uuid. |
|
|
82
|
+
|
|
83
|
+
### `asknews api newsletters get-newsletters`
|
|
84
|
+
|
|
85
|
+
Get all created newsletters.
|
|
86
|
+
|
|
87
|
+
- Request: `GET /v1/chat/newsletters`
|
|
88
|
+
- Operation ID: `get_newsletters`
|
|
89
|
+
- Safety: `read-only`
|
|
90
|
+
|
|
91
|
+
### `asknews api newsletters get-public-newsletters`
|
|
92
|
+
|
|
93
|
+
Get all public newsletters.
|
|
94
|
+
|
|
95
|
+
- Request: `GET /v1/chat/newsletters/public`
|
|
96
|
+
- Operation ID: `get_public_newsletters`
|
|
97
|
+
- Safety: `read-only`
|
|
98
|
+
|
|
99
|
+
**Options:**
|
|
100
|
+
|
|
101
|
+
| Option | Description |
|
|
102
|
+
| --- | --- |
|
|
103
|
+
| `--page` | The page number to get Location: query. Type: integer. Optional. Default: `1`. |
|
|
104
|
+
| `--per-page` | The number of items per page Location: query. Type: integer. Optional. Default: `10`. |
|
|
105
|
+
| `--all` | Whether to get all the public newsletters Location: query. Type: boolean. Optional. Default: `false`. |
|
|
106
|
+
|
|
107
|
+
### `asknews api newsletters patch-newsletter-contact`
|
|
108
|
+
|
|
109
|
+
Update a newsletter contact.
|
|
110
|
+
|
|
111
|
+
- Request: `PATCH /v1/chat/newsletters/{newsletter_id}/contacts/{contact_id}`
|
|
112
|
+
- Operation ID: `patch_newsletter_contact`
|
|
113
|
+
- Safety: `mutating`
|
|
114
|
+
|
|
115
|
+
**Options:**
|
|
116
|
+
|
|
117
|
+
| Option | Description |
|
|
118
|
+
| --- | --- |
|
|
119
|
+
| `--newsletter-id` | The newsletter ID Location: path. Type: string. Required. Format: uuid. |
|
|
120
|
+
| `--contact-id` | The contact ID Location: path. Type: string. Required. |
|
|
121
|
+
|
|
122
|
+
**Request body fields:**
|
|
123
|
+
|
|
124
|
+
| Option | Type | Required | Description |
|
|
125
|
+
| --- | --- | --- | --- |
|
|
126
|
+
| `--email` | string | yes | |
|
|
127
|
+
| `--first-name` | string or null | no | |
|
|
128
|
+
| `--last-name` | string or null | no | |
|
|
129
|
+
| `--unsubscribed` | boolean | no | Default: `false`. |
|
|
130
|
+
|
|
131
|
+
Use direct kebab-case body options, `--body '{...}'`, or `--body @request.json`.
|
|
132
|
+
Direct body options override values supplied through `--body`.
|
|
133
|
+
|
|
134
|
+
This operation requires confirmation and `--yes` in non-interactive use.
|
|
135
|
+
|
|
136
|
+
### `asknews api newsletters post-newsletter`
|
|
137
|
+
|
|
138
|
+
Create a newsletter.
|
|
139
|
+
|
|
140
|
+
- Request: `POST /v1/chat/newsletters`
|
|
141
|
+
- Operation ID: `post_newsletter`
|
|
142
|
+
- Safety: `mutating`
|
|
143
|
+
|
|
144
|
+
**Request body fields:**
|
|
145
|
+
|
|
146
|
+
| Option | Type | Required | Description |
|
|
147
|
+
| --- | --- | --- | --- |
|
|
148
|
+
| `--name` | string | yes | The name of the newsletter. |
|
|
149
|
+
| `--query` | string | yes | The natural language query to run for the newsletter. |
|
|
150
|
+
| `--cron` | string | yes | The cron schedule for the newsletter. For example daily at 00:00 UTC is '0 0 * * *'. See https://crontab.run/ for more examples |
|
|
151
|
+
| `--model` | string | yes | The model to use for the newsletter. Choices: gpt-4o, gpt-4o-mini, claude-3-5-sonnet-latest, meta-llama/Meta-Llama-3.1-405B-Instruct, meta-llama/Meta-Llama-3.3-70B-Instruct. |
|
|
152
|
+
| `--subject` | string or null | no | The subject of the newsletter. If not provided it will be auto generated. |
|
|
153
|
+
| `--sender` | string | yes | The sender of the newsletter. |
|
|
154
|
+
| `--logo-url` | string or null | no | The logo URL for the newsletter. |
|
|
155
|
+
| `--reply-to` | string or null | no | The reply-to address for the newsletter. If not provided, the sender will be used. |
|
|
156
|
+
| `--audience-id` | string or null | no | The audience ID to use for the newsletter. If not provided a new audience will be created. |
|
|
157
|
+
| `--resend-api-key` | string or null | no | The resend API key to use for the newsletter. If not provided, the newsletter will not be sent. |
|
|
158
|
+
| `--public` | boolean | no | Whether the newsletter is public or not. If not provided, the newsletter will be public. If you make the newsletter public only title and query will be shown. Default: `true`. |
|
|
159
|
+
| `--active` | boolean | no | Whether the newsletter is active or not. If not provided, the newsletter will be active. If you make the newsletter inactive, it will not be sent. Default: `true`. |
|
|
160
|
+
| `--expires-at` | string or null | no | The expiration date for the alert. Default is None. If set, the alert will be disabled after this date. |
|
|
161
|
+
|
|
162
|
+
Use direct kebab-case body options, `--body '{...}'`, or `--body @request.json`.
|
|
163
|
+
Direct body options override values supplied through `--body`.
|
|
164
|
+
|
|
165
|
+
This operation requires confirmation and `--yes` in non-interactive use.
|
|
166
|
+
|
|
167
|
+
### `asknews api newsletters post-newsletter-contacts`
|
|
168
|
+
|
|
169
|
+
Create a newsletter contact.
|
|
170
|
+
|
|
171
|
+
- Request: `POST /v1/chat/newsletters/{newsletter_id}/contacts`
|
|
172
|
+
- Operation ID: `post_newsletter_contacts`
|
|
173
|
+
- Safety: `mutating`
|
|
174
|
+
|
|
175
|
+
**Options:**
|
|
176
|
+
|
|
177
|
+
| Option | Description |
|
|
178
|
+
| --- | --- |
|
|
179
|
+
| `--newsletter-id` | The newsletter ID Location: path. Type: string. Required. Format: uuid. |
|
|
180
|
+
|
|
181
|
+
**Request body fields:**
|
|
182
|
+
|
|
183
|
+
| Option | Type | Required | Description |
|
|
184
|
+
| --- | --- | --- | --- |
|
|
185
|
+
| `--email` | string | yes | |
|
|
186
|
+
| `--first-name` | string or null | no | |
|
|
187
|
+
| `--last-name` | string or null | no | |
|
|
188
|
+
| `--unsubscribed` | boolean | no | Default: `false`. |
|
|
189
|
+
|
|
190
|
+
Use direct kebab-case body options, `--body '{...}'`, or `--body @request.json`.
|
|
191
|
+
Direct body options override values supplied through `--body`.
|
|
192
|
+
|
|
193
|
+
This operation requires confirmation and `--yes` in non-interactive use.
|
|
194
|
+
|
|
195
|
+
### `asknews api newsletters put-newsletter`
|
|
196
|
+
|
|
197
|
+
Update a newsletter.
|
|
198
|
+
|
|
199
|
+
- Request: `PUT /v1/chat/newsletters/{newsletter_id}`
|
|
200
|
+
- Operation ID: `put_newsletter`
|
|
201
|
+
- Safety: `mutating`
|
|
202
|
+
|
|
203
|
+
**Options:**
|
|
204
|
+
|
|
205
|
+
| Option | Description |
|
|
206
|
+
| --- | --- |
|
|
207
|
+
| `--newsletter-id` | The newsletter ID Location: path. Type: string. Required. Format: uuid. |
|
|
208
|
+
|
|
209
|
+
**Request body fields:**
|
|
210
|
+
|
|
211
|
+
| Option | Type | Required | Description |
|
|
212
|
+
| --- | --- | --- | --- |
|
|
213
|
+
| `--name` | string or null | no | The name of the newsletter. |
|
|
214
|
+
| `--query` | string or null | no | The natural language query to run for the newsletter. |
|
|
215
|
+
| `--cron` | string or null | no | The cron schedule for the newsletter. For example daily at 00:00 UTC is '0 0 * * *'. See https://crontab.run/ for more examples |
|
|
216
|
+
| `--model` | string or null | no | The model to use for the newsletter. |
|
|
217
|
+
| `--subject` | string or null | no | The subject of the newsletter. If not provided it will be auto generated. |
|
|
218
|
+
| `--sender` | string or null | no | The sender of the newsletter. |
|
|
219
|
+
| `--logo-url` | string or null | no | The logo URL for the newsletter. |
|
|
220
|
+
| `--reply-to` | string or null | no | The reply-to address for the newsletter. If not provided, the sender will be used. |
|
|
221
|
+
| `--audience-id` | string or null | no | The audience ID to use for the newsletter. If not provided a new audience will be created. |
|
|
222
|
+
| `--resend-api-key` | string or null | no | The resend API key to use for the newsletter. If not provided, the newsletter will not be sent. |
|
|
223
|
+
| `--public` | boolean or null | no | Whether the newsletter is public or not. If not provided, the newsletter will be public. If you make the newsletter public only title and query will be shown. |
|
|
224
|
+
| `--active` | boolean or null | no | Whether the newsletter is active or not. If not provided, the newsletter will be active. If you make the newsletter inactive, it will not be sent. |
|
|
225
|
+
| `--expires-at` | string or null | no | The expiration date for the alert. Default is None. If set, the alert will be disabled after this date. |
|
|
226
|
+
|
|
227
|
+
Use direct kebab-case body options, `--body '{...}'`, or `--body @request.json`.
|
|
228
|
+
Direct body options override values supplied through `--body`.
|
|
229
|
+
|
|
230
|
+
This operation requires confirmation and `--yes` in non-interactive use.
|
|
231
|
+
|
|
232
|
+
## Global options
|
|
233
|
+
|
|
234
|
+
All commands support `--output human|table|json|jsonl|yaml`, `--json`, API/auth URL
|
|
235
|
+
overrides, request timeout, and color control. Result data is written to stdout; diagnostics
|
|
236
|
+
are written to stderr.
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# api ping
|
|
2
|
+
|
|
3
|
+
Generated from AskNews API 0.24.95.
|
|
4
|
+
|
|
5
|
+
## Operations
|
|
6
|
+
|
|
7
|
+
### `asknews api ping ping`
|
|
8
|
+
|
|
9
|
+
Ping
|
|
10
|
+
|
|
11
|
+
- Request: `GET /`
|
|
12
|
+
- Operation ID: `ping`
|
|
13
|
+
- Safety: `read-only`
|
|
14
|
+
|
|
15
|
+
## Global options
|
|
16
|
+
|
|
17
|
+
All commands support `--output human|table|json|jsonl|yaml`, `--json`, API/auth URL
|
|
18
|
+
overrides, request timeout, and color control. Result data is written to stdout; diagnostics
|
|
19
|
+
are written to stderr.
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# api profile
|
|
2
|
+
|
|
3
|
+
Generated from AskNews API 0.24.95.
|
|
4
|
+
|
|
5
|
+
## Operations
|
|
6
|
+
|
|
7
|
+
### `asknews api profile get-rate-limit-status`
|
|
8
|
+
|
|
9
|
+
Return the caller's current rate-limit and concurrency-limit state without consuming any tokens.
|
|
10
|
+
|
|
11
|
+
- Request: `GET /v1/profiles/me/limits`
|
|
12
|
+
- Operation ID: `get_rate_limit_status`
|
|
13
|
+
- Safety: `read-only`
|
|
14
|
+
|
|
15
|
+
### `asknews api profile get-user-profile`
|
|
16
|
+
|
|
17
|
+
Get the current profile
|
|
18
|
+
|
|
19
|
+
- Request: `GET /v1/profiles/me`
|
|
20
|
+
- Operation ID: `get_user_profile`
|
|
21
|
+
- Safety: `read-only`
|
|
22
|
+
|
|
23
|
+
## Global options
|
|
24
|
+
|
|
25
|
+
All commands support `--output human|table|json|jsonl|yaml`, `--json`, API/auth URL
|
|
26
|
+
overrides, request timeout, and color control. Result data is written to stdout; diagnostics
|
|
27
|
+
are written to stderr.
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# api reddit
|
|
2
|
+
|
|
3
|
+
Generated from AskNews API 0.24.95.
|
|
4
|
+
|
|
5
|
+
## Operations
|
|
6
|
+
|
|
7
|
+
### `asknews api reddit search-reddit`
|
|
8
|
+
|
|
9
|
+
Go to Reddit, search threads, summarize the threads, return analysis.
|
|
10
|
+
`deep`=True is a live web scrape, AskNews searches Reddit, finds threads,
|
|
11
|
+
summarizes them, analyzes them, and returns the results. `deep`=False
|
|
12
|
+
is a search in AskNews' existing database of Reddit threads.
|
|
13
|
+
|
|
14
|
+
- Request: `GET /v1/reddit/search`
|
|
15
|
+
- Operation ID: `search_reddit`
|
|
16
|
+
- Safety: `read-only`
|
|
17
|
+
|
|
18
|
+
**Options:**
|
|
19
|
+
|
|
20
|
+
| Option | Description |
|
|
21
|
+
| --- | --- |
|
|
22
|
+
| `--keywords` | Keywords used to search for relevant Reddit threads. Location: query. Type: array<string>. Required. |
|
|
23
|
+
| `--n-threads` | Number of Reddit threads to summarize and return Location: query. Type: integer. Optional. Default: `5`. |
|
|
24
|
+
| `--method` | The search method. Can be 'nl' or 'kw'. If 'nl', then the query will be used as a natural language query. If 'kw', then the query will be used as a direct keyword query. Location: query. Type: string. Optional. Choices: nl, kw. Default: `"kw"`. |
|
|
25
|
+
| `--deep` | Deep means that AskNews goes directly to Reddit, searches live, summarizes the threads live, and returns structured data for you. Deep=False means that AskNews looks in its existing database of Reddit threads and returns the most similar threads Location: query. Type: boolean. Optional. Default: `false`. |
|
|
26
|
+
| `--return-type` | The return type. Can be 'dicts', 'string', or 'both'. Location: query. Type: string. Optional. Choices: dicts, string, both. Default: `"string"`. |
|
|
27
|
+
| `--time-filter` | The time filter. Location: query. Type: string. Optional. Choices: hour, day, week, month, year, all. Default: `"day"`. |
|
|
28
|
+
| `--sort` | The sort order. Location: query. Type: string. Optional. Choices: relevance, hot, top, new, comments. Default: `"relevance"`. |
|
|
29
|
+
|
|
30
|
+
## Global options
|
|
31
|
+
|
|
32
|
+
All commands support `--output human|table|json|jsonl|yaml`, `--json`, API/auth URL
|
|
33
|
+
overrides, request timeout, and color control. Result data is written to stdout; diagnostics
|
|
34
|
+
are written to stderr.
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
# api stories
|
|
2
|
+
|
|
3
|
+
Generated from AskNews API 0.24.95.
|
|
4
|
+
|
|
5
|
+
## Operations
|
|
6
|
+
|
|
7
|
+
### `asknews api stories get-stories`
|
|
8
|
+
|
|
9
|
+
Filter on our custom, in-house written, stories/events/narratives.
|
|
10
|
+
|
|
11
|
+
These stories are based on clusters of articles (which come through this
|
|
12
|
+
endpoint as well, so you can consider this a clustering endpoint). We write
|
|
13
|
+
stories and track them through time.
|
|
14
|
+
|
|
15
|
+
The enrichments include a full Reddit overview (including all the thread metadata),
|
|
16
|
+
as well as descriptions of the reporting voice, the key takeaways, contradictions,
|
|
17
|
+
all the entities, and much, much more.
|
|
18
|
+
|
|
19
|
+
You can see this data in action, and filter it similarly at
|
|
20
|
+
`https://asknews.app/stories`
|
|
21
|
+
|
|
22
|
+
- Request: `GET /v1/stories`
|
|
23
|
+
- Operation ID: `get_stories`
|
|
24
|
+
- Safety: `read-only`
|
|
25
|
+
|
|
26
|
+
**Options:**
|
|
27
|
+
|
|
28
|
+
| Option | Description |
|
|
29
|
+
| --- | --- |
|
|
30
|
+
| `--query` | Query to be used for the search. If method='nl', then this will beused as a natural language query. If method='kw', then this willbe used as a direct keyword query. Location: query. Type: string. Optional. |
|
|
31
|
+
| `--categories` | Categories to use for filtering the stories search Location: query. Type: array<string>. Optional. Default: `[]`. |
|
|
32
|
+
| `--uuids` | A list of UUIDs to retrieve. Location: query. Type: array<string>. Optional. Default: `[]`. |
|
|
33
|
+
| `--start-timestamp` | Start timestamp to filter results on. Location: query. Type: string. Optional. |
|
|
34
|
+
| `--end-timestamp` | End timestamp to filter results on. Location: query. Type: string. Optional. |
|
|
35
|
+
| `--sort-by` | Which type of sorting to perform. published: Sort by published date. coverage: Sort by coverage. sentiment: Sort by sentiment. relevance: Sort by relevance of similarity score/ranking. Location: query. Type: string. Optional. |
|
|
36
|
+
| `--sort-type` | Whether to sort results in ascending or descending order. Location: query. Type: string. Optional. |
|
|
37
|
+
| `--continent` | Continents to filter by. Location: query. Type: string. Optional. |
|
|
38
|
+
| `--offset` | Offset to use Location: query. Type: string. Optional. Default: `0`. |
|
|
39
|
+
| `--limit` | Limit to use Location: query. Type: integer. Optional. Default: `10`. |
|
|
40
|
+
| `--expand-updates` | Whether to expand updates Location: query. Type: boolean. Optional. Default: `false`. |
|
|
41
|
+
| `--max-updates` | Max updates to use Location: query. Type: integer. Optional. Default: `2`. |
|
|
42
|
+
| `--max-articles` | Max articles to use per update Location: query. Type: integer. Optional. Default: `5`. |
|
|
43
|
+
| `--method` | Method to use for query, 'nl' means natural language, and will run a semantic search on the stories database. 'kw' means keyword, and will search by keyword on the stories database. 'both' means that both methods will be used and results will be ranked according to IRR. Location: query. Type: string. Optional. Choices: nl, kw, both. Default: `"kw"`. |
|
|
44
|
+
| `--obj-type` | Object type to filter by, can be a list with 'story' and/or 'story_update' Location: query. Type: array<string>. Optional. Default: `["story"]`. |
|
|
45
|
+
| `--reddit` | Whether or not to include Reddit analysiswhere the integer indicates the number of threadsto include in the response. 0 is default. Requirespaid plan to access. Location: query. Type: integer. Optional. Default: `0`. |
|
|
46
|
+
| `--citation-method` | Method to use for citation filtering. Location: query. Type: string. Optional. Choices: brackets, urls, none. Default: `"brackets"`. |
|
|
47
|
+
| `--similarity-score-threshold` | Similarity score threshold to use when using query Location: query. Type: number. Optional. Default: `0.75`. |
|
|
48
|
+
| `--provocative` | Filter stories based on how provocative the underlying articles are deemed based on the use of provocative language and emotional vocabulary. Location: query. Type: string. Optional. Choices: unknown, low, medium, high, all. Default: `"all"`. |
|
|
49
|
+
| `--strategy` | Strategy to use for automatically controlling the search. 'default' is the default strategy, which follows all filters faithfully. 'topstories' aims to give a diverse look at top news stories that are relevant to the current filter combination.'topstories_categories' aims to give the top stories for each category. 'topstories_continents' aims to give the top stories for each continent. Location: query. Type: string. Optional. Choices: default, topstories, topstories_categories, topstories_continents. Default: `"default"`. |
|
|
50
|
+
|
|
51
|
+
### `asknews api stories get-story`
|
|
52
|
+
|
|
53
|
+
Get a single news story given its UUID.
|
|
54
|
+
|
|
55
|
+
- Request: `GET /v1/stories/{story_id}`
|
|
56
|
+
- Operation ID: `get_story`
|
|
57
|
+
- Safety: `read-only`
|
|
58
|
+
|
|
59
|
+
**Options:**
|
|
60
|
+
|
|
61
|
+
| Option | Description |
|
|
62
|
+
| --- | --- |
|
|
63
|
+
| `--story-id` | The story UUID, update UUID, or URL safe title Location: path. Type: string. Required. |
|
|
64
|
+
| `--expand-updates` | Whether to expand updates Location: query. Type: boolean. Optional. Default: `true`. |
|
|
65
|
+
| `--max-updates` | Max number of updates to include in the story object Location: query. Type: integer. Optional. Default: `10`. |
|
|
66
|
+
| `--max-articles` | Max articles to include per update Location: query. Type: integer. Optional. Default: `25`. |
|
|
67
|
+
| `--reddit` | Whether to include Reddit analysis Location: query. Type: integer. Optional. Default: `0`. |
|
|
68
|
+
| `--citation-method` | Method to use for citation filtering. Location: query. Type: string. Optional. Choices: brackets, urls, none. Default: `"brackets"`. |
|
|
69
|
+
| `--condense-auxillary-updates` | When requesting a particular story update, you can expand the assocaited updates by settined max_updates to the total you would like to get. If you want those updates to by condensed for reduced latency, you can set condense_auxillary_updates to 'False'. Location: query. Type: boolean. Optional. Default: `true`. |
|
|
70
|
+
|
|
71
|
+
## Global options
|
|
72
|
+
|
|
73
|
+
All commands support `--output human|table|json|jsonl|yaml`, `--json`, API/auth URL
|
|
74
|
+
overrides, request timeout, and color control. Result data is written to stdout; diagnostics
|
|
75
|
+
are written to stderr.
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# api websearch
|
|
2
|
+
|
|
3
|
+
Generated from AskNews API 0.24.95.
|
|
4
|
+
|
|
5
|
+
## Operations
|
|
6
|
+
|
|
7
|
+
### `asknews api websearch live-web-search`
|
|
8
|
+
|
|
9
|
+
Run a live websearch on a set of queries, get back a fully structured and
|
|
10
|
+
LLM-distilled response (in addition to the raw text if you need that as well).
|
|
11
|
+
|
|
12
|
+
Your response includes as_string and as_dicts, where as_string is a prompt-optimized
|
|
13
|
+
distillation of the information, done by an LLM. as_dicts contains all the details
|
|
14
|
+
necessary to feed into other parts of your application.
|
|
15
|
+
|
|
16
|
+
- Request: `GET /v1/chat/websearch`
|
|
17
|
+
- Operation ID: `live_web_search`
|
|
18
|
+
- Safety: `high-cost`
|
|
19
|
+
|
|
20
|
+
**Options:**
|
|
21
|
+
|
|
22
|
+
| Option | Description |
|
|
23
|
+
| --- | --- |
|
|
24
|
+
| `--queries` | A list of queries to be live searched, analyzed, distilled, and structured. Location: query. Type: array<string>. Required. |
|
|
25
|
+
| `--lookback` | Number of hours back to allow the websearch to look. Defaults to All time Location: query. Type: string. Optional. |
|
|
26
|
+
| `--start-datetime` | Earliest acceptable publication datetime for results. For v1, acts like the existing lookback filter. Location: query. Type: string. Optional. |
|
|
27
|
+
| `--end-datetime` | Latest acceptable publication datetime for results. Location: query. Type: string. Optional. |
|
|
28
|
+
| `--engine` | Search engine version to use for live websearch results. Location: query. Type: string. Optional. Choices: v1, v1.5. Default: `"v1"`. |
|
|
29
|
+
| `--domains` | A list of domains to search. Location: query. Type: string. Optional. |
|
|
30
|
+
| `--strict` | If true, the websearch will only return results that have a known publication date and are within the lookback period. Location: query. Type: boolean. Optional. Default: `false`. |
|
|
31
|
+
| `--offset` | The number of results to offset for followup queries. Location: query. Type: string. Optional. Default: `0`. |
|
|
32
|
+
|
|
33
|
+
## Global options
|
|
34
|
+
|
|
35
|
+
All commands support `--output human|table|json|jsonl|yaml`, `--json`, API/auth URL
|
|
36
|
+
overrides, request timeout, and color control. Result data is written to stdout; diagnostics
|
|
37
|
+
are written to stderr.
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# api wiki
|
|
2
|
+
|
|
3
|
+
Generated from AskNews API 0.24.95.
|
|
4
|
+
|
|
5
|
+
## Operations
|
|
6
|
+
|
|
7
|
+
### `asknews api wiki search-wiki`
|
|
8
|
+
|
|
9
|
+
Search on Wikipedia content with natural language. Find exactly relevant chunks,
|
|
10
|
+
with contextual neighbor chunks, and the full articles they came from.
|
|
11
|
+
|
|
12
|
+
- Request: `GET /v1/wiki/search`
|
|
13
|
+
- Operation ID: `search_wiki`
|
|
14
|
+
- Safety: `read-only`
|
|
15
|
+
|
|
16
|
+
**Options:**
|
|
17
|
+
|
|
18
|
+
| Option | Description |
|
|
19
|
+
| --- | --- |
|
|
20
|
+
| `--query` | Natural language query that can be any phrase, keyword, question, or paragraph. Location: query. Type: string. Optional. Default: `""`. |
|
|
21
|
+
| `--neighbor-chunks` | Number of neighbor chunks to attach and return. If 0, then no neighbor chunks will be returned. Location: query. Type: string. Optional. Default: `1`. |
|
|
22
|
+
| `--n-documents` | Number of documents to return. If 0, then no documents will be returned. Location: query. Type: string. Optional. Default: `5`. |
|
|
23
|
+
| `--full-articles` | If true, then full articles will be returned. If false, then only chunks and their neighbors will be returned. Beware that returning full articles increases data size which increases token usage downstream. Location: query. Type: string. Optional. Default: `false`. |
|
|
24
|
+
| `--hybrid-search` | If true, then hybrid search will be used. If false, then only vector search will be used. Location: query. Type: string. Optional. Default: `false`. |
|
|
25
|
+
| `--string-guarantee` | List of strings that must be present in the results. If empty, then no string guarantee will be applied. Location: query. Type: string. Optional. |
|
|
26
|
+
| `--diversify` | Diversity factor for MMR re-ranking. 0.0 means no diversity (pure relevance), 1.0 means full diversity. Location: query. Type: string. Optional. Default: `0`. |
|
|
27
|
+
| `--include-main-section` | If true, then the main section of the article will be included at the start of each chunk's content. If false, then only the chunk content will be returned. Useful because the main section often contains important context. Location: query. Type: string. Optional. Default: `false`. |
|
|
28
|
+
|
|
29
|
+
## Global options
|
|
30
|
+
|
|
31
|
+
All commands support `--output human|table|json|jsonl|yaml`, `--json`, API/auth URL
|
|
32
|
+
overrides, request timeout, and color control. Result data is written to stdout; diagnostics
|
|
33
|
+
are written to stderr.
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# api
|
|
2
|
+
|
|
3
|
+
Discover and invoke generated commands for every customer-facing AskNews API operation.
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
### `asknews api list`
|
|
8
|
+
|
|
9
|
+
List generated operations and their parameters
|
|
10
|
+
|
|
11
|
+
**Options:**
|
|
12
|
+
|
|
13
|
+
| Option | Description |
|
|
14
|
+
| --- | --- |
|
|
15
|
+
| `--tag <tag>` | filter by API group |
|
|
16
|
+
| `--safety <level>` | filter by read-only, high-cost, or mutating |
|
|
17
|
+
|
|
18
|
+
**Examples:**
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
asknews api list --output json
|
|
22
|
+
asknews api list --tag news --safety read-only --output json
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## API groups
|
|
26
|
+
|
|
27
|
+
- [`asknews api alerts`](api-alerts) — 8 operations
|
|
28
|
+
- [`asknews api analytics`](api-analytics) — 1 operations
|
|
29
|
+
- [`asknews api autofilter`](api-autofilter) — 1 operations
|
|
30
|
+
- [`asknews api byok`](api-byok) — 3 operations
|
|
31
|
+
- [`asknews api charts`](api-charts) — 1 operations
|
|
32
|
+
- [`asknews api chat`](api-chat) — 3 operations
|
|
33
|
+
- [`asknews api distribution`](api-distribution) — 2 operations
|
|
34
|
+
- [`asknews api forecast`](api-forecast) — 1 operations
|
|
35
|
+
- [`asknews api graph`](api-graph) — 1 operations
|
|
36
|
+
- [`asknews api index-urls`](api-index-urls) — 1 operations
|
|
37
|
+
- [`asknews api news`](api-news) — 5 operations
|
|
38
|
+
- [`asknews api newsletters`](api-newsletters) — 11 operations
|
|
39
|
+
- [`asknews api ping`](api-ping) — 1 operations
|
|
40
|
+
- [`asknews api profile`](api-profile) — 2 operations
|
|
41
|
+
- [`asknews api reddit`](api-reddit) — 1 operations
|
|
42
|
+
- [`asknews api stories`](api-stories) — 2 operations
|
|
43
|
+
- [`asknews api websearch`](api-websearch) — 1 operations
|
|
44
|
+
- [`asknews api wiki`](api-wiki) — 1 operations
|
|
45
|
+
|
|
46
|
+
Use `asknews api <group> <operation> --help` for the installed schema and exact enums.
|
|
47
|
+
|
|
48
|
+
## Global options
|
|
49
|
+
|
|
50
|
+
All commands support `--output human|table|json|jsonl|yaml`, `--json`, API/auth URL
|
|
51
|
+
overrides, request timeout, and color control. Result data is written to stdout; diagnostics
|
|
52
|
+
are written to stderr.
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# auth
|
|
2
|
+
|
|
3
|
+
Authenticate the AskNews CLI
|
|
4
|
+
|
|
5
|
+
## Commands
|
|
6
|
+
|
|
7
|
+
### `asknews auth login`
|
|
8
|
+
|
|
9
|
+
Log in with OAuth device flow or an API key
|
|
10
|
+
|
|
11
|
+
**Options:**
|
|
12
|
+
|
|
13
|
+
| Option | Description |
|
|
14
|
+
| --- | --- |
|
|
15
|
+
| `--api-key [key]` | store an API key instead of using OAuth |
|
|
16
|
+
| `--no-browser` | do not open the verification URL |
|
|
17
|
+
| `--scope <scope...>` | OAuth scopes Default: `["openid","offline_access","news","chat","stories","analytics","distribution","profile","reddit"]`. |
|
|
18
|
+
|
|
19
|
+
**Examples:**
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
asknews auth login
|
|
23
|
+
asknews auth login --no-browser
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
### `asknews auth status`
|
|
27
|
+
|
|
28
|
+
Show the active authentication method and verify it against AskNews
|
|
29
|
+
|
|
30
|
+
**Options:**
|
|
31
|
+
|
|
32
|
+
| Option | Description |
|
|
33
|
+
| --- | --- |
|
|
34
|
+
| `--offline` | inspect local state without an API request |
|
|
35
|
+
|
|
36
|
+
**Examples:**
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
asknews auth status --output json
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
### `asknews auth logout`
|
|
43
|
+
|
|
44
|
+
Remove locally stored AskNews credentials
|
|
45
|
+
|
|
46
|
+
## Global options
|
|
47
|
+
|
|
48
|
+
All commands support `--output human|table|json|jsonl|yaml`, `--json`, API/auth URL
|
|
49
|
+
overrides, request timeout, and color control. Result data is written to stdout; diagnostics
|
|
50
|
+
are written to stderr.
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# cli
|
|
2
|
+
|
|
3
|
+
Manage the AskNews CLI installation
|
|
4
|
+
|
|
5
|
+
## Commands
|
|
6
|
+
|
|
7
|
+
### `asknews cli setup`
|
|
8
|
+
|
|
9
|
+
Install embedded AskNews skills into detected agent directories
|
|
10
|
+
|
|
11
|
+
**Options:**
|
|
12
|
+
|
|
13
|
+
| Option | Description |
|
|
14
|
+
| --- | --- |
|
|
15
|
+
| `--scope <scope>` | global, project, or all Default: `"global"`. |
|
|
16
|
+
| `--directory <path>` | project directory Default: `"/home/runner/work/asknews-cli/asknews-cli"`. |
|
|
17
|
+
| `--no-agent-skills` | skip agent skill installation |
|
|
18
|
+
| `--quiet` | suppress human setup messages |
|
|
19
|
+
|
|
20
|
+
**Examples:**
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
asknews cli setup --scope global
|
|
24
|
+
asknews cli setup --scope project --directory .
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Global options
|
|
28
|
+
|
|
29
|
+
All commands support `--output human|table|json|jsonl|yaml`, `--json`, API/auth URL
|
|
30
|
+
overrides, request timeout, and color control. Result data is written to stdout; diagnostics
|
|
31
|
+
are written to stderr.
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# CLI command reference
|
|
2
|
+
|
|
3
|
+
Generated from AskNews CLI 0.1.0 and AskNews API 0.24.95.
|
|
4
|
+
|
|
5
|
+
The installed CLI is authoritative. Run `asknews <command> --help` for the exact options in
|
|
6
|
+
your version. Regenerate these pages with `pnpm sync:openapi`.
|
|
7
|
+
|
|
8
|
+
| Command | Description |
|
|
9
|
+
| --- | --- |
|
|
10
|
+
| [`auth`](commands/auth) | Authenticate the AskNews CLI |
|
|
11
|
+
| [`news`](commands/news) | Search and inspect AskNews articles |
|
|
12
|
+
| [`stories`](commands/stories) | Search and inspect news stories |
|
|
13
|
+
| [`research`](commands/research) | Run DeepNews research |
|
|
14
|
+
| [`web`](commands/web) | Search the live web |
|
|
15
|
+
| [`reddit`](commands/reddit) | Search Reddit threads |
|
|
16
|
+
| [`wiki`](commands/wiki) | Search Wikipedia |
|
|
17
|
+
| [`alerts`](commands/alerts) | Create and manage AskNews alerts |
|
|
18
|
+
| [`request`](commands/request) | Make an authenticated request to an API path |
|
|
19
|
+
| [`cli`](commands/cli) | Manage the AskNews CLI installation |
|
|
20
|
+
| [`api`](commands/api) | Discover and invoke every customer-facing AskNews API operation |
|
|
21
|
+
|
|
22
|
+
## Generated API groups
|
|
23
|
+
|
|
24
|
+
- [`alerts`](commands/api-alerts) — Generated alerts API operations
|
|
25
|
+
- [`analytics`](commands/api-analytics) — Generated analytics API operations
|
|
26
|
+
- [`autofilter`](commands/api-autofilter) — Generated autofilter API operations
|
|
27
|
+
- [`byok`](commands/api-byok) — Generated byok API operations
|
|
28
|
+
- [`charts`](commands/api-charts) — Generated charts API operations
|
|
29
|
+
- [`chat`](commands/api-chat) — Generated chat API operations
|
|
30
|
+
- [`distribution`](commands/api-distribution) — Generated distribution API operations
|
|
31
|
+
- [`forecast`](commands/api-forecast) — Generated forecast API operations
|
|
32
|
+
- [`graph`](commands/api-graph) — Generated graph API operations
|
|
33
|
+
- [`index-urls`](commands/api-index-urls) — Generated index-urls API operations
|
|
34
|
+
- [`news`](commands/api-news) — Generated news API operations
|
|
35
|
+
- [`newsletters`](commands/api-newsletters) — Generated newsletters API operations
|
|
36
|
+
- [`ping`](commands/api-ping) — Generated ping API operations
|
|
37
|
+
- [`profile`](commands/api-profile) — Generated profile API operations
|
|
38
|
+
- [`reddit`](commands/api-reddit) — Generated reddit API operations
|
|
39
|
+
- [`stories`](commands/api-stories) — Generated stories API operations
|
|
40
|
+
- [`websearch`](commands/api-websearch) — Generated websearch API operations
|
|
41
|
+
- [`wiki`](commands/api-wiki) — Generated wiki API operations
|