Skip to main content

Command-line interface for LabTab (Wetware Ltd). Manage your lab from the terminal.

Project description

labtab

Command-line interface for LabTab — the lab management platform for Principal Investigators. Manage grants, papers, meetings, tasks, projects, and people from your terminal.

Built by Wetware Ltd.

Install

pip install labtab

Requires Python 3.10+.

Quickstart

# Pair your terminal with your LabTab account (opens a browser window)
labtab auth login

# See which labs you belong to
labtab labs list

# List your grants
labtab grants list

# Inspect a single grant
labtab grants show gr_abc123

# Show the next 7 days of meetings
labtab meetings upcoming --days 7

# Get JSON for scripting
labtab papers list --json | jq '.[] | .title'

# Export your whole lab as a zip
labtab export --format zip --lab chen-neuro-lab

Commands

All commands support --json for machine-readable output and --lab <slug> to override the default lab from your config.

Command What it does
labtab auth login Pair this terminal with your account
labtab auth logout Forget the local API key
labtab auth whoami Show the signed-in user and default lab
labtab auth set-base-url Update the stored API base URL
labtab labs list Labs you have membership in
labtab grants list Grants, filter by --status
labtab grants show <id> Grant detail card
labtab papers list Papers, filter by --year
labtab papers show <id> Paper detail with authors, DOI
labtab meetings upcoming Meetings in the next --days (default 7)
labtab meetings show <id> Meeting detail card
labtab tasks list Tasks, filter by --status
labtab tasks show <id> Task detail card
labtab projects list Projects
labtab projects show <id> Project detail card
labtab people list Lab members
labtab people show <id> Person detail card
labtab export Download a full lab export

Configuration

labtab reads and writes its config at ~/.config/labtab/config.toml. Override the path with the LABTAB_CONFIG_FILE environment variable.

[api]
base_url = "https://labtab.app/api/v1"

[auth]
api_key = "lab_api_xxxxxxxx"
user_email = "pi@example.com"
default_lab_id = 42
default_lab_slug = "chen-neuro-lab"

The config file is written with 0600 permissions so other users on the machine cannot read your API key.

If you later move the product domain, you can rewrite just the hostname while preserving the rest of the API path:

labtab auth set-base-url --host labtab.io

Pydantic models

The package ships two sets of models:

  • labtab.models (re-exports labtab.models.api) — hand-curated, lenient models the CLI uses internally. They tolerate extra or renamed backend fields so a CLI install doesn't break when the server ships new columns.
  • labtab.models.generated — a strict, auto-generated snapshot of the backend's OpenAPI schema. Useful if you want to script against the API directly with precise types.

Regenerating the strict snapshot

# with a running backend at localhost:8000
datamodel-codegen \
  --url http://localhost:8000/api/v1/schema/ \
  --output src/labtab/models/generated.py \
  --output-model-type pydantic_v2.BaseModel \
  --input-file-type openapi

# or from a snapshotted schema
cd backend && python manage.py spectacular --file /tmp/schema.yml
datamodel-codegen --input /tmp/schema.yml \
  --output src/labtab/models/generated.py \
  --output-model-type pydantic_v2.BaseModel \
  --input-file-type openapi

License

MIT. See LICENSE.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

labtab-0.1.0.tar.gz (44.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

labtab-0.1.0-py3-none-any.whl (39.7 kB view details)

Uploaded Python 3

File details

Details for the file labtab-0.1.0.tar.gz.

File metadata

  • Download URL: labtab-0.1.0.tar.gz
  • Upload date:
  • Size: 44.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for labtab-0.1.0.tar.gz
Algorithm Hash digest
SHA256 cb93849becda0a17421e01f5e141a905df12042a2c683a421405ce48a8e66326
MD5 5caca1f5a80499072a7a22fb87c6fd6d
BLAKE2b-256 c862b1afbb511cb4c39ff61b4f95180ec0b702a13b3f1aee05101cdced250e6b

See more details on using hashes here.

File details

Details for the file labtab-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: labtab-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 39.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for labtab-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8eab45619d4507941ae44669521e11d6089f195df832849d06995f93fc6f53b3
MD5 0a1ede2d73782ddfa936a507a9acaf69
BLAKE2b-256 da6b5ec32942ad85766f01d5950f45e35e20971787ac956f5202ced9f1ca2e13

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page