labtab 0.1.0__tar.gz → 0.2.1__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.
- {labtab-0.1.0 → labtab-0.2.1}/.gitignore +1 -0
- labtab-0.2.1/PKG-INFO +317 -0
- labtab-0.2.1/README.md +291 -0
- {labtab-0.1.0 → labtab-0.2.1}/RELEASING.md +3 -3
- {labtab-0.1.0 → labtab-0.2.1}/pyproject.toml +2 -2
- labtab-0.2.1/src/labtab/__init__.py +5 -0
- {labtab-0.1.0 → labtab-0.2.1}/src/labtab/auth.py +20 -6
- {labtab-0.1.0 → labtab-0.2.1}/src/labtab/cli.py +38 -4
- labtab-0.2.1/src/labtab/client.py +1212 -0
- {labtab-0.1.0 → labtab-0.2.1}/src/labtab/commands/_common.py +8 -0
- labtab-0.2.1/src/labtab/commands/account.py +134 -0
- labtab-0.2.1/src/labtab/commands/ai.py +320 -0
- labtab-0.2.1/src/labtab/commands/api_keys.py +207 -0
- labtab-0.2.1/src/labtab/commands/audit_logs.py +190 -0
- {labtab-0.1.0 → labtab-0.2.1}/src/labtab/commands/auth.py +59 -4
- labtab-0.2.1/src/labtab/commands/deadlines.py +144 -0
- {labtab-0.1.0 → labtab-0.2.1}/src/labtab/commands/export.py +28 -28
- {labtab-0.1.0 → labtab-0.2.1}/src/labtab/commands/grants.py +1 -1
- labtab-0.2.1/src/labtab/commands/home.py +322 -0
- labtab-0.2.1/src/labtab/commands/labs.py +421 -0
- labtab-0.2.1/src/labtab/commands/letters.py +352 -0
- labtab-0.2.1/src/labtab/commands/literature.py +396 -0
- {labtab-0.1.0 → labtab-0.2.1}/src/labtab/commands/meetings.py +23 -16
- labtab-0.2.1/src/labtab/commands/notes.py +356 -0
- labtab-0.2.1/src/labtab/commands/notifications.py +172 -0
- {labtab-0.1.0 → labtab-0.2.1}/src/labtab/commands/papers.py +22 -18
- {labtab-0.1.0 → labtab-0.2.1}/src/labtab/commands/people.py +1 -1
- labtab-0.2.1/src/labtab/commands/posters.py +181 -0
- {labtab-0.1.0 → labtab-0.2.1}/src/labtab/commands/projects.py +1 -1
- labtab-0.2.1/src/labtab/commands/results.py +233 -0
- labtab-0.2.1/src/labtab/commands/search.py +129 -0
- labtab-0.2.1/src/labtab/commands/shares.py +218 -0
- labtab-0.2.1/src/labtab/commands/talks.py +257 -0
- {labtab-0.1.0 → labtab-0.2.1}/src/labtab/commands/tasks.py +12 -12
- labtab-0.2.1/src/labtab/commands/wiki.py +242 -0
- {labtab-0.1.0 → labtab-0.2.1}/src/labtab/config.py +1 -1
- labtab-0.2.1/src/labtab/datetimes.py +125 -0
- {labtab-0.1.0 → labtab-0.2.1}/src/labtab/errors.py +2 -2
- {labtab-0.1.0 → labtab-0.2.1}/src/labtab/models/__init__.py +50 -2
- labtab-0.2.1/src/labtab/models/api.py +667 -0
- labtab-0.2.1/src/labtab/models/generated.py +1878 -0
- {labtab-0.1.0 → labtab-0.2.1}/src/labtab/output.py +5 -5
- labtab-0.2.1/src/labtab.egg-info/PKG-INFO +317 -0
- {labtab-0.1.0 → labtab-0.2.1}/src/labtab.egg-info/SOURCES.txt +34 -0
- {labtab-0.1.0 → labtab-0.2.1}/src/labtab.egg-info/requires.txt +0 -1
- {labtab-0.1.0 → labtab-0.2.1}/tests/conftest.py +3 -3
- {labtab-0.1.0 → labtab-0.2.1}/tests/test_auth.py +4 -4
- {labtab-0.1.0 → labtab-0.2.1}/tests/test_client.py +53 -4
- labtab-0.2.1/tests/test_commands_account.py +114 -0
- labtab-0.2.1/tests/test_commands_ai.py +533 -0
- labtab-0.2.1/tests/test_commands_api_keys.py +143 -0
- labtab-0.2.1/tests/test_commands_audit_logs.py +145 -0
- {labtab-0.1.0 → labtab-0.2.1}/tests/test_commands_auth.py +126 -3
- labtab-0.2.1/tests/test_commands_deadlines.py +116 -0
- {labtab-0.1.0 → labtab-0.2.1}/tests/test_commands_export.py +36 -11
- {labtab-0.1.0 → labtab-0.2.1}/tests/test_commands_grants.py +4 -4
- labtab-0.2.1/tests/test_commands_home.py +267 -0
- labtab-0.2.1/tests/test_commands_labs.py +384 -0
- labtab-0.2.1/tests/test_commands_letters.py +179 -0
- labtab-0.2.1/tests/test_commands_literature.py +338 -0
- {labtab-0.1.0 → labtab-0.2.1}/tests/test_commands_meetings.py +32 -9
- {labtab-0.1.0 → labtab-0.2.1}/tests/test_commands_meetings_create.py +105 -2
- labtab-0.2.1/tests/test_commands_notes.py +232 -0
- labtab-0.2.1/tests/test_commands_notifications.py +119 -0
- {labtab-0.1.0 → labtab-0.2.1}/tests/test_commands_papers.py +29 -3
- {labtab-0.1.0 → labtab-0.2.1}/tests/test_commands_papers_import.py +3 -1
- {labtab-0.1.0 → labtab-0.2.1}/tests/test_commands_people.py +2 -2
- labtab-0.2.1/tests/test_commands_posters.py +186 -0
- {labtab-0.1.0 → labtab-0.2.1}/tests/test_commands_projects.py +2 -2
- labtab-0.2.1/tests/test_commands_results.py +309 -0
- labtab-0.2.1/tests/test_commands_search.py +106 -0
- labtab-0.2.1/tests/test_commands_shares.py +164 -0
- labtab-0.2.1/tests/test_commands_talks.py +225 -0
- {labtab-0.1.0 → labtab-0.2.1}/tests/test_commands_tasks.py +4 -4
- {labtab-0.1.0 → labtab-0.2.1}/tests/test_commands_tasks_complete.py +5 -6
- {labtab-0.1.0 → labtab-0.2.1}/tests/test_commands_tasks_create.py +3 -4
- labtab-0.2.1/tests/test_commands_wiki.py +125 -0
- {labtab-0.1.0 → labtab-0.2.1}/tests/test_config.py +4 -4
- labtab-0.2.1/tests/test_datetimes.py +119 -0
- {labtab-0.1.0 → labtab-0.2.1}/tests/test_models_generated.py +30 -3
- labtab-0.1.0/PKG-INFO +0 -152
- labtab-0.1.0/README.md +0 -125
- labtab-0.1.0/src/labtab/__init__.py +0 -5
- labtab-0.1.0/src/labtab/client.py +0 -316
- labtab-0.1.0/src/labtab/commands/labs.py +0 -39
- labtab-0.1.0/src/labtab/models/api.py +0 -153
- labtab-0.1.0/src/labtab/models/generated.py +0 -1390
- labtab-0.1.0/src/labtab.egg-info/PKG-INFO +0 -152
- labtab-0.1.0/tests/test_commands_labs.py +0 -52
- {labtab-0.1.0 → labtab-0.2.1}/LICENSE +0 -0
- {labtab-0.1.0 → labtab-0.2.1}/setup.cfg +0 -0
- {labtab-0.1.0 → labtab-0.2.1}/src/labtab/commands/__init__.py +0 -0
- {labtab-0.1.0 → labtab-0.2.1}/src/labtab/py.typed +0 -0
- {labtab-0.1.0 → labtab-0.2.1}/src/labtab.egg-info/dependency_links.txt +0 -0
- {labtab-0.1.0 → labtab-0.2.1}/src/labtab.egg-info/entry_points.txt +0 -0
- {labtab-0.1.0 → labtab-0.2.1}/src/labtab.egg-info/top_level.txt +0 -0
- {labtab-0.1.0 → labtab-0.2.1}/tests/__init__.py +0 -0
labtab-0.2.1/PKG-INFO
ADDED
|
@@ -0,0 +1,317 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: labtab
|
|
3
|
+
Version: 0.2.1
|
|
4
|
+
Summary: Command-line interface for LabTab (Wetware Ltd). Manage your lab from the terminal.
|
|
5
|
+
Author-email: Wetware Ltd <support@wetware.ai>
|
|
6
|
+
License: MIT
|
|
7
|
+
Classifier: Development Status :: 3 - Alpha
|
|
8
|
+
Classifier: Environment :: Console
|
|
9
|
+
Classifier: Intended Audience :: Science/Research
|
|
10
|
+
Classifier: Programming Language :: Python :: 3
|
|
11
|
+
Requires-Python: >=3.10
|
|
12
|
+
Description-Content-Type: text/markdown
|
|
13
|
+
License-File: LICENSE
|
|
14
|
+
Requires-Dist: typer[all]>=0.12.0
|
|
15
|
+
Requires-Dist: httpx>=0.27.0
|
|
16
|
+
Requires-Dist: pydantic>=2.5
|
|
17
|
+
Requires-Dist: pydantic[email]>=2.5
|
|
18
|
+
Requires-Dist: rich>=13.7.0
|
|
19
|
+
Requires-Dist: tomli>=2.0; python_version < "3.11"
|
|
20
|
+
Requires-Dist: tomli-w>=1.0
|
|
21
|
+
Provides-Extra: dev
|
|
22
|
+
Requires-Dist: pytest>=7.4; extra == "dev"
|
|
23
|
+
Requires-Dist: pytest-httpx>=0.30; extra == "dev"
|
|
24
|
+
Requires-Dist: ruff>=0.1; extra == "dev"
|
|
25
|
+
Dynamic: license-file
|
|
26
|
+
|
|
27
|
+
# labtab
|
|
28
|
+
|
|
29
|
+
Command-line interface for [LabTab](https://labtab.app) - the lab management
|
|
30
|
+
platform for Principal Investigators. Manage grants, papers, literature,
|
|
31
|
+
posters, talks, results, meetings, tasks, projects, and people from your
|
|
32
|
+
terminal.
|
|
33
|
+
|
|
34
|
+
Built by [Wetware Ltd](https://wetware.co.uk).
|
|
35
|
+
|
|
36
|
+
## Install
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
pip install labtab
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
Requires Python 3.10+.
|
|
43
|
+
|
|
44
|
+
## Shell completion
|
|
45
|
+
|
|
46
|
+
`labtab` ships tab completion for bash, zsh, fish, and PowerShell:
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
# Install completion for your current shell (then restart the shell)
|
|
50
|
+
labtab --install-completion
|
|
51
|
+
|
|
52
|
+
# Or print the completion script to wire up manually
|
|
53
|
+
labtab --show-completion
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
## Quickstart
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
# Pair your terminal with your LabTab account (opens a browser window)
|
|
60
|
+
labtab auth login
|
|
61
|
+
|
|
62
|
+
# Pair with a read-only key instead - mutating commands will be rejected
|
|
63
|
+
labtab auth login --read-only
|
|
64
|
+
|
|
65
|
+
# See which labs you belong to
|
|
66
|
+
labtab labs list
|
|
67
|
+
labtab labs members list
|
|
68
|
+
labtab labs members invite new.member@example.com --role PhD
|
|
69
|
+
labtab labs members set-role 42 "PhD"
|
|
70
|
+
labtab labs members archive 42
|
|
71
|
+
labtab labs members transfer-pi 42
|
|
72
|
+
labtab labs settings show
|
|
73
|
+
labtab labs settings update --timezone Europe/London
|
|
74
|
+
|
|
75
|
+
# Review or update your account profile
|
|
76
|
+
labtab account show
|
|
77
|
+
labtab account update --first-name Alex --last-name Harston
|
|
78
|
+
|
|
79
|
+
# Manage API keys for scripts and integrations
|
|
80
|
+
labtab api-keys list
|
|
81
|
+
labtab api-keys create "CI deploy" --scope read:papers --scope write:notes
|
|
82
|
+
labtab api-keys revoke 42
|
|
83
|
+
|
|
84
|
+
# Open a command-line overview of your lab (--limit rows per section)
|
|
85
|
+
labtab home
|
|
86
|
+
labtab home --limit 10
|
|
87
|
+
|
|
88
|
+
# Create a meeting - --datetime takes ISO-8601 or a relative form
|
|
89
|
+
labtab meetings create --title "Standup" --datetime "tomorrow 10:00" --lab smith-neuro-lab
|
|
90
|
+
labtab meetings create --title "1:1" --datetime "next monday 09:00" --lab smith-neuro-lab
|
|
91
|
+
|
|
92
|
+
# Search across your accessible workspace
|
|
93
|
+
labtab search "atlas figures"
|
|
94
|
+
|
|
95
|
+
# Review and clear unread notifications
|
|
96
|
+
labtab notifications list
|
|
97
|
+
labtab notifications mark-all-read
|
|
98
|
+
|
|
99
|
+
# Review PI-only lab activity
|
|
100
|
+
labtab audit-logs list
|
|
101
|
+
labtab audit-logs show 42
|
|
102
|
+
|
|
103
|
+
# Create and revoke external share links
|
|
104
|
+
labtab shares list --type paper --object-id 12
|
|
105
|
+
labtab shares create paper 12 collaborator@example.com --permission comment
|
|
106
|
+
labtab shares revoke 7
|
|
107
|
+
|
|
108
|
+
# Review upcoming lab deadlines
|
|
109
|
+
labtab deadlines list
|
|
110
|
+
|
|
111
|
+
# Track recommendation letters and drafts
|
|
112
|
+
labtab letters list
|
|
113
|
+
labtab letters show 12
|
|
114
|
+
labtab letters drafts 12
|
|
115
|
+
labtab letters save-draft 12 --file draft.html
|
|
116
|
+
labtab letters status 12 Submitted
|
|
117
|
+
|
|
118
|
+
# Browse lab wiki pages
|
|
119
|
+
labtab wiki list
|
|
120
|
+
labtab wiki tree
|
|
121
|
+
|
|
122
|
+
# Browse and export collaborative notes
|
|
123
|
+
labtab notes list meeting 42
|
|
124
|
+
labtab notes create meeting 42 --text "Decision captured"
|
|
125
|
+
labtab notes update 123 --file follow-up-notes.txt
|
|
126
|
+
labtab notes export meeting 42 --format md --output meeting-notes.md
|
|
127
|
+
|
|
128
|
+
# List your grants
|
|
129
|
+
labtab grants list
|
|
130
|
+
|
|
131
|
+
# Inspect a single grant
|
|
132
|
+
labtab grants show gr_abc123
|
|
133
|
+
|
|
134
|
+
# Show the next 7 days of meetings
|
|
135
|
+
labtab meetings list --days 7
|
|
136
|
+
|
|
137
|
+
# Get JSON for scripting
|
|
138
|
+
labtab papers list --json | jq '.[] | .title'
|
|
139
|
+
|
|
140
|
+
# Curate relevant literature and journal-club collections
|
|
141
|
+
labtab literature list --reading-status to_read
|
|
142
|
+
labtab literature create --title "Spatial transcriptomics benchmark" \
|
|
143
|
+
--author "Maya Singh" --journal "Nature Methods" --year 2026 \
|
|
144
|
+
--reading-status to_read
|
|
145
|
+
labtab literature collection-add 3 12
|
|
146
|
+
labtab literature comment 12 --body "Discuss in journal club"
|
|
147
|
+
|
|
148
|
+
# Track a conference poster
|
|
149
|
+
labtab posters create --title "Spatial transcriptomics atlas" \
|
|
150
|
+
--conference ISSCR --presented-date 2026-06-12 --author-id 42 \
|
|
151
|
+
--file poster.pdf
|
|
152
|
+
|
|
153
|
+
# Prepare and archive lab talks
|
|
154
|
+
labtab talks list --upcoming
|
|
155
|
+
labtab talks create --title "Organoid atlas update" --type Seminar \
|
|
156
|
+
--date 2026-07-01 --speaker-id 42 --project-id 3
|
|
157
|
+
labtab talks archive 11
|
|
158
|
+
|
|
159
|
+
# Capture research outputs and link them to papers, posters, talks, or grants
|
|
160
|
+
labtab results create --title "Figure 2 quantification" \
|
|
161
|
+
--description "Validated cell counts" --author 42 --project 3 \
|
|
162
|
+
--file counts.csv --kind data
|
|
163
|
+
labtab results link 8 --target-type paper --target-id 22 --relationship supports
|
|
164
|
+
|
|
165
|
+
# Export your whole lab as a zip
|
|
166
|
+
labtab export --format zip --lab smith-neuro-lab
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
## Commands
|
|
170
|
+
|
|
171
|
+
Commands that fetch structured data support `--json` for machine-readable
|
|
172
|
+
output. Most lab-scoped commands accept `--lab <slug>` to override the default
|
|
173
|
+
lab from your config; PI-only audit logs accept the lab ID used by the API
|
|
174
|
+
permission check.
|
|
175
|
+
|
|
176
|
+
| Command | What it does |
|
|
177
|
+
| ------------------------------ | ----------------------------------------- |
|
|
178
|
+
| `labtab home` | Account and lab command-center overview; `--limit` rows per section (1-50, default 5) |
|
|
179
|
+
| `labtab search <query>` | Search across accessible LabTab records |
|
|
180
|
+
| `labtab audit-logs list` | PI-only lab audit log, filter by action or actor |
|
|
181
|
+
| `labtab audit-logs show <id>` | Show one audit row with metadata |
|
|
182
|
+
| `labtab shares list` | Review active or revoked external share links |
|
|
183
|
+
| `labtab shares create <type> <id> <email>` | Create and email a secure share link |
|
|
184
|
+
| `labtab shares revoke <id>` | Revoke a share link in the active lab |
|
|
185
|
+
| `labtab notifications list` | Review account notifications |
|
|
186
|
+
| `labtab notifications mark-read <id>` | Mark one notification read |
|
|
187
|
+
| `labtab notifications mark-all-read` | Mark all notifications read |
|
|
188
|
+
| `labtab deadlines list` | Review grants, tasks, papers, and other deadlines |
|
|
189
|
+
| `labtab letters list` | Review recommendation letter requests |
|
|
190
|
+
| `labtab letters show <id>` | Show one letter request |
|
|
191
|
+
| `labtab letters drafts <id>` | List saved draft versions |
|
|
192
|
+
| `labtab letters save-draft <id>` | Save a new draft from `--text` or `--file` |
|
|
193
|
+
| `labtab letters status <id> <status>` | Update request status |
|
|
194
|
+
| `labtab wiki list` | Browse lab wiki pages |
|
|
195
|
+
| `labtab wiki show <id>` | Show a wiki page |
|
|
196
|
+
| `labtab wiki tree` | Show the wiki hierarchy |
|
|
197
|
+
| `labtab notes list <type> <id>` | Browse collaborative notes for an entity |
|
|
198
|
+
| `labtab notes show <id>` | Show one saved note snapshot |
|
|
199
|
+
| `labtab notes create <type> <id>` | Create a note from `--text` or `--file` |
|
|
200
|
+
| `labtab notes update <id>` | Replace note content from `--text` or `--file` |
|
|
201
|
+
| `labtab notes export <type> <id>` | Export entity notes as Markdown or text |
|
|
202
|
+
| `labtab auth login` | Pair this terminal with your account; `--read-only` requests a key that cannot modify data |
|
|
203
|
+
| `labtab auth logout` | Forget the local API key |
|
|
204
|
+
| `labtab auth whoami` | Show the signed-in user and default lab |
|
|
205
|
+
| `labtab auth set-base-url` | Update the stored API base URL |
|
|
206
|
+
| `labtab account show` | Show your server-side account profile and lab roles |
|
|
207
|
+
| `labtab account update` | Update editable profile fields |
|
|
208
|
+
| `labtab api-keys list` | List API keys owned by the signed-in user |
|
|
209
|
+
| `labtab api-keys create <name>` | Create an API key and print the one-time secret |
|
|
210
|
+
| `labtab api-keys revoke <id>` | Revoke one of your API keys |
|
|
211
|
+
| `labtab api-keys active-count` | Show active API key usage |
|
|
212
|
+
| `labtab labs list` | Labs you have membership in |
|
|
213
|
+
| `labtab labs members list` | List active lab memberships |
|
|
214
|
+
| `labtab labs members show <user>` | Show one lab membership |
|
|
215
|
+
| `labtab labs members invite <email>` | Invite one member through the admin-gated invite API |
|
|
216
|
+
| `labtab labs members set-role <user> <role>` | Change a member role through the PI-gated API |
|
|
217
|
+
| `labtab labs members archive <user>` | Archive a lab membership |
|
|
218
|
+
| `labtab labs members restore <user>` | Restore an archived lab membership |
|
|
219
|
+
| `labtab labs members transfer-pi <user>` | Transfer the PI role through the dedicated API |
|
|
220
|
+
| `labtab labs settings show` | Show readable lab settings |
|
|
221
|
+
| `labtab labs settings update` | Update admin-only lab settings |
|
|
222
|
+
| `labtab grants list` | Grants, filter by `--status` |
|
|
223
|
+
| `labtab grants show <id>` | Grant detail card |
|
|
224
|
+
| `labtab papers list` | Papers, filter by `--year` |
|
|
225
|
+
| `labtab papers show <id>` | Paper detail with authors, DOI |
|
|
226
|
+
| `labtab literature list` | Relevant literature, filter by search, collection, status, or classification |
|
|
227
|
+
| `labtab literature show <id>` | Literature detail with authors, DOI, relevance, and collections |
|
|
228
|
+
| `labtab literature create` | Create a literature/reference record |
|
|
229
|
+
| `labtab literature collections` | List literature collections |
|
|
230
|
+
| `labtab literature collection-create` | Create a literature collection |
|
|
231
|
+
| `labtab literature collection-add <collection> <literature>` | Add literature to a collection |
|
|
232
|
+
| `labtab literature collection-remove <collection> <literature>` | Remove literature from a collection |
|
|
233
|
+
| `labtab literature comments <id>` | List comments on a literature record |
|
|
234
|
+
| `labtab literature comment <id>` | Add a literature comment |
|
|
235
|
+
| `labtab literature claim <id>` | Claim literature as a lab paper |
|
|
236
|
+
| `labtab literature mark-external <id>` | Mark literature as external work |
|
|
237
|
+
| `labtab posters list` | Posters, searchable by title, venue, or author |
|
|
238
|
+
| `labtab posters show <id>` | Poster detail with related project, papers, grants |
|
|
239
|
+
| `labtab posters create` | Create a poster, optionally uploading a PDF |
|
|
240
|
+
| `labtab talks list` | Talks, filter by status, type, speaker, project, or grant |
|
|
241
|
+
| `labtab talks show <id>` | Talk detail with speakers, projects, papers, and links |
|
|
242
|
+
| `labtab talks create` | Create a talk record |
|
|
243
|
+
| `labtab talks archive <id>` | Archive a talk without deleting notes |
|
|
244
|
+
| `labtab results list` | Research results, filter by search, project, or task |
|
|
245
|
+
| `labtab results show <id>` | Result detail with attached evidence |
|
|
246
|
+
| `labtab results create` | Create a result, optionally uploading evidence files |
|
|
247
|
+
| `labtab results links <id>` | List research objects linked to a result |
|
|
248
|
+
| `labtab results link <id>` | Link a result to a paper, poster, talk, or grant |
|
|
249
|
+
| `labtab meetings list` | Meetings in the next `--days` (default 7) |
|
|
250
|
+
| `labtab meetings show <id>` | Meeting detail card |
|
|
251
|
+
| `labtab meetings create` | Create a meeting; `--datetime` takes ISO-8601 or `today 14:30` / `tomorrow 10:00` / `monday 09:00` / `next monday 09:00` |
|
|
252
|
+
| `labtab tasks list` | Tasks, filter by `--status` |
|
|
253
|
+
| `labtab tasks show <id>` | Task detail card |
|
|
254
|
+
| `labtab projects list` | Projects |
|
|
255
|
+
| `labtab projects show <id>` | Project detail card |
|
|
256
|
+
| `labtab people list` | Lab members |
|
|
257
|
+
| `labtab people show <id>` | Person detail card |
|
|
258
|
+
| `labtab export` | Download a full lab export |
|
|
259
|
+
|
|
260
|
+
## Configuration
|
|
261
|
+
|
|
262
|
+
`labtab` reads and writes its config at `~/.config/labtab/config.toml`.
|
|
263
|
+
Override the path with the `LABTAB_CONFIG_FILE` environment variable.
|
|
264
|
+
|
|
265
|
+
```toml
|
|
266
|
+
[api]
|
|
267
|
+
base_url = "https://labtab.app/api/v1"
|
|
268
|
+
|
|
269
|
+
[auth]
|
|
270
|
+
api_key = "lab_api_xxxxxxxx"
|
|
271
|
+
user_email = "pi@example.com"
|
|
272
|
+
default_lab_id = 42
|
|
273
|
+
default_lab_slug = "smith-neuro-lab"
|
|
274
|
+
```
|
|
275
|
+
|
|
276
|
+
The config file is written with `0600` permissions so other users on the
|
|
277
|
+
machine cannot read your API key.
|
|
278
|
+
|
|
279
|
+
If you later move the product domain, you can rewrite just the hostname while
|
|
280
|
+
preserving the rest of the API path:
|
|
281
|
+
|
|
282
|
+
```bash
|
|
283
|
+
labtab auth set-base-url --host labtab.io
|
|
284
|
+
```
|
|
285
|
+
|
|
286
|
+
## Pydantic models
|
|
287
|
+
|
|
288
|
+
The package ships two sets of models:
|
|
289
|
+
|
|
290
|
+
* `labtab.models` (re-exports `labtab.models.api`) - hand-curated, **lenient**
|
|
291
|
+
models the CLI uses internally. They tolerate extra or renamed backend
|
|
292
|
+
fields so a CLI install doesn't break when the server ships new columns.
|
|
293
|
+
* `labtab.models.generated` - a **strict**, auto-generated snapshot of the
|
|
294
|
+
backend's OpenAPI schema. Useful if you want to script against the API
|
|
295
|
+
directly with precise types.
|
|
296
|
+
|
|
297
|
+
### Regenerating the strict snapshot
|
|
298
|
+
|
|
299
|
+
```bash
|
|
300
|
+
# with a running backend at localhost:8000
|
|
301
|
+
datamodel-codegen \
|
|
302
|
+
--url http://localhost:8000/api/v1/schema/ \
|
|
303
|
+
--output src/labtab/models/generated.py \
|
|
304
|
+
--output-model-type pydantic_v2.BaseModel \
|
|
305
|
+
--input-file-type openapi
|
|
306
|
+
|
|
307
|
+
# or from a snapshotted schema
|
|
308
|
+
cd backend && python manage.py spectacular --file /tmp/schema.yml
|
|
309
|
+
datamodel-codegen --input /tmp/schema.yml \
|
|
310
|
+
--output src/labtab/models/generated.py \
|
|
311
|
+
--output-model-type pydantic_v2.BaseModel \
|
|
312
|
+
--input-file-type openapi
|
|
313
|
+
```
|
|
314
|
+
|
|
315
|
+
## License
|
|
316
|
+
|
|
317
|
+
MIT. See `LICENSE`.
|
labtab-0.2.1/README.md
ADDED
|
@@ -0,0 +1,291 @@
|
|
|
1
|
+
# labtab
|
|
2
|
+
|
|
3
|
+
Command-line interface for [LabTab](https://labtab.app) - the lab management
|
|
4
|
+
platform for Principal Investigators. Manage grants, papers, literature,
|
|
5
|
+
posters, talks, results, meetings, tasks, projects, and people from your
|
|
6
|
+
terminal.
|
|
7
|
+
|
|
8
|
+
Built by [Wetware Ltd](https://wetware.co.uk).
|
|
9
|
+
|
|
10
|
+
## Install
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
pip install labtab
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
Requires Python 3.10+.
|
|
17
|
+
|
|
18
|
+
## Shell completion
|
|
19
|
+
|
|
20
|
+
`labtab` ships tab completion for bash, zsh, fish, and PowerShell:
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
# Install completion for your current shell (then restart the shell)
|
|
24
|
+
labtab --install-completion
|
|
25
|
+
|
|
26
|
+
# Or print the completion script to wire up manually
|
|
27
|
+
labtab --show-completion
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## Quickstart
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
# Pair your terminal with your LabTab account (opens a browser window)
|
|
34
|
+
labtab auth login
|
|
35
|
+
|
|
36
|
+
# Pair with a read-only key instead - mutating commands will be rejected
|
|
37
|
+
labtab auth login --read-only
|
|
38
|
+
|
|
39
|
+
# See which labs you belong to
|
|
40
|
+
labtab labs list
|
|
41
|
+
labtab labs members list
|
|
42
|
+
labtab labs members invite new.member@example.com --role PhD
|
|
43
|
+
labtab labs members set-role 42 "PhD"
|
|
44
|
+
labtab labs members archive 42
|
|
45
|
+
labtab labs members transfer-pi 42
|
|
46
|
+
labtab labs settings show
|
|
47
|
+
labtab labs settings update --timezone Europe/London
|
|
48
|
+
|
|
49
|
+
# Review or update your account profile
|
|
50
|
+
labtab account show
|
|
51
|
+
labtab account update --first-name Alex --last-name Harston
|
|
52
|
+
|
|
53
|
+
# Manage API keys for scripts and integrations
|
|
54
|
+
labtab api-keys list
|
|
55
|
+
labtab api-keys create "CI deploy" --scope read:papers --scope write:notes
|
|
56
|
+
labtab api-keys revoke 42
|
|
57
|
+
|
|
58
|
+
# Open a command-line overview of your lab (--limit rows per section)
|
|
59
|
+
labtab home
|
|
60
|
+
labtab home --limit 10
|
|
61
|
+
|
|
62
|
+
# Create a meeting - --datetime takes ISO-8601 or a relative form
|
|
63
|
+
labtab meetings create --title "Standup" --datetime "tomorrow 10:00" --lab smith-neuro-lab
|
|
64
|
+
labtab meetings create --title "1:1" --datetime "next monday 09:00" --lab smith-neuro-lab
|
|
65
|
+
|
|
66
|
+
# Search across your accessible workspace
|
|
67
|
+
labtab search "atlas figures"
|
|
68
|
+
|
|
69
|
+
# Review and clear unread notifications
|
|
70
|
+
labtab notifications list
|
|
71
|
+
labtab notifications mark-all-read
|
|
72
|
+
|
|
73
|
+
# Review PI-only lab activity
|
|
74
|
+
labtab audit-logs list
|
|
75
|
+
labtab audit-logs show 42
|
|
76
|
+
|
|
77
|
+
# Create and revoke external share links
|
|
78
|
+
labtab shares list --type paper --object-id 12
|
|
79
|
+
labtab shares create paper 12 collaborator@example.com --permission comment
|
|
80
|
+
labtab shares revoke 7
|
|
81
|
+
|
|
82
|
+
# Review upcoming lab deadlines
|
|
83
|
+
labtab deadlines list
|
|
84
|
+
|
|
85
|
+
# Track recommendation letters and drafts
|
|
86
|
+
labtab letters list
|
|
87
|
+
labtab letters show 12
|
|
88
|
+
labtab letters drafts 12
|
|
89
|
+
labtab letters save-draft 12 --file draft.html
|
|
90
|
+
labtab letters status 12 Submitted
|
|
91
|
+
|
|
92
|
+
# Browse lab wiki pages
|
|
93
|
+
labtab wiki list
|
|
94
|
+
labtab wiki tree
|
|
95
|
+
|
|
96
|
+
# Browse and export collaborative notes
|
|
97
|
+
labtab notes list meeting 42
|
|
98
|
+
labtab notes create meeting 42 --text "Decision captured"
|
|
99
|
+
labtab notes update 123 --file follow-up-notes.txt
|
|
100
|
+
labtab notes export meeting 42 --format md --output meeting-notes.md
|
|
101
|
+
|
|
102
|
+
# List your grants
|
|
103
|
+
labtab grants list
|
|
104
|
+
|
|
105
|
+
# Inspect a single grant
|
|
106
|
+
labtab grants show gr_abc123
|
|
107
|
+
|
|
108
|
+
# Show the next 7 days of meetings
|
|
109
|
+
labtab meetings list --days 7
|
|
110
|
+
|
|
111
|
+
# Get JSON for scripting
|
|
112
|
+
labtab papers list --json | jq '.[] | .title'
|
|
113
|
+
|
|
114
|
+
# Curate relevant literature and journal-club collections
|
|
115
|
+
labtab literature list --reading-status to_read
|
|
116
|
+
labtab literature create --title "Spatial transcriptomics benchmark" \
|
|
117
|
+
--author "Maya Singh" --journal "Nature Methods" --year 2026 \
|
|
118
|
+
--reading-status to_read
|
|
119
|
+
labtab literature collection-add 3 12
|
|
120
|
+
labtab literature comment 12 --body "Discuss in journal club"
|
|
121
|
+
|
|
122
|
+
# Track a conference poster
|
|
123
|
+
labtab posters create --title "Spatial transcriptomics atlas" \
|
|
124
|
+
--conference ISSCR --presented-date 2026-06-12 --author-id 42 \
|
|
125
|
+
--file poster.pdf
|
|
126
|
+
|
|
127
|
+
# Prepare and archive lab talks
|
|
128
|
+
labtab talks list --upcoming
|
|
129
|
+
labtab talks create --title "Organoid atlas update" --type Seminar \
|
|
130
|
+
--date 2026-07-01 --speaker-id 42 --project-id 3
|
|
131
|
+
labtab talks archive 11
|
|
132
|
+
|
|
133
|
+
# Capture research outputs and link them to papers, posters, talks, or grants
|
|
134
|
+
labtab results create --title "Figure 2 quantification" \
|
|
135
|
+
--description "Validated cell counts" --author 42 --project 3 \
|
|
136
|
+
--file counts.csv --kind data
|
|
137
|
+
labtab results link 8 --target-type paper --target-id 22 --relationship supports
|
|
138
|
+
|
|
139
|
+
# Export your whole lab as a zip
|
|
140
|
+
labtab export --format zip --lab smith-neuro-lab
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
## Commands
|
|
144
|
+
|
|
145
|
+
Commands that fetch structured data support `--json` for machine-readable
|
|
146
|
+
output. Most lab-scoped commands accept `--lab <slug>` to override the default
|
|
147
|
+
lab from your config; PI-only audit logs accept the lab ID used by the API
|
|
148
|
+
permission check.
|
|
149
|
+
|
|
150
|
+
| Command | What it does |
|
|
151
|
+
| ------------------------------ | ----------------------------------------- |
|
|
152
|
+
| `labtab home` | Account and lab command-center overview; `--limit` rows per section (1-50, default 5) |
|
|
153
|
+
| `labtab search <query>` | Search across accessible LabTab records |
|
|
154
|
+
| `labtab audit-logs list` | PI-only lab audit log, filter by action or actor |
|
|
155
|
+
| `labtab audit-logs show <id>` | Show one audit row with metadata |
|
|
156
|
+
| `labtab shares list` | Review active or revoked external share links |
|
|
157
|
+
| `labtab shares create <type> <id> <email>` | Create and email a secure share link |
|
|
158
|
+
| `labtab shares revoke <id>` | Revoke a share link in the active lab |
|
|
159
|
+
| `labtab notifications list` | Review account notifications |
|
|
160
|
+
| `labtab notifications mark-read <id>` | Mark one notification read |
|
|
161
|
+
| `labtab notifications mark-all-read` | Mark all notifications read |
|
|
162
|
+
| `labtab deadlines list` | Review grants, tasks, papers, and other deadlines |
|
|
163
|
+
| `labtab letters list` | Review recommendation letter requests |
|
|
164
|
+
| `labtab letters show <id>` | Show one letter request |
|
|
165
|
+
| `labtab letters drafts <id>` | List saved draft versions |
|
|
166
|
+
| `labtab letters save-draft <id>` | Save a new draft from `--text` or `--file` |
|
|
167
|
+
| `labtab letters status <id> <status>` | Update request status |
|
|
168
|
+
| `labtab wiki list` | Browse lab wiki pages |
|
|
169
|
+
| `labtab wiki show <id>` | Show a wiki page |
|
|
170
|
+
| `labtab wiki tree` | Show the wiki hierarchy |
|
|
171
|
+
| `labtab notes list <type> <id>` | Browse collaborative notes for an entity |
|
|
172
|
+
| `labtab notes show <id>` | Show one saved note snapshot |
|
|
173
|
+
| `labtab notes create <type> <id>` | Create a note from `--text` or `--file` |
|
|
174
|
+
| `labtab notes update <id>` | Replace note content from `--text` or `--file` |
|
|
175
|
+
| `labtab notes export <type> <id>` | Export entity notes as Markdown or text |
|
|
176
|
+
| `labtab auth login` | Pair this terminal with your account; `--read-only` requests a key that cannot modify data |
|
|
177
|
+
| `labtab auth logout` | Forget the local API key |
|
|
178
|
+
| `labtab auth whoami` | Show the signed-in user and default lab |
|
|
179
|
+
| `labtab auth set-base-url` | Update the stored API base URL |
|
|
180
|
+
| `labtab account show` | Show your server-side account profile and lab roles |
|
|
181
|
+
| `labtab account update` | Update editable profile fields |
|
|
182
|
+
| `labtab api-keys list` | List API keys owned by the signed-in user |
|
|
183
|
+
| `labtab api-keys create <name>` | Create an API key and print the one-time secret |
|
|
184
|
+
| `labtab api-keys revoke <id>` | Revoke one of your API keys |
|
|
185
|
+
| `labtab api-keys active-count` | Show active API key usage |
|
|
186
|
+
| `labtab labs list` | Labs you have membership in |
|
|
187
|
+
| `labtab labs members list` | List active lab memberships |
|
|
188
|
+
| `labtab labs members show <user>` | Show one lab membership |
|
|
189
|
+
| `labtab labs members invite <email>` | Invite one member through the admin-gated invite API |
|
|
190
|
+
| `labtab labs members set-role <user> <role>` | Change a member role through the PI-gated API |
|
|
191
|
+
| `labtab labs members archive <user>` | Archive a lab membership |
|
|
192
|
+
| `labtab labs members restore <user>` | Restore an archived lab membership |
|
|
193
|
+
| `labtab labs members transfer-pi <user>` | Transfer the PI role through the dedicated API |
|
|
194
|
+
| `labtab labs settings show` | Show readable lab settings |
|
|
195
|
+
| `labtab labs settings update` | Update admin-only lab settings |
|
|
196
|
+
| `labtab grants list` | Grants, filter by `--status` |
|
|
197
|
+
| `labtab grants show <id>` | Grant detail card |
|
|
198
|
+
| `labtab papers list` | Papers, filter by `--year` |
|
|
199
|
+
| `labtab papers show <id>` | Paper detail with authors, DOI |
|
|
200
|
+
| `labtab literature list` | Relevant literature, filter by search, collection, status, or classification |
|
|
201
|
+
| `labtab literature show <id>` | Literature detail with authors, DOI, relevance, and collections |
|
|
202
|
+
| `labtab literature create` | Create a literature/reference record |
|
|
203
|
+
| `labtab literature collections` | List literature collections |
|
|
204
|
+
| `labtab literature collection-create` | Create a literature collection |
|
|
205
|
+
| `labtab literature collection-add <collection> <literature>` | Add literature to a collection |
|
|
206
|
+
| `labtab literature collection-remove <collection> <literature>` | Remove literature from a collection |
|
|
207
|
+
| `labtab literature comments <id>` | List comments on a literature record |
|
|
208
|
+
| `labtab literature comment <id>` | Add a literature comment |
|
|
209
|
+
| `labtab literature claim <id>` | Claim literature as a lab paper |
|
|
210
|
+
| `labtab literature mark-external <id>` | Mark literature as external work |
|
|
211
|
+
| `labtab posters list` | Posters, searchable by title, venue, or author |
|
|
212
|
+
| `labtab posters show <id>` | Poster detail with related project, papers, grants |
|
|
213
|
+
| `labtab posters create` | Create a poster, optionally uploading a PDF |
|
|
214
|
+
| `labtab talks list` | Talks, filter by status, type, speaker, project, or grant |
|
|
215
|
+
| `labtab talks show <id>` | Talk detail with speakers, projects, papers, and links |
|
|
216
|
+
| `labtab talks create` | Create a talk record |
|
|
217
|
+
| `labtab talks archive <id>` | Archive a talk without deleting notes |
|
|
218
|
+
| `labtab results list` | Research results, filter by search, project, or task |
|
|
219
|
+
| `labtab results show <id>` | Result detail with attached evidence |
|
|
220
|
+
| `labtab results create` | Create a result, optionally uploading evidence files |
|
|
221
|
+
| `labtab results links <id>` | List research objects linked to a result |
|
|
222
|
+
| `labtab results link <id>` | Link a result to a paper, poster, talk, or grant |
|
|
223
|
+
| `labtab meetings list` | Meetings in the next `--days` (default 7) |
|
|
224
|
+
| `labtab meetings show <id>` | Meeting detail card |
|
|
225
|
+
| `labtab meetings create` | Create a meeting; `--datetime` takes ISO-8601 or `today 14:30` / `tomorrow 10:00` / `monday 09:00` / `next monday 09:00` |
|
|
226
|
+
| `labtab tasks list` | Tasks, filter by `--status` |
|
|
227
|
+
| `labtab tasks show <id>` | Task detail card |
|
|
228
|
+
| `labtab projects list` | Projects |
|
|
229
|
+
| `labtab projects show <id>` | Project detail card |
|
|
230
|
+
| `labtab people list` | Lab members |
|
|
231
|
+
| `labtab people show <id>` | Person detail card |
|
|
232
|
+
| `labtab export` | Download a full lab export |
|
|
233
|
+
|
|
234
|
+
## Configuration
|
|
235
|
+
|
|
236
|
+
`labtab` reads and writes its config at `~/.config/labtab/config.toml`.
|
|
237
|
+
Override the path with the `LABTAB_CONFIG_FILE` environment variable.
|
|
238
|
+
|
|
239
|
+
```toml
|
|
240
|
+
[api]
|
|
241
|
+
base_url = "https://labtab.app/api/v1"
|
|
242
|
+
|
|
243
|
+
[auth]
|
|
244
|
+
api_key = "lab_api_xxxxxxxx"
|
|
245
|
+
user_email = "pi@example.com"
|
|
246
|
+
default_lab_id = 42
|
|
247
|
+
default_lab_slug = "smith-neuro-lab"
|
|
248
|
+
```
|
|
249
|
+
|
|
250
|
+
The config file is written with `0600` permissions so other users on the
|
|
251
|
+
machine cannot read your API key.
|
|
252
|
+
|
|
253
|
+
If you later move the product domain, you can rewrite just the hostname while
|
|
254
|
+
preserving the rest of the API path:
|
|
255
|
+
|
|
256
|
+
```bash
|
|
257
|
+
labtab auth set-base-url --host labtab.io
|
|
258
|
+
```
|
|
259
|
+
|
|
260
|
+
## Pydantic models
|
|
261
|
+
|
|
262
|
+
The package ships two sets of models:
|
|
263
|
+
|
|
264
|
+
* `labtab.models` (re-exports `labtab.models.api`) - hand-curated, **lenient**
|
|
265
|
+
models the CLI uses internally. They tolerate extra or renamed backend
|
|
266
|
+
fields so a CLI install doesn't break when the server ships new columns.
|
|
267
|
+
* `labtab.models.generated` - a **strict**, auto-generated snapshot of the
|
|
268
|
+
backend's OpenAPI schema. Useful if you want to script against the API
|
|
269
|
+
directly with precise types.
|
|
270
|
+
|
|
271
|
+
### Regenerating the strict snapshot
|
|
272
|
+
|
|
273
|
+
```bash
|
|
274
|
+
# with a running backend at localhost:8000
|
|
275
|
+
datamodel-codegen \
|
|
276
|
+
--url http://localhost:8000/api/v1/schema/ \
|
|
277
|
+
--output src/labtab/models/generated.py \
|
|
278
|
+
--output-model-type pydantic_v2.BaseModel \
|
|
279
|
+
--input-file-type openapi
|
|
280
|
+
|
|
281
|
+
# or from a snapshotted schema
|
|
282
|
+
cd backend && python manage.py spectacular --file /tmp/schema.yml
|
|
283
|
+
datamodel-codegen --input /tmp/schema.yml \
|
|
284
|
+
--output src/labtab/models/generated.py \
|
|
285
|
+
--output-model-type pydantic_v2.BaseModel \
|
|
286
|
+
--input-file-type openapi
|
|
287
|
+
```
|
|
288
|
+
|
|
289
|
+
## License
|
|
290
|
+
|
|
291
|
+
MIT. See `LICENSE`.
|
|
@@ -47,7 +47,7 @@ You only need the release tooling locally if you want to test the
|
|
|
47
47
|
build before pushing the tag:
|
|
48
48
|
|
|
49
49
|
```bash
|
|
50
|
-
cd
|
|
50
|
+
cd cli
|
|
51
51
|
python -m pip install --upgrade build twine
|
|
52
52
|
python -m build --sdist --wheel
|
|
53
53
|
twine check dist/*
|
|
@@ -56,14 +56,14 @@ twine check dist/*
|
|
|
56
56
|
## Release steps
|
|
57
57
|
|
|
58
58
|
1. **Bump the version** in
|
|
59
|
-
[`
|
|
59
|
+
[`cli/pyproject.toml`](./pyproject.toml) (the
|
|
60
60
|
`[project].version` field). Follow PEP 440:
|
|
61
61
|
- `0.1.0` - stable release.
|
|
62
62
|
- `0.1.0rc1`, `0.1.0a2`, `0.1.0b1` - pre-releases (candidate,
|
|
63
63
|
alpha, beta). These ship to **Test PyPI** only.
|
|
64
64
|
2. **Commit** the version bump:
|
|
65
65
|
```bash
|
|
66
|
-
git add
|
|
66
|
+
git add cli/pyproject.toml
|
|
67
67
|
git commit -m "chore(cli): bump labtab to 0.1.0"
|
|
68
68
|
```
|
|
69
69
|
3. **Tag** the commit with the `labtab/` namespace:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "labtab"
|
|
3
|
-
version = "0.1
|
|
3
|
+
version = "0.2.1"
|
|
4
4
|
description = "Command-line interface for LabTab (Wetware Ltd). Manage your lab from the terminal."
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
requires-python = ">=3.10"
|
|
@@ -26,7 +26,7 @@ dependencies = [
|
|
|
26
26
|
labtab = "labtab.cli:app"
|
|
27
27
|
|
|
28
28
|
[project.optional-dependencies]
|
|
29
|
-
dev = ["pytest>=7.4", "pytest-httpx>=0.30", "
|
|
29
|
+
dev = ["pytest>=7.4", "pytest-httpx>=0.30", "ruff>=0.1"]
|
|
30
30
|
|
|
31
31
|
[build-system]
|
|
32
32
|
requires = ["setuptools>=65", "setuptools-scm>=8"]
|