Commitffee4746Recorded26 Apr 2026Repositorysigil-ansi
Extract sigil-ansi from sigil monorepo as standalone repo
Message
History filtered from monorepo via git filter-repo --path packages/sigil-ansi/ --path-rename packages/sigil-ansi/: (25 commits preserved). Carried-over monorepo tags wiped before tagging the first standalone release.
Scaffolding follows procedures/sigil-package-extraction (pure-Scheme single-package shape, identical to recently-extracted sigil-socket / sigil-git):
- package.sgl: explicit version: "0.13.1"; url: standalone repo URL.
Single from-git dep on sigil-stdlib (via codeberg:sigil/sigil-lang)
is unchanged.
- README.md, .gitignore (build/, .sigil/), manifest.scm (gcc-toolchain
+ make + pkg-config), dev-redirects.sgl (redirect sigil-lang to
../sigil-lang for local dev).
- sigil.lock: auto-generated by sigil deps install against published
codeberg:sigil/sigil-lang v0.13.1 (a436005a).Self-bootstrap green: sigil deps install + sigil test --report show 17/17 pass, 0 failures.
Changed
.gitignore | 2 ++
README.md | 59 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
dev-redirects.sgl | 6 ++++++
manifest.scm | 7 +++++++
package.sgl | 3 ++-
sigil.lock | 9 +++++++++
6 files changed, 85 insertions(+), 1 deletion(-)Diff
.gitignoreadded
@@ -0,0 +1,2 @@
+1
build/+2
.sigil/README.mdadded
@@ -0,0 +1,59 @@
+1
# sigil-ansi+2
+3
ANSI terminal color and formatting library for [Sigil](https://codeberg.org/sigil/sigil).+4
+5
Provides ANSI escape codes for terminal colors and text formatting. All+6
functions are prefixed with `a:` to avoid naming conflicts.+7
+8
## Usage+9
+10
```scheme+11
(import (sigil ansi))+12
+13
(display (a:green "PASS"))+14
(display (a:bold (a:red "FAIL")))+15
(display (a:dim "at test.sgl:42"))+16
```+17
+18
Styles compose by nesting:+19
+20
```scheme+21
(display (a:bold (a:underline (a:cyan "Important"))))+22
```+23
+24
Cursor and screen control:+25
+26
```scheme+27
(display (a:clear-screen))+28
(display (a:cursor-position 10 20))+29
```+30
+31
Disable color globally for non-TTY output:+32
+33
```scheme+34
(with-ansi-disabled+35
(lambda ()+36
(display (a:red "no color here"))))+37
```+38
+39
## API+40
+41
| Surface | Functions |+42
|---------|-----------|+43
| Foreground colors | `a:black` `a:red` `a:green` `a:yellow` `a:blue` `a:magenta` `a:cyan` `a:white` (+ `a:bright-*` variants) |+44
| Background colors | `a:bg-black` `a:bg-red` `a:bg-green` `a:bg-yellow` `a:bg-blue` `a:bg-magenta` `a:bg-cyan` `a:bg-white` |+45
| Styles | `a:bold` `a:dim` `a:italic` `a:underline` `a:blink` `a:inverse` `a:hidden` `a:strikethrough` |+46
| Reset | `a:reset` |+47
| Cursor | `a:clear-screen` `a:clear-line` `a:cursor-up` `a:cursor-down` `a:cursor-forward` `a:cursor-back` `a:cursor-home` `a:cursor-position` `a:hide-cursor` `a:show-cursor` `a:save-cursor` `a:restore-cursor` |+48
| Utilities | `strip-ansi` `ansi-enabled?` `with-ansi-disabled` |+49
+50
## Build & Test+51
+52
```sh+53
sigil deps install+54
sigil test+55
```+56
+57
## License+58
+59
BSD-3-Clause. See `package.sgl` for authors.dev-redirects.sgladded
@@ -0,0 +1,6 @@
+1
;; Development redirects — point dependencies at local Sigil checkouts+2
(redirects+3
repos: (list+4
(for-repo+5
url: "codeberg:sigil/sigil-lang"+6
use: (from-path dir: "../sigil-lang"))))manifest.scmadded
@@ -0,0 +1,7 @@
+1
;; sigil-ansi Development Environment+2
;; Use with: guix shell -m manifest.scm+3
+4
(specifications->manifest+5
'("gcc-toolchain"+6
"make"+7
"pkg-config"))package.sglmodified
@@ -4,9 +4,10 @@
4
5
(package 6
name: "sigil-ansi"+7
version: "0.13.1" 8
sigil: "^0.13" 9
description: "Terminal colors and formatting for Sigil"−9
url: "https://codeberg.org/sigil/sigil"+10
url: "https://codeberg.org/sigil/sigil-ansi" 11
license: "BSD-3-Clause" 12
authors: (list "David Wilson <[email protected]>") 13
sigil.lockadded
@@ -0,0 +1,9 @@
+1
;; Auto-generated by sigil deps install. Do not edit.+2
(lock+3
(package name: "sigil-stdlib"+4
url: "codeberg:sigil/sigil-lang"+5
ref: "^0.13.1"+6
sha: "a436005a34754522d3c38b608aa892b4f8e13dd3"+7
package-selector: "sigil-stdlib"+8
version: "0.13.1")+9
)