adanos-cli 1.18.0__tar.gz

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.
@@ -0,0 +1,62 @@
1
+ # Data (exclude scraped data, but include seed data)
2
+ data/*
3
+ !data/ticker_reference_data.sql
4
+
5
+ # Python
6
+ __pycache__/
7
+ *.py[cod]
8
+ *.so
9
+ .Python
10
+ venv/
11
+ .venv/
12
+ *.egg-info/
13
+ dist/
14
+
15
+ # Environment
16
+ .env
17
+ .env.local
18
+ .env.production
19
+
20
+ # Server documentation (contains secrets!)
21
+ SERVER.md
22
+ docs/SERVER.md
23
+
24
+ # Node
25
+ node_modules/
26
+
27
+ # IDE
28
+ .idea/
29
+ .vscode/
30
+ *.swp
31
+
32
+ # OS
33
+ .DS_Store
34
+ Thumbs.db
35
+
36
+ # Models (ONNX sentiment model, downloaded locally or in Docker)
37
+ /models/
38
+
39
+ # Logs
40
+ *.log
41
+ logs/
42
+
43
+ # Generated OpenAPI specs
44
+ openapi.generated.yaml
45
+ openapi.reddit.yaml
46
+ openapi.x.yaml
47
+ openapi.polymarket.yaml
48
+
49
+ # Generated SDK client (regenerate with scripts/generate_sdk.sh)
50
+ sdk/python/src/stocksentiment/_generated/
51
+
52
+ # Exported data
53
+ *.csv
54
+
55
+ # Testing
56
+ .pytest_cache/
57
+ .coverage
58
+ coverage_report/
59
+ htmlcov/
60
+ *.sqlite
61
+ test_*.sqlite
62
+ accounts.db
@@ -0,0 +1,386 @@
1
+ Metadata-Version: 2.4
2
+ Name: adanos-cli
3
+ Version: 1.18.0
4
+ Summary: Comprehensive CLI for the Adanos Finance Sentiment API
5
+ Project-URL: Homepage, https://adanos.org
6
+ Project-URL: Documentation, https://api.adanos.org
7
+ Author: Alexander Schneider
8
+ License-Expression: MIT
9
+ Requires-Python: >=3.10
10
+ Requires-Dist: httpx<1,>=0.23
11
+ Requires-Dist: social-stock-sentiment>=1.18.0
12
+ Description-Content-Type: text/markdown
13
+
14
+ # adanos-cli
15
+
16
+ Comprehensive CLI for the Finance Sentiment API at `https://api.adanos.org`.
17
+
18
+ The CLI is designed as a reliable workflow tool to retrieve social sentiment for stocks and crypto assets, with machine-readable output for automation.
19
+
20
+ ## Data Coverage
21
+
22
+ The API/CLI currently covers:
23
+ - Reddit Stocks
24
+ - X/Twitter Stocks
25
+ - Polymarket Stocks
26
+ - Reddit Crypto
27
+
28
+ What this means in practice:
29
+ - Stock reports aggregate multiple social sources (Reddit + X + Polymarket where available).
30
+ - Crypto reports currently use Reddit Crypto endpoints.
31
+ - If there are no mentions in the selected window, you can receive a valid response with no rows/no data.
32
+
33
+ ## Install
34
+
35
+ ### Recommended (PyPI)
36
+
37
+ ```bash
38
+ python3 -m pip install adanos-cli
39
+ ```
40
+
41
+ If you use `pipx`:
42
+
43
+ ```bash
44
+ pipx install adanos-cli
45
+ ```
46
+
47
+ If this returns `No matching distribution found`, the first PyPI release is not published yet.
48
+
49
+ ### Until first public release is available
50
+
51
+ ```bash
52
+ # requires GitHub access + SSH key to this private repository
53
+ python3 -m pip install "git+ssh://git@github.com/alexander-schneider/api.adanos.org.git@main#subdirectory=sdk/cli"
54
+ ```
55
+
56
+ ### Developer install (local clone)
57
+
58
+ ```bash
59
+ python3 -m pip install -e sdk/cli
60
+ ```
61
+
62
+ ### If `adanos` is not found in your shell
63
+
64
+ ```bash
65
+ python3 -m adanos_cli --version
66
+ python3 -m adanos_cli
67
+ ```
68
+
69
+ ### Maintainer: Publish to PyPI
70
+
71
+ Publishing is automated in `.github/workflows/publish-sdk.yml` (Trusted Publishing):
72
+ - triggers on `VERSION` change (or manual dispatch)
73
+ - syncs versions into SDK + CLI metadata
74
+ - tests and builds `sdk/python` and `sdk/cli`
75
+ - validates package metadata with `twine check`
76
+ - publishes both Python packages to PyPI
77
+
78
+ Typical release flow:
79
+ 1. bump `VERSION`
80
+ 2. update `CHANGELOG.md`
81
+ 3. merge to `main` (or trigger workflow manually)
82
+
83
+ One-time PyPI setup (required before first publish):
84
+ 1. Create `adanos-cli` on PyPI (or use the existing project if already created).
85
+ 2. In PyPI: `Project settings -> Publishing -> Add a new pending publisher`.
86
+ 3. Set publisher values:
87
+ - Owner: `alexander-schneider`
88
+ - Repository: `api.adanos.org`
89
+ - Workflow name: `publish-sdk.yml`
90
+ - Environment name: `pypi`
91
+
92
+ ## Start Modes
93
+
94
+ ```bash
95
+ # interactive shell (recommended for humans)
96
+ adanos
97
+
98
+ # force shell mode explicitly
99
+ adanos shell
100
+
101
+ # one-shot command mode
102
+ adanos stock TSLA --days 7
103
+ ```
104
+
105
+ ## Quickstart By Perspective
106
+
107
+ ### 1) First-time user (no API key yet)
108
+
109
+ ```bash
110
+ # guided setup
111
+ adanos onboard wizard
112
+
113
+ # or manual setup
114
+ adanos onboard register --name "Your Name" --email "you@example.com" --purpose "CLI usage"
115
+ adanos onboard redeem --token kt_xxx --save
116
+
117
+ # first request
118
+ adanos ask "How does TSLA look?"
119
+ ```
120
+
121
+ ### 2) Existing user (already has key)
122
+
123
+ ```bash
124
+ adanos config set --api-key sk_live_xxx
125
+ adanos config show
126
+ adanos account
127
+ adanos ask "How many users mention Microsoft?"
128
+ ```
129
+
130
+ ### 3) Stock sentiment workflow
131
+
132
+ ```bash
133
+ # deep report for one ticker
134
+ adanos stock TSLA --days 7
135
+
136
+ # compare tickers
137
+ adanos ask "TSLA vs NVDA"
138
+ # or
139
+ adanos compare --platform x-stocks TSLA,NVDA --days 7
140
+
141
+ # top lists
142
+ adanos trending --platform reddit-stocks --dimension main --days 1 --limit 10
143
+ ```
144
+
145
+ ### 4) Crypto sentiment workflow
146
+
147
+ ```bash
148
+ # single token
149
+ adanos crypto BTC --days 7
150
+
151
+ # pair comparison
152
+ adanos crypto BTC/ETH --days 7
153
+
154
+ # discovery
155
+ adanos scan --asset crypto --style daytrader
156
+ ```
157
+
158
+ ### 5) Portfolio/watchlist workflow
159
+
160
+ ```bash
161
+ adanos watchlist add core --asset stocks --symbols MSFT,AAPL,NVDA
162
+ adanos watchlist add core --asset crypto --symbols BTC,ETH
163
+ adanos watchlist show core
164
+ adanos watchlist report core --asset all --days 7
165
+ ```
166
+
167
+ ### 6) Automation / agent workflow (JSON)
168
+
169
+ ```bash
170
+ adanos --output json capabilities
171
+ adanos --output json endpoint list
172
+ adanos --output json ask "How does TSLA look?"
173
+ adanos --output json scan --asset stocks --style daytrader
174
+ ```
175
+
176
+ Note: global flags are recommended before subcommands. The CLI also tolerates `capabilities --output json` style input.
177
+
178
+ ## Interactive Shell
179
+
180
+ Start:
181
+
182
+ ```bash
183
+ adanos
184
+ ```
185
+
186
+ Behavior:
187
+ - Plain text is interpreted as `ask`.
188
+ - Slash-prefixed commands run CLI commands directly.
189
+ - `scan` shorthand works:
190
+ - `/scan` -> defaults to stocks starter scan
191
+ - `/scan crypto` -> crypto scan
192
+ - `/help`, `/clear`, `/exit` are built-in shell controls.
193
+
194
+ Fullscreen and scrollback:
195
+ - Default keeps terminal scrollback usable.
196
+ - Optional fullscreen mode:
197
+
198
+ ```bash
199
+ adanos shell --fullscreen
200
+ # or via env
201
+ ADANOS_CLI_FULLSCREEN=1 adanos shell
202
+ ```
203
+
204
+ ## Global Flags
205
+
206
+ Available for all commands:
207
+
208
+ ```bash
209
+ adanos [--api-key KEY] [--base-url URL] [--output text|json] [--version] <command> ...
210
+ ```
211
+
212
+ - `--api-key`: override configured key for this call
213
+ - `--base-url`: override API base URL
214
+ - `--output`: choose `text` or `json`
215
+ - `--version`: print version and exit
216
+
217
+ ## Complete Command Reference
218
+
219
+ ### `onboard`
220
+
221
+ ```bash
222
+ adanos onboard
223
+ adanos onboard guide
224
+ adanos onboard wizard [--json]
225
+ adanos onboard register --name NAME --email EMAIL --purpose PURPOSE [--company-name NAME] [--json]
226
+ adanos onboard redeem --token kt_xxx [--save] [--json]
227
+ ```
228
+
229
+ ### `config`
230
+
231
+ ```bash
232
+ adanos config set --api-key sk_live_xxx [--base-url URL]
233
+ adanos config show
234
+ adanos config clear
235
+ ```
236
+
237
+ ### `capabilities`
238
+
239
+ ```bash
240
+ adanos capabilities
241
+ adanos --output json capabilities
242
+ ```
243
+
244
+ ### `account`
245
+
246
+ ```bash
247
+ adanos account
248
+ adanos account --json
249
+ ```
250
+
251
+ Shows:
252
+ - current account plan (`free`, `hobby`, `professional`)
253
+ - monthly credits used/remaining (or `unlimited` for paid plans)
254
+ - out-of-credits state on free tier
255
+ - upgrade options + contact
256
+
257
+ ### `shell`
258
+
259
+ ```bash
260
+ adanos shell [--fullscreen | --no-fullscreen]
261
+ ```
262
+
263
+ ### `stock`
264
+
265
+ ```bash
266
+ adanos stock TICKER [--days 7] [--json]
267
+ ```
268
+
269
+ ### `crypto`
270
+
271
+ ```bash
272
+ adanos crypto SYMBOL_OR_PAIR [--days 7] [--json]
273
+ # examples: BTC, ETH, BTC/ETH
274
+ ```
275
+
276
+ ### `ask`
277
+
278
+ ```bash
279
+ adanos ask "free text question" [--days 7] [--json]
280
+ ```
281
+
282
+ ### `scan`
283
+
284
+ ```bash
285
+ adanos scan --asset {stocks|crypto}
286
+ [--style {starter|daytrader|swing|investor}]
287
+ [--days N] [--limit N] [--top N]
288
+ [--min-buzz X] [--min-volume N] [--min-platforms N]
289
+ [--min-sentiment X] [--max-sentiment X]
290
+ [--json]
291
+ ```
292
+
293
+ ### `briefing`
294
+
295
+ ```bash
296
+ adanos briefing [--profile {starter|daytrader|swing|investor|crypto|research|portfolio}]
297
+ [--days N] [--limit N]
298
+ [--stocks CSV] [--crypto CSV]
299
+ [--from-watchlist NAME]
300
+ [--json]
301
+ ```
302
+
303
+ ### `watchlist`
304
+
305
+ ```bash
306
+ adanos watchlist list [--json]
307
+ adanos watchlist show NAME [--json]
308
+ adanos watchlist add NAME --asset {stocks|crypto} --symbols CSV [--json]
309
+ adanos watchlist remove NAME --asset {stocks|crypto} --symbols CSV [--json]
310
+ adanos watchlist delete NAME [--json]
311
+ adanos watchlist report NAME [--asset {stocks|crypto|all}] [--days N] [--json]
312
+ ```
313
+
314
+ ### `endpoint`
315
+
316
+ ```bash
317
+ adanos endpoint list [--json]
318
+ adanos endpoint call ENDPOINT_ID
319
+ [--ticker T] [--symbol S] [--q Q] [--query Q]
320
+ [--tickers CSV] [--symbols CSV] [--assets CSV]
321
+ [--days N] [--limit N] [--offset N] [--type stock|etf|all]
322
+ [--json]
323
+ ```
324
+
325
+ ### `trending`
326
+
327
+ ```bash
328
+ adanos trending --platform {reddit-stocks|reddit-crypto|x-stocks|polymarket-stocks}
329
+ [--dimension {main|sectors|countries|tokens}]
330
+ [--days N] [--limit N] [--offset N]
331
+ [--type {stock|etf|all}]
332
+ [--json]
333
+ ```
334
+
335
+ ### `search`
336
+
337
+ ```bash
338
+ adanos search --platform {reddit-stocks|reddit-crypto|x-stocks|polymarket-stocks} QUERY [--json]
339
+ ```
340
+
341
+ ### `compare`
342
+
343
+ ```bash
344
+ adanos compare --platform {reddit-stocks|reddit-crypto|x-stocks|polymarket-stocks} ASSETS_CSV [--days N] [--json]
345
+ ```
346
+
347
+ ### `stats`
348
+
349
+ ```bash
350
+ adanos stats --platform {reddit-stocks|reddit-crypto|x-stocks|polymarket-stocks} [--json]
351
+ ```
352
+
353
+ ### `health`
354
+
355
+ ```bash
356
+ adanos health [--platform {all|reddit-stocks|reddit-crypto|x-stocks|polymarket-stocks}] [--json]
357
+ ```
358
+
359
+ ## Endpoint Coverage Guarantee
360
+
361
+ `adanos endpoint list` exposes one CLI endpoint ID per OpenAPI path.
362
+
363
+ `adanos endpoint call <endpoint-id> ...` allows direct invocation of every supported OpenAPI endpoint.
364
+
365
+ ## Config Resolution Order
366
+
367
+ 1. CLI flags (`--api-key`, `--base-url`)
368
+ 2. Environment (`ADANOS_API_KEY`, `ADANOS_BASE_URL`)
369
+ 3. Local config file (`~/.config/adanos-cli/config.json`)
370
+
371
+ ## Reliability Recommendations
372
+
373
+ For the most stable sentiment snapshots:
374
+ - Use direct symbols/tickers (`stock`, `crypto`, `compare`) when possible.
375
+ - Use broader windows for less-liquid assets (`--days 7` or `--days 30`).
376
+ - Check service health first if results look stale:
377
+
378
+ ```bash
379
+ adanos health --platform all
380
+ ```
381
+
382
+ If you hit rate/credit limits:
383
+
384
+ ```bash
385
+ adanos account
386
+ ```