Skip to main content

Research workflow memory system - track experiments, todos, and context

Project description

lablog 🐶

Your loyal lab companion - automatically tracking your research workflow so you never lose context.

Research workflow memory system - never lose context when switching between projects.

What is lablog?

lablog helps researchers track experiments, code changes, and todos across multiple projects. When you return to a project after weeks or months, lablog recap instantly reconstructs what you were working on and what's next.

Powered by Claude Code: lablog integrates with Claude Code to provide AI-powered script analysis, change summaries, and intelligent insights - all using your existing Claude Code subscription (no extra API costs!).

Features

  • 📝 Experiment logging: Track what you're running and why
  • 🎯 Smart todos: Context-aware task tracking with priority support
  • 🤖 AI-powered analysis: Automatic Claude enhancement of notes, todos, and recaps
  • 🔄 Seamless integration: Automatically tracks SLURM jobs (sbatch) and git commits
  • 📊 Intelligent recaps: AI-enhanced summaries of your recent work
  • 🌐 Cross-project: Works across multiple repos
  • 💾 Private storage: Logs stored in ~/.config/lablog/, not in git

Installation

pip install lablog

Or install from source:

git clone https://github.com/Linskii/lablog.git
cd lablog
pip install -e .

Quick Start

Initial Setup

lablog init

This interactive setup will:

  • Detect if Claude Code is available and configure AI features
  • Set up shell hooks for automatic logging of sbatch and git commits
  • Configure your preferences

Seamless Workflow

Once set up with hooks, lablog tracks everything automatically:

# Jobs are logged automatically
sbatch jobs/train.sh

# Git commits are logged automatically with AI analysis
git commit -m "Fix memory leak in data loader"

# Check what you've been working on
lablog recap

Manual Logging

You can also log things explicitly:

# Add a quick note
lablog note "Baseline achieved 0.85 AUROC"

# Add a todo (optionally with priority)
lablog todo "Check preprocessing against paper"
lablog todo "Fix critical bug in training loop" --priority high

# Interactive todo management
lablog todo -l

Bypass AI Enhancement

Use the -r flag to skip AI enhancement when you want raw, unprocessed entries:

lablog note "Quick observation" -r
lablog todo "Fast task" -r

Usage

Recap

View your recent activity with AI-enhanced insights:

lablog recap              # Last 7 days
lablog recap --days 30    # Last 30 days
lablog recap --todos-only # Just show active todos

If Claude Code is enabled, recaps automatically include:

  • AI summary of what you were working on
  • Analysis of code changes and experiments
  • Job status with output file checking
  • Outstanding todos

Todo Management

# Add todos
lablog todo "Implement attention mechanism"
lablog todo "Fix memory leak" --priority high

# Interactive management (arrow keys + space to toggle)
lablog todo -l

Archive Management

Keep your logs clean by archiving old entries:

# Merge old entries into a summary
lablog merge --from-date 2025-10-01 --to-date 2025-10-31

# Archive entries by date or type
lablog clear
lablog clear --completed-todos-only

# Permanently delete old archives
lablog delete-archive --before-date 2025-09-01

Multi-Project Support

# List all tracked projects
lablog projects

# View activity across all projects
lablog recap --all-projects

Storage

Logs are stored in ~/.config/lablog/ by default, keeping them private and accessible across projects.

Storage Structure

~/.config/lablog/
├── config.json          # User preferences
└── projects/
    └── <project-hash>/
        ├── metadata.json # Project info
        ├── log.jsonl     # Notes and todos
        ├── jobs.jsonl    # SLURM job entries
        └── archive.jsonl # Archived entries

Claude Code Integration

lablog uses Claude Code for AI-powered features:

  • ✅ Uses your existing Claude Code subscription
  • ✅ No additional API costs
  • ✅ Works from the command line
  • ✅ Fully automated

AI Features

When Claude Code is enabled (via lablog init):

  • Auto-enhancement: Notes and todos are automatically clarified and formatted
  • Script analysis: Job submissions are analyzed for key parameters and configuration
  • Diff analysis: Git commits are automatically summarized
  • Smart recaps: Get AI-generated summaries of your recent work
  • Job output analysis: Automatically check if jobs succeeded or failed

If Claude Code is not installed, lablog works perfectly - you just won't have AI features.

License

MIT

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

lablog-0.1.3.tar.gz (27.4 kB view details)

Uploaded Source

Built Distribution

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

lablog-0.1.3-py3-none-any.whl (28.9 kB view details)

Uploaded Python 3

File details

Details for the file lablog-0.1.3.tar.gz.

File metadata

  • Download URL: lablog-0.1.3.tar.gz
  • Upload date:
  • Size: 27.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.10.12

File hashes

Hashes for lablog-0.1.3.tar.gz
Algorithm Hash digest
SHA256 9c1e96ac400a888d78846e0bb7fe5c2ec01acc8fab198eed3bff7860f102fee5
MD5 9cdcc18480efe819a717d6fed632c03c
BLAKE2b-256 e82f0ad01e44628ca28d11785e9acbc1163c8f6466dae845814d439fbdfec65b

See more details on using hashes here.

File details

Details for the file lablog-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: lablog-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 28.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.10.12

File hashes

Hashes for lablog-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 4a62d839798169c3e92f97409f0d72b3cd2935cc33222d7fe2057eed9fccbbfa
MD5 5f9d5f80f999436b1a065f78d30daf18
BLAKE2b-256 462c59cb7b4210beaddf833e72f5798210881943b469a6e4f411967e8e3d6b40

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