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.0.tar.gz (27.1 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.0-py3-none-any.whl (28.6 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for lablog-0.1.0.tar.gz
Algorithm Hash digest
SHA256 88ef5d735d421f6992ef189e10ad8709639aeb1b31fbc85e85b1d1077ffab3b9
MD5 a686bf3bbb2360f395de9e169fa0d955
BLAKE2b-256 f3eac40855a829bda5ae4968f705edc632eed94b907943e9f21e61939920e853

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for lablog-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9f5a4efdafe49c20c2b8ae19a1a82a5c4cfc523926aa25bc2cfab89f48375a12
MD5 42e3af34584fa75acf4c782c76e301e8
BLAKE2b-256 4469201a90ee85fe19626f285fbf1acbd2e865a5354ff5c226a2bd9c4dad0f6a

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