Skip to content

Add self command with install and upgrade subcommands #83

Open
8 of 13 issues completed
Open

Description

@David-Noble-at-work

Amended 2026-10-20 (owed by #947's plan, docs/plans/fix/947-self-upgrade-fetches-nothing-it.md, merged as #1001, 01634491). self upgrade installs the newest build on its channel, not "the latest LKG", and auto-upgrade.channel (stable / preview) gives way to the two channels:

  • Two channels, develop and release (ruled 2026-09-30: "in my mind we have two and main is not one. The two are develop and release."). GitHub's prerelease flag marks a pre-release; release follows /releases/latest, and --prerelease adds the release channel's pre-releases.
  • A build keeps its own channel, stamped into the binary (ruled 2026-09-30), and switching is one command: self upgrade --channel release, self upgrade --channel release --prerelease, self upgrade --channel develop; standing settings self.channel and self.prerelease.
  • All programs together: self upgrade, run from any of the three, upgrades every devlore program in the prefix to one version.

Where the text below says otherwise, this amendment stands.

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

Sub-issues

Sub-issues

8 of 13 Issues completed
Loading 13 sub-issues

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
  3. David-Noble-at-work commented on Nov 9, 2026

    @David-Noble-at-work
    ContributorAuthor

    star github triage sweep added this issue to Triage: devlore, for the rule it breaks:

    • no-evidence: no Evidence of completion section
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

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions