Skip to content

Add self-update capability to epsilon #55

Description

@jbouwman

Summary

Epsilon should have the ability to check for updates and automatically update itself, similar to package managers like rustup, npm, or other self-updating tools.

Use Case

Currently, updating epsilon requires manual intervention. Users need to:

  1. Check if new versions are available
  2. Download/build new versions manually
  3. Replace their installation

This creates friction for:

  • Development workflows: Developers want to stay current with latest features/fixes
  • CI/CD pipelines: Automated builds should be able to update epsilon as needed
  • Distribution: Easier to distribute epsilon knowing users can easily update

Proposed Implementation

Add commands to the epsilon CLI:

Check for Updates

epsilon --check-updates
# Output: "New version 1.2.3 available (current: 1.2.1)"
# or: "Epsilon is up to date (1.2.1)"

Auto-Update

epsilon --update
# Downloads, builds, and installs latest version
# Provides progress feedback
# Backs up current version for rollback

Version Management

epsilon --version-info
# Shows current version, install location, update channel, etc.

epsilon --rollback  
# Rollback to previous version if update failed

Technical Considerations

Update Sources

Security

  • Verify signatures/checksums of downloaded updates
  • Use HTTPS for all update communications
  • Validate update packages before installation

Cross-Platform Support

  • Handle different installation locations (~/.local/bin/ vs system paths)
  • Support different architectures (x86_64, ARM64, etc.)
  • Platform-specific update mechanisms (macOS, Linux, Windows)

Backup/Rollback

  • Keep previous version for quick rollback
  • Atomic updates (don't leave broken installations)
  • Configuration preservation across updates

Implementation Phases

Phase 1: Basic Update Check

  • Add version checking against GitHub API
  • Simple --check-updates command
  • JSON output option for scripting

Phase 2: Auto-Update

  • Download and install updates
  • Basic backup/rollback capability
  • Progress indication

Phase 3: Advanced Features

  • Multiple update channels
  • Signature verification
  • Enterprise update server support
  • Selective component updates

Example Workflow

# Check for updates (exit code 0 = up to date, 1 = update available)
epsilon --check-updates

# Update if available
epsilon --update

# Verify update worked
epsilon --version

# Rollback if needed
epsilon --rollback

Integration Examples

CI/CD Usage

# GitHub Actions
- name: Update epsilon
  run: |
    epsilon --check-updates && epsilon --update || true
    epsilon --version

Development Workflow

# Daily development routine
epsilon --update  # Stay current
epsilon --load my-project.lisp

Benefits

  1. User Experience: Frictionless updates encourage staying current
  2. Security: Users get security fixes faster
  3. Support: Easier to support when users are on recent versions
  4. Distribution: Self-updating software is easier to distribute
  5. CI/CD: Enables automated environment management

Related Tools

Similar functionality in other tools:

  • rustup update (Rust toolchain)
  • npm update -g npm (Node.js package manager)
  • brew upgrade (Homebrew)
  • apt update && apt upgrade (APT)

Configuration

Allow users to configure update behavior:

epsilon --config update.auto-check=true
epsilon --config update.channel=stable
epsilon --config update.frequency=weekly

This feature would significantly improve the epsilon user experience and adoption by removing friction from keeping installations current.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions