Commit6dc4f863Recorded2 Mar 2026Repositorysigil-git

Add app management commands (sigil app install/list/remove/update/rollback)

Message

Implements the sigil app subsystem for installing Sigil applications from git repositories, storing them in the content-addressable store, and optionally registering them as MCP servers for Claude Code.

New module (sigil cli app) provides: - install: clone repo, build bundle, store, symlink, register MCP - list: show installed apps with version/MCP/source info - remove: unroot, delete symlink, deregister MCP, GC - update: fetch, rebuild, repoint root with rollback history - rollback: restore previous store path from manifest history

Also adds git-list-tags and git-latest-tag to (sigil git) for automatic latest-tag resolution during install.

Changed
 src/sigil/git.sgl | 31 +++++++++++++++++++++++++++++++
 1 file changed, 31 insertions(+)
Diff
src/sigil/git.sglmodified
@@ -29,6 +29,10 @@
29
git-worktree-remove ; Remove a worktree
30
git-worktree-list ; List worktrees for a repo
31
+32
;; Tag operations
+33
git-list-tags ; List tags sorted by version, newest first
+34
git-latest-tag ; Get the latest tag, or #f
+35
36
;; Utilities
37
git-rev-parse ; Get commit hash for ref
38
git-available? ; Check if git is installed
@@ -209,6 +213,33 @@
213
#f))
214
lines)))
215
+216
;; ============================================================
+217
;; TAG OPERATIONS
+218
;; ============================================================
+219
+220
;;; List all tags in a bare repository, sorted by version.
+221
;;;
+222
;;; Returns a list of tag name strings, newest first.
+223
;;; Uses version-sort so that v1.10.0 comes after v1.9.0.
+224
(define (git-list-tags repo-dir)
+225
(: string? -> list?)
+226
(let ((old-dir (current-directory)))
+227
(set-current-directory! repo-dir)
+228
(let ((output (process-output->string "git" "tag" "--list" "--sort=-version:refname")))
+229
(set-current-directory! old-dir)
+230
(if output
+231
(filter (lambda (s) (not (string=? s "")))
+232
(string-split (string-trim output) "\n"))
+233
'()))))
+234
+235
;;; Get the latest tag in a bare repository.
+236
;;;
+237
;;; Returns the tag name string, or `#f` if no tags exist.
+238
(define (git-latest-tag repo-dir)
+239
(: string? -> (maybe string?))
+240
(let ((tags (git-list-tags repo-dir)))
+241
(if (null? tags) #f (car tags))))
+242
243
;; ============================================================
244
;; UTILITIES
245
;; ============================================================