scholarinboxcli 0.1.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,14 @@
1
+ __pycache__/
2
+ *.py[cod]
3
+ *.pyo
4
+ .python-version
5
+ .venv/
6
+ .uv/
7
+ .ruff_cache/
8
+ .pytest_cache/
9
+ .mypy_cache/
10
+ .coverage
11
+ coverage.xml
12
+ dist/
13
+ build/
14
+ *.egg-info/
@@ -0,0 +1,236 @@
1
+ Metadata-Version: 2.4
2
+ Name: scholarinboxcli
3
+ Version: 0.1.0
4
+ Summary: CLI for Scholar Inbox (authenticated web API)
5
+ License-Expression: MIT
6
+ Keywords: bibliography,cli,research,scholar
7
+ Classifier: Development Status :: 3 - Alpha
8
+ Classifier: Environment :: Console
9
+ Classifier: Intended Audience :: Science/Research
10
+ Classifier: License :: OSI Approved :: MIT License
11
+ Classifier: Programming Language :: Python :: 3
12
+ Classifier: Programming Language :: Python :: 3.10
13
+ Classifier: Programming Language :: Python :: 3.11
14
+ Classifier: Programming Language :: Python :: 3.12
15
+ Classifier: Topic :: Scientific/Engineering
16
+ Requires-Python: >=3.10
17
+ Requires-Dist: httpx>=0.25.0
18
+ Requires-Dist: rich>=13.0.0
19
+ Requires-Dist: typer>=0.9.0
20
+ Description-Content-Type: text/markdown
21
+
22
+ # scholarinboxcli
23
+
24
+ CLI for Scholar Inbox, for humans and agents alike.
25
+
26
+ ## Installation
27
+
28
+ ```bash
29
+ pip install scholarinboxcli
30
+ ```
31
+
32
+ Or with uv:
33
+
34
+ ```bash
35
+ uv pip install scholarinboxcli
36
+ ```
37
+
38
+ Or run directly with uvx (no install):
39
+
40
+ ```bash
41
+ uvx scholarinboxcli auth login --url "<magic-link-url>"
42
+ ```
43
+
44
+ ## Auth
45
+
46
+ ```bash
47
+ # Log in with the magic-link URL from the web app
48
+ scholarinboxcli auth login --url "https://www.scholar-inbox.com/login?sha_key=...&date=MM-DD-YYYY"
49
+
50
+ # Check current session and user info
51
+ scholarinboxcli auth status
52
+
53
+ # Clear local session config
54
+ scholarinboxcli auth logout
55
+ ```
56
+
57
+ Note: `auth login` extracts `sha_key` from the URL and authenticates via the API.
58
+
59
+ Config is stored at `~/.config/scholarinboxcli/config.json`. You can override the API base with `SCHOLAR_INBOX_API_BASE`.
60
+
61
+ ## Command reference
62
+
63
+ Top-level commands:
64
+
65
+ - `auth` (login/status/logout)
66
+ - `digest`
67
+ - `trending`
68
+ - `search`
69
+ - `semantic`
70
+ - `interactions`
71
+ - `bookmark` (list/add/remove)
72
+ - `collection` (list/create/rename/delete/add/remove/papers/similar)
73
+ - `conference` (list/explore)
74
+
75
+ Run `scholarinboxcli --help` or `scholarinboxcli <command> --help` for full options.
76
+
77
+ ## Quickstart
78
+
79
+ ```bash
80
+ # Fetch a daily digest by date (MM-DD-YYYY)
81
+ scholarinboxcli digest --date 01-30-2026 --json
82
+
83
+ # Trending papers (last 7 days)
84
+ scholarinboxcli trending --category ALL --days 7 --json
85
+
86
+ # Keyword search
87
+ scholarinboxcli search "transformers" --limit 5 --json
88
+
89
+ # Semantic search
90
+ scholarinboxcli semantic "graph neural networks" --limit 5 --json
91
+
92
+ # List your bookmarks
93
+ scholarinboxcli bookmark list --json
94
+ ```
95
+
96
+ ## Collections
97
+
98
+ ```bash
99
+ # List collections
100
+ scholarinboxcli collection list
101
+
102
+ # Expanded collection names (marks which collections are expanded server-side)
103
+ scholarinboxcli collection list --expanded
104
+
105
+ # Create, rename, delete
106
+ scholarinboxcli collection create "My Collection"
107
+
108
+ # Rename by ID (or name)
109
+ scholarinboxcli collection rename 10759 "New Name"
110
+
111
+ # Delete by ID (or name)
112
+ scholarinboxcli collection delete 10759
113
+
114
+ # Add/remove papers
115
+ scholarinboxcli collection add 10759 4559909
116
+ scholarinboxcli collection remove 10759 4559909
117
+
118
+ # Show papers in a collection
119
+ scholarinboxcli collection papers 10759
120
+
121
+ # Similar papers for one or more collections
122
+ scholarinboxcli collection similar 10759 12345
123
+
124
+ # You can also use collection names (case-insensitive). The CLI will
125
+ # automatically fetch collection ID mappings from the API when needed.
126
+ scholarinboxcli collection papers "AIAgents"
127
+ scholarinboxcli collection similar "AIAgents" "Benchmark"
128
+ ```
129
+
130
+ Collection name matching is exact → prefix → contains. If multiple matches exist, the CLI reports ambiguity and shows candidate IDs.
131
+
132
+ ## Search
133
+
134
+ ```bash
135
+ # Full-text keyword search
136
+ scholarinboxcli search "transformers" --limit 5
137
+ ```
138
+
139
+ ## Semantic Search
140
+
141
+ ```bash
142
+ # Semantic similarity search
143
+ scholarinboxcli semantic "graph neural networks" --limit 5
144
+ ```
145
+
146
+ ## Other commands
147
+
148
+ ```bash
149
+ # Daily digest view (MM-DD-YYYY)
150
+ scholarinboxcli digest --date 01-30-2026
151
+
152
+ # Trending papers by category
153
+ scholarinboxcli trending --category ALL --days 7
154
+
155
+ # Read/like/dislike interactions feed
156
+ scholarinboxcli interactions --type all
157
+
158
+ # List bookmarks
159
+ scholarinboxcli bookmark list
160
+
161
+ # List known conferences
162
+ scholarinboxcli conference list
163
+
164
+ # Explore conference indices
165
+ scholarinboxcli conference explore
166
+ ```
167
+
168
+ ## Output modes
169
+
170
+ - TTY: Rich tables
171
+ - `--json`: pretty JSON
172
+ - Piped: pretty JSON (auto)
173
+
174
+ Examples for agents/scripting:
175
+
176
+ ```bash
177
+ # Auto-JSON when piped
178
+ scholarinboxcli collection list | jq '.'
179
+
180
+ # Explicit JSON output
181
+ scholarinboxcli collection papers "AIAgents" --json
182
+
183
+ # JSON for automation (stable keys)
184
+ scholarinboxcli search "diffusion" --json
185
+ ```
186
+
187
+ ## Tested (2026-02-01)
188
+
189
+ The following commands were exercised against the live API (with a valid magic-link login) to confirm behavior:
190
+
191
+ ```bash
192
+ scholarinboxcli --help
193
+ scholarinboxcli auth status --json
194
+ scholarinboxcli digest --date 01-30-2026 --json
195
+ scholarinboxcli trending --category ALL --days 7 --json
196
+ scholarinboxcli search "transformers" --limit 5 --json
197
+ scholarinboxcli semantic "graph neural networks" --limit 5 --json
198
+ scholarinboxcli interactions --type all --json
199
+ scholarinboxcli bookmark list --json
200
+ scholarinboxcli bookmark add 3302478 --json
201
+ scholarinboxcli bookmark remove 3302478 --json
202
+ scholarinboxcli collection list --json
203
+ scholarinboxcli collection list --expanded --json
204
+ scholarinboxcli collection papers "AIAgents" --json
205
+ scholarinboxcli collection similar "AIAgents" --json
206
+ scholarinboxcli conference list --json
207
+ scholarinboxcli conference explore --json
208
+ ```
209
+
210
+ ## Notes
211
+
212
+ - Some collection mutations (create/rename/delete/add/remove) rely on best-effort endpoints that may change on the service side. If a mutation fails, try again or use the web UI to validate the current behavior.
213
+ - Similar papers for collections uses the server endpoint used by the web UI. Results typically appear under `digest_df` in JSON responses.
214
+
215
+ ## Publish to PyPI
216
+
217
+ ```bash
218
+ # 1) Build sdist + wheel
219
+ uv run --with build python -m build
220
+
221
+ # 2) Validate metadata/rendering
222
+ uvx twine check dist/*
223
+
224
+ # 3) (Optional) test publish first
225
+ uvx twine upload --repository testpypi dist/*
226
+
227
+ # 4) Publish to PyPI
228
+ uvx twine upload dist/*
229
+ ```
230
+
231
+ If using an API token:
232
+
233
+ ```bash
234
+ export TWINE_USERNAME=__token__
235
+ export TWINE_PASSWORD=<your-pypi-token>
236
+ ```
@@ -0,0 +1,215 @@
1
+ # scholarinboxcli
2
+
3
+ CLI for Scholar Inbox, for humans and agents alike.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ pip install scholarinboxcli
9
+ ```
10
+
11
+ Or with uv:
12
+
13
+ ```bash
14
+ uv pip install scholarinboxcli
15
+ ```
16
+
17
+ Or run directly with uvx (no install):
18
+
19
+ ```bash
20
+ uvx scholarinboxcli auth login --url "<magic-link-url>"
21
+ ```
22
+
23
+ ## Auth
24
+
25
+ ```bash
26
+ # Log in with the magic-link URL from the web app
27
+ scholarinboxcli auth login --url "https://www.scholar-inbox.com/login?sha_key=...&date=MM-DD-YYYY"
28
+
29
+ # Check current session and user info
30
+ scholarinboxcli auth status
31
+
32
+ # Clear local session config
33
+ scholarinboxcli auth logout
34
+ ```
35
+
36
+ Note: `auth login` extracts `sha_key` from the URL and authenticates via the API.
37
+
38
+ Config is stored at `~/.config/scholarinboxcli/config.json`. You can override the API base with `SCHOLAR_INBOX_API_BASE`.
39
+
40
+ ## Command reference
41
+
42
+ Top-level commands:
43
+
44
+ - `auth` (login/status/logout)
45
+ - `digest`
46
+ - `trending`
47
+ - `search`
48
+ - `semantic`
49
+ - `interactions`
50
+ - `bookmark` (list/add/remove)
51
+ - `collection` (list/create/rename/delete/add/remove/papers/similar)
52
+ - `conference` (list/explore)
53
+
54
+ Run `scholarinboxcli --help` or `scholarinboxcli <command> --help` for full options.
55
+
56
+ ## Quickstart
57
+
58
+ ```bash
59
+ # Fetch a daily digest by date (MM-DD-YYYY)
60
+ scholarinboxcli digest --date 01-30-2026 --json
61
+
62
+ # Trending papers (last 7 days)
63
+ scholarinboxcli trending --category ALL --days 7 --json
64
+
65
+ # Keyword search
66
+ scholarinboxcli search "transformers" --limit 5 --json
67
+
68
+ # Semantic search
69
+ scholarinboxcli semantic "graph neural networks" --limit 5 --json
70
+
71
+ # List your bookmarks
72
+ scholarinboxcli bookmark list --json
73
+ ```
74
+
75
+ ## Collections
76
+
77
+ ```bash
78
+ # List collections
79
+ scholarinboxcli collection list
80
+
81
+ # Expanded collection names (marks which collections are expanded server-side)
82
+ scholarinboxcli collection list --expanded
83
+
84
+ # Create, rename, delete
85
+ scholarinboxcli collection create "My Collection"
86
+
87
+ # Rename by ID (or name)
88
+ scholarinboxcli collection rename 10759 "New Name"
89
+
90
+ # Delete by ID (or name)
91
+ scholarinboxcli collection delete 10759
92
+
93
+ # Add/remove papers
94
+ scholarinboxcli collection add 10759 4559909
95
+ scholarinboxcli collection remove 10759 4559909
96
+
97
+ # Show papers in a collection
98
+ scholarinboxcli collection papers 10759
99
+
100
+ # Similar papers for one or more collections
101
+ scholarinboxcli collection similar 10759 12345
102
+
103
+ # You can also use collection names (case-insensitive). The CLI will
104
+ # automatically fetch collection ID mappings from the API when needed.
105
+ scholarinboxcli collection papers "AIAgents"
106
+ scholarinboxcli collection similar "AIAgents" "Benchmark"
107
+ ```
108
+
109
+ Collection name matching is exact → prefix → contains. If multiple matches exist, the CLI reports ambiguity and shows candidate IDs.
110
+
111
+ ## Search
112
+
113
+ ```bash
114
+ # Full-text keyword search
115
+ scholarinboxcli search "transformers" --limit 5
116
+ ```
117
+
118
+ ## Semantic Search
119
+
120
+ ```bash
121
+ # Semantic similarity search
122
+ scholarinboxcli semantic "graph neural networks" --limit 5
123
+ ```
124
+
125
+ ## Other commands
126
+
127
+ ```bash
128
+ # Daily digest view (MM-DD-YYYY)
129
+ scholarinboxcli digest --date 01-30-2026
130
+
131
+ # Trending papers by category
132
+ scholarinboxcli trending --category ALL --days 7
133
+
134
+ # Read/like/dislike interactions feed
135
+ scholarinboxcli interactions --type all
136
+
137
+ # List bookmarks
138
+ scholarinboxcli bookmark list
139
+
140
+ # List known conferences
141
+ scholarinboxcli conference list
142
+
143
+ # Explore conference indices
144
+ scholarinboxcli conference explore
145
+ ```
146
+
147
+ ## Output modes
148
+
149
+ - TTY: Rich tables
150
+ - `--json`: pretty JSON
151
+ - Piped: pretty JSON (auto)
152
+
153
+ Examples for agents/scripting:
154
+
155
+ ```bash
156
+ # Auto-JSON when piped
157
+ scholarinboxcli collection list | jq '.'
158
+
159
+ # Explicit JSON output
160
+ scholarinboxcli collection papers "AIAgents" --json
161
+
162
+ # JSON for automation (stable keys)
163
+ scholarinboxcli search "diffusion" --json
164
+ ```
165
+
166
+ ## Tested (2026-02-01)
167
+
168
+ The following commands were exercised against the live API (with a valid magic-link login) to confirm behavior:
169
+
170
+ ```bash
171
+ scholarinboxcli --help
172
+ scholarinboxcli auth status --json
173
+ scholarinboxcli digest --date 01-30-2026 --json
174
+ scholarinboxcli trending --category ALL --days 7 --json
175
+ scholarinboxcli search "transformers" --limit 5 --json
176
+ scholarinboxcli semantic "graph neural networks" --limit 5 --json
177
+ scholarinboxcli interactions --type all --json
178
+ scholarinboxcli bookmark list --json
179
+ scholarinboxcli bookmark add 3302478 --json
180
+ scholarinboxcli bookmark remove 3302478 --json
181
+ scholarinboxcli collection list --json
182
+ scholarinboxcli collection list --expanded --json
183
+ scholarinboxcli collection papers "AIAgents" --json
184
+ scholarinboxcli collection similar "AIAgents" --json
185
+ scholarinboxcli conference list --json
186
+ scholarinboxcli conference explore --json
187
+ ```
188
+
189
+ ## Notes
190
+
191
+ - Some collection mutations (create/rename/delete/add/remove) rely on best-effort endpoints that may change on the service side. If a mutation fails, try again or use the web UI to validate the current behavior.
192
+ - Similar papers for collections uses the server endpoint used by the web UI. Results typically appear under `digest_df` in JSON responses.
193
+
194
+ ## Publish to PyPI
195
+
196
+ ```bash
197
+ # 1) Build sdist + wheel
198
+ uv run --with build python -m build
199
+
200
+ # 2) Validate metadata/rendering
201
+ uvx twine check dist/*
202
+
203
+ # 3) (Optional) test publish first
204
+ uvx twine upload --repository testpypi dist/*
205
+
206
+ # 4) Publish to PyPI
207
+ uvx twine upload dist/*
208
+ ```
209
+
210
+ If using an API token:
211
+
212
+ ```bash
213
+ export TWINE_USERNAME=__token__
214
+ export TWINE_PASSWORD=<your-pypi-token>
215
+ ```
@@ -0,0 +1,38 @@
1
+ [build-system]
2
+ requires = ["hatchling"]
3
+ build-backend = "hatchling.build"
4
+
5
+ [project]
6
+ name = "scholarinboxcli"
7
+ version = "0.1.0"
8
+ description = "CLI for Scholar Inbox (authenticated web API)"
9
+ readme = "README.md"
10
+ requires-python = ">=3.10"
11
+ license = "MIT"
12
+ keywords = ["scholar", "research", "cli", "bibliography"]
13
+ classifiers = [
14
+ "Development Status :: 3 - Alpha",
15
+ "Environment :: Console",
16
+ "Intended Audience :: Science/Research",
17
+ "License :: OSI Approved :: MIT License",
18
+ "Programming Language :: Python :: 3",
19
+ "Programming Language :: Python :: 3.10",
20
+ "Programming Language :: Python :: 3.11",
21
+ "Programming Language :: Python :: 3.12",
22
+ "Topic :: Scientific/Engineering",
23
+ ]
24
+ dependencies = [
25
+ "typer>=0.9.0",
26
+ "httpx>=0.25.0",
27
+ "rich>=13.0.0",
28
+ ]
29
+
30
+ [project.scripts]
31
+ scholarinboxcli = "scholarinboxcli.cli:app"
32
+
33
+ [tool.hatch.build.targets.wheel]
34
+ packages = ["src/scholarinboxcli"]
35
+
36
+ [tool.pytest.ini_options]
37
+ testpaths = ["tests"]
38
+ pythonpath = ["src"]
@@ -0,0 +1 @@
1
+ __version__ = "0.1.0"