File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : ci
2+
3+ on :
4+ push :
5+ branches : [main]
6+ pull_request :
7+
8+ jobs :
9+ test :
10+ runs-on : ubuntu-latest
11+ steps :
12+ - uses : actions/checkout@v4
13+ - uses : actions/setup-go@v5
14+ with :
15+ go-version : ' 1.24'
16+ - run : go build ./...
17+ - run : go test ./...
Original file line number Diff line number Diff line change 1+ name : release
2+
3+ on :
4+ push :
5+ tags :
6+ - ' v*'
7+
8+ permissions :
9+ contents : write
10+
11+ jobs :
12+ goreleaser :
13+ runs-on : ubuntu-latest
14+ steps :
15+ - uses : actions/checkout@v4
16+ with :
17+ fetch-depth : 0
18+
19+ - uses : actions/setup-go@v5
20+ with :
21+ go-version : ' 1.24'
22+
23+ - uses : goreleaser/goreleaser-action@v6
24+ with :
25+ distribution : goreleaser
26+ version : ' ~> v2'
27+ args : release --clean
28+ env :
29+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
30+ HOMEBREW_TAP_GITHUB_TOKEN : ${{ secrets.HOMEBREW_TAP_GITHUB_TOKEN }}
Original file line number Diff line number Diff line change 11/bin /
2+ /dist /
23* .out
34.DS_Store
Original file line number Diff line number Diff line change 1+ version : 2
2+
3+ project_name : noni
4+
5+ before :
6+ hooks :
7+ - go mod tidy
8+
9+ builds :
10+ - id : noni
11+ main : ./cmd/noni
12+ binary : noni
13+ env :
14+ - CGO_ENABLED=0
15+ goos :
16+ - linux
17+ - darwin
18+ goarch :
19+ - amd64
20+ - arm64
21+ ldflags :
22+ - -s -w -X main.Version={{.Version}}
23+
24+ - id : nonid
25+ main : ./cmd/nonid
26+ binary : nonid
27+ env :
28+ - CGO_ENABLED=0
29+ goos :
30+ - linux
31+ - darwin
32+ goarch :
33+ - amd64
34+ - arm64
35+ ldflags :
36+ - -s -w -X main.Version={{.Version}}
37+
38+ archives :
39+ - id : default
40+ ids : [noni, nonid]
41+ name_template : >-
42+ {{ .ProjectName }}_{{ .Version }}_
43+ {{- title .Os }}_
44+ {{- if eq .Arch "amd64" }}x86_64
45+ {{- else if eq .Arch "386" }}i386
46+ {{- else }}{{ .Arch }}{{ end }}
47+ files :
48+ - README.md
49+ - DESIGN.md
50+ - LICENSE*
51+
52+ checksum :
53+ name_template : ' checksums.txt'
54+
55+ snapshot :
56+ version_template : " {{ incpatch .Version }}-next"
57+
58+ changelog :
59+ sort : asc
60+ filters :
61+ exclude :
62+ - ' ^docs:'
63+ - ' ^test:'
64+ - ' ^chore:'
65+ - ' Merge pull request'
66+
67+ brews :
68+ - name : noni
69+ repository :
70+ owner : williamwa
71+ name : homebrew-tap
72+ token : " {{ .Env.HOMEBREW_TAP_GITHUB_TOKEN }}"
73+ homepage : https://github.com/williamwa/noni
74+ description : " Drive interactive CLIs from anywhere — turn gh auth login, ssh-copy-id, npm publish into a sequence of stateless calls"
75+ install : |
76+ bin.install "noni"
77+ bin.install "nonid"
78+ test : |
79+ system "#{bin}/noni", "version"
80+
81+ release :
82+ github :
83+ owner : williamwa
84+ name : noni
85+ draft : false
86+ prerelease : auto
Original file line number Diff line number Diff line change @@ -43,17 +43,34 @@ Linux only for now. macOS works in theory (termios constants are wired) but unte
4343- ** ` nonid ` ** — long-lived daemon that owns PTY-backed sessions. Auto-spawned by the CLI on first call.
4444- ** socket** — ` $XDG_RUNTIME_DIR/noni/sock ` (falls back to ` ~/.noni/sock ` ), mode 0600.
4545
46- ## Build & install
46+ ## Install
4747
48+ ** Homebrew (macOS / Linux):**
49+ ``` bash
50+ brew install williamwa/tap/noni
51+ ```
52+
53+ ** Pre-built binary (Linux / macOS, amd64 / arm64):**
54+ ``` bash
55+ # pick the asset for your OS/arch from the releases page
56+ curl -fsSL https://github.com/williamwa/noni/releases/latest/download/noni_$( uname -s) _$( uname -m) .tar.gz \
57+ | tar -xz -C /usr/local/bin noni nonid
58+ ```
59+
60+ ** ` go install ` (needs Go 1.22+):**
61+ ``` bash
62+ go install github.com/williamwa/noni/cmd/noni@latest
63+ go install github.com/williamwa/noni/cmd/nonid@latest
64+ ```
65+
66+ ** From source:**
4867``` bash
4968git clone https://github.com/williamwa/noni
5069cd noni
5170make build # produces ./bin/noni and ./bin/nonid
5271make install # copies both to ~/.local/bin/
5372```
5473
55- Requires Go 1.22+.
56-
5774## Quick start
5875
5976``` bash
Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ import (
1616 "github.com/williamwa/noni/internal/proto"
1717)
1818
19- const Version = "0.1.0-dev"
19+ var Version = "0.1.0-dev"
2020
2121func main () {
2222 root := & cobra.Command {
Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ import (
1616 "github.com/williamwa/noni/internal/session"
1717)
1818
19- const Version = "0.1.0-dev"
19+ var Version = "0.1.0-dev"
2020
2121func main () {
2222 socketPath := SocketPath ()
Original file line number Diff line number Diff line change @@ -3,10 +3,13 @@ module github.com/williamwa/noni
33go 1.24.2
44
55require (
6- github.com/creack/pty v1.1.24 // indirect
7- github.com/hinshun/vt10x v0.0.0-20220301184237-5011da428d02 // indirect
6+ github.com/creack/pty v1.1.24
7+ github.com/hinshun/vt10x v0.0.0-20220301184237-5011da428d02
8+ github.com/oklog/ulid/v2 v2.1.1
9+ github.com/spf13/cobra v1.10.2
10+ )
11+
12+ require (
813 github.com/inconshreveable/mousetrap v1.1.0 // indirect
9- github.com/oklog/ulid/v2 v2.1.1 // indirect
10- github.com/spf13/cobra v1.10.2 // indirect
1114 github.com/spf13/pflag v1.0.9 // indirect
1215)
You can’t perform that action at this time.
0 commit comments