Skip to content

Feature Request: Add One-Click Deployment Scripts (Shell/PowerShell) #49

@xinyang20

Description

@xinyang20

Summary

Add one-click deployment scripts to streamline LifeTrace installation and startup. Currently, users must manually install Python 3.13+, uv, Node.js 20+, and pnpm separately, then run multiple commands to start the application.

Background

Initially considered Docker deployment, but after analysis, Docker is not suitable for LifeTrace because:

  1. Screen recording requires desktop access - LifeTrace's core feature (automatic screenshot) uses mss library which requires $DISPLAY environment variable
  2. Window information requires system APIs - Getting app name and window title requires pywin32 (Windows) or pyobjc (macOS), unavailable in containers
  3. Docker adds complexity without benefit - For a desktop recording application, containerization loses core functionality

Shell scripts provide the same "one-click" experience while preserving full functionality.

Proposed Deliverables

1. Installation Scripts

File Platform Function
scripts/install.sh Linux/macOS One-click dependency installation
scripts/install.ps1 Windows PowerShell installation script

2. Startup Scripts

File Platform Function
scripts/start.sh Linux/macOS Start backend + frontend
scripts/start.ps1 Windows PowerShell startup script

3. Configuration Helper

File Function
scripts/setup-config.sh Interactive LLM API configuration

Script Features

Installation Script (install.sh / install.ps1)

  • Check system requirements (Python 3.13+, Node.js 20+)
  • Auto-install uv package manager if missing
  • Auto-install pnpm if missing
  • Install backend dependencies (uv sync)
  • Install frontend dependencies (pnpm install)
  • Initialize configuration file from template
  • Prompt user to configure LLM API Key

Startup Script (start.sh / start.ps1)

  • Start backend server (python -m lifetrace.server)
  • Start frontend dev server (pnpm dev)
  • Open browser automatically
  • Graceful shutdown on Ctrl+C

User Experience

# Option 1: Quick install (Linux/macOS)
curl -fsSL https://raw.githubusercontent.com/FreeU-group/LifeTrace/main/scripts/install.sh | bash

# Option 2: Clone and install
git clone https://github.com/FreeU-group/LifeTrace.git
cd LifeTrace
./scripts/install.sh   # or .\scripts\install.ps1 on Windows
./scripts/start.sh     # or .\scripts\start.ps1 on Windows

Access

Frontend: http://localhost:3000

Backend API: http://localhost:8000

Benefits

Use Case Benefit
New Users Single command to get started
Full Functionality Screen recording works perfectly
Cross-Platform Windows, macOS, Linux support
No Extra Dependencies No Docker/container runtime needed
Development Friendly Easy to modify and debug

Implementation Notes

  • Scripts should be idempotent (safe to run multiple times)
  • Clear error messages for missing dependencies
  • Support both interactive and non-interactive modes
  • Respect existing configuration files

Volunteer

I'm willing to implement this feature. Please let me know:

  1. Is this approach aligned with the project roadmap?
  2. Any specific requirements or constraints?
  3. Preferred script style/conventions?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions