Skip to content

Add self command with install and upgrade subcommands #83

Open

Description

@David-Noble-at-work

Summary

All three CLI tools — lore, writ, and star — share the same self command with two subcommands:

  • self install: Generate completions, man pages, config. No network required. Has --prefix argument.
  • self upgrade: Check for and install latest LKG release. No arguments - upgrade is in-place.

Plan Document

See docs/plans/self-command.md for full specification.

Commands

lore self install                  # Generate man pages, completions, config (default: ~/.local)
lore self install --prefix /usr/local
lore self upgrade                  # Check for and download latest LKG (in-place)

writ self install
writ self upgrade

star self install
star self upgrade

Key Differences

Command --prefix Network Purpose
self install Yes (default: ~/.local) No Generate local files
self upgrade No (in-place) Yes Download newer binary

Auto-Upgrade Configuration

When deployed as part of an automation config (e.g., star-managed repos), self-upgrade should support unattended operation via config settings:

Setting Values Default Description
auto-upgrade.enable true / false false Enable automatic upgrade checks
auto-upgrade.prompt true / false true Prompt before upgrading (when enable=true)
auto-upgrade.channel stable / preview stable Release channel to track

Silent upgrade mode: When auto-upgrade.enable=true and auto-upgrade.prompt=false, check for updates after any command and upgrade without prompting. This supports CI/CD and managed workstation scenarios.

Config commands:

lore config set auto-upgrade.enable true
lore config set auto-upgrade.prompt false
lore config set auto-upgrade.channel stable

Prior art: Azure CLI uses the same pattern — az config set auto-upgrade.enable=yes.

Consolidated from noblefactor PROC-004 (Self-Upgrade with Automation Config).

Prior Art

Tool update upgrade
apt Refresh package index Install newer versions
brew Fetch newest formulae Install newer versions
port selfupdate = refresh + upgrade -

Our self upgrade = install newer version (like apt upgrade, brew upgrade).

Reference

Activity

  1. changed the title [-]Add self command with install and update subcommands[/-] [+]Add self command with install and upgrade subcommands[/+] on Feb 6, 2026
  2. David-Noble-at-work commented on Mar 11, 2026

    @David-Noble-at-work
    ContributorAuthor

    Status Update (2026-03-10)

    self-install is implemented

    lore self-install and writ self-install exist at internal/cli/selfinstall.go. Both root commands register it via cli.NewSelfInstallCmd() (lore: internal/lore/root.go:113-117, writ: internal/writ/root.go:103-107). Supports --prefix flag.

    Note: command name is self-install (hyphenated), not self install (subcommand).

    self upgrade is not implemented

    No self upgrade or self-upgrade command exists. Checking for and downloading the latest LKG release is not implemented.

    Auto-upgrade configuration

    Not implemented. No auto-upgrade.enable, auto-upgrade.prompt, or auto-upgrade.channel config settings exist.

    Updated acceptance criteria

    • self-install generates completions, man pages, config with --prefix
    • self upgrade checks for and downloads latest LKG release
    • Auto-upgrade configuration settings
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Epic:ReleaseDistributionRelease, distribution, and self-installfeatureDeliverable unit within an epic

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions