Skip to main content

lsspy

Real-time visualization dashboard for Lodestar-managed repositories.

PyPI version Python 3.12+ License: MIT

Overview

lsspy provides a web-based dashboard for monitoring and visualizing Lodestar-managed repositories in real-time. It offers live updates on tasks, agents, leases, messages, and events through a modern, interactive UI.

Features

  • ๐Ÿ“Š Real-time Monitoring: Live updates of tasks, agents, leases, and events
  • ๐Ÿ”Œ WebSocket Support: Instant notifications of state changes
  • ๐ŸŒ REST API: Full API access for programmatic integration
  • ๐Ÿ’ป Interactive Dashboard: Modern UI built with React and TypeScript
  • ๐Ÿ“ˆ Statistics & Analytics: Task completion rates, agent activity, and more
  • ๐Ÿ” Dependency Visualization: Interactive graph of task dependencies

Installation

pip install lsspy-cli

Quick Start

Navigate to your Lodestar-managed project and start the dashboard:

cd /path/to/your/project
lsspy start

The dashboard will automatically detect the .lodestar directory and open in your browser at http://localhost:8000.

CLI Reference

start

Start the LSSPY dashboard server.

lsspy start [PATH] [OPTIONS]

Arguments:

  • PATH (optional): Path to the .lodestar directory or parent directory. If not provided, auto-detects .lodestar in the current directory.

Options:

  • -p, --port INTEGER: Port to run the web server on (default: 8000)
  • -h, --host TEXT: Host address to bind to (default: 127.0.0.1)
  • --no-open: Don't automatically open browser
  • --poll-interval INTEGER: File polling interval in seconds (default: 1)
  • --debug: Enable debug logging
  • -v, --version: Show version and exit

Examples:

# Start with auto-detection
lsspy start

# Specify .lodestar directory
lsspy start /path/to/.lodestar

# Specify parent directory (will find .lodestar inside)
lsspy start /path/to/project

# Custom port and host
lsspy start --port 9000 --host 0.0.0.0

# Don't open browser automatically
lsspy start --no-open

# Enable debug logging
lsspy start --debug

Architecture

Overview

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                     Browser / Client                          โ”‚
โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚
โ”‚  โ”‚  React UI      โ”‚  โ”‚  WebSocket     โ”‚  โ”‚  REST API      โ”‚ โ”‚
โ”‚  โ”‚  Components    โ”‚  โ”‚  Client        โ”‚  โ”‚  Client        โ”‚ โ”‚
โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
            โ”‚                  โ”‚                  โ”‚
            โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                              โ”‚
                    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
                    โ”‚   FastAPI Server  โ”‚
                    โ”‚   (lsspy.server)  โ”‚
                    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                              โ”‚
            โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
            โ”‚                 โ”‚                 โ”‚
    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
    โ”‚  RuntimeReader โ”‚ โ”‚  SpecReader โ”‚ โ”‚ ConnectionMgr  โ”‚
    โ”‚   (SQLite)     โ”‚ โ”‚   (YAML)    โ”‚ โ”‚  (WebSocket)   โ”‚
    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
            โ”‚                 โ”‚                 โ”‚
            โ”‚                 โ”‚                 โ”‚
    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
    โ”‚          .lodestar/ Directory                       โ”‚
    โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”        โ”‚
    โ”‚  โ”‚  runtime.sqlite  โ”‚  โ”‚    spec.yaml     โ”‚        โ”‚
    โ”‚  โ”‚  (runtime state) โ”‚  โ”‚  (task specs)    โ”‚        โ”‚
    โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜        โ”‚
    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

Components

Frontend (React + TypeScript + Vite)

  • Modern, responsive UI components
  • Real-time updates via WebSocket
  • Task board, agent panel, event timeline
  • Dependency graph visualization

Backend (FastAPI + Python)

  • RESTful API endpoints for data access
  • WebSocket server for real-time notifications
  • File watching for automatic updates
  • SQLite and YAML readers for Lodestar data

Data Sources

  • runtime.sqlite: Dynamic state (agents, leases, messages, events)
  • spec.yaml: Static task specifications and dependencies

Data Flow

  1. Initial Load: Client requests dashboard data via REST API
  2. WebSocket Connection: Client establishes WebSocket connection
  3. Subscriptions: Client subscribes to specific data scopes (tasks, agents, etc.)
  4. File Watching: Server monitors .lodestar directory for changes
  5. Change Detection: File changes trigger data refresh
  6. Broadcast: Server broadcasts updates to subscribed WebSocket clients
  7. UI Update: Client receives updates and refreshes UI components

Configuration

Environment Variables

  • LSSPY_HOST: Default host address (default: 127.0.0.1)
  • LSSPY_PORT: Default port number (default: 8000)
  • LSSPY_DEBUG: Enable debug mode (true or false)

Specify Lodestar Directory

lsspy start --port 9000 --host 0.0.0.0

Specify Lodestar Directory

lsspy start /path/to/.lodestar --port 8080

Requirements

  • Python 3.12 or higher
  • A Lodestar-managed repository with .lodestar directory

Development

Setup

# Clone the repository
git clone https://github.com/ThomasRohde/lsspy.git
cd lsspy

# Install in editable mode with dev dependencies
pip install -e ".[dev]"

# Run tests
pytest tests/

Frontend Development

The frontend is built with Vite + React + TypeScript:

cd frontend
npm install
npm run dev      # Development server
npm run build    # Production build

API Endpoints

  • GET /api/health - Server health check
  • GET /api/dashboard - Complete dashboard data
  • GET /api/tasks - List all tasks
  • GET /api/agents - List all agents
  • GET /api/leases - List active leases
  • GET /api/messages - List recent messages
  • GET /api/events - List recent events
  • WS /ws - WebSocket connection for real-time updates

WebSocket Subscriptions

Connect to /ws and subscribe to specific data streams:

{
  "type": "subscribe",
  "scopes": ["tasks", "agents", "events"]
}

Available scopes: tasks, agents, leases, messages, events, all

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

MIT License - see LICENSE file for details.

Links

Download files

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

Source Distribution

lsspy_cli-0.3.0.tar.gz (344.7 kB view details)

Uploaded Source

Built Distribution

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

lsspy_cli-0.3.0-py3-none-any.whl (282.5 kB view details)

Uploaded Python 3

File details

Details for the file lsspy_cli-0.3.0.tar.gz.

File metadata

  • Download URL: lsspy_cli-0.3.0.tar.gz
  • Upload date:
  • Size: 344.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for lsspy_cli-0.3.0.tar.gz
Algorithm Hash digest
SHA256 bcfa87110ccdd179eaa4bc2f06f805c88344c2cda68eddff3d008e47bf16d2db
MD5 1651a6da5fbe56bba1057beaa1a5135b
BLAKE2b-256 ff4a19462651a89eb101e3671a1bf2ddd74aea88192034012feb40e60a5c63a1

See more details on using hashes here.

Provenance

The following attestation bundles were made for lsspy_cli-0.3.0.tar.gz:

Publisher: publish.yml on ThomasRohde/lsspy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file lsspy_cli-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: lsspy_cli-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 282.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for lsspy_cli-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 fba5b1ec2d8d400c6a5d30f98cdae1f45239e6de6805209d30be51a7b3e37738
MD5 3242089bca991859cd4c99f6174eeea4
BLAKE2b-256 3deba558481e901b096ed0861b6f04d449ffed2a0dfd33684391143adfdbf7a4

See more details on using hashes here.

Provenance

The following attestation bundles were made for lsspy_cli-0.3.0-py3-none-any.whl:

Publisher: publish.yml on ThomasRohde/lsspy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.3.0 This release

2 files

0.2.0

2 files

0.1.4

2 files

0.1.3

2 files

0.1.2

2 files

0.1.1

2 files

Supported by

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