Skip to content

Commit aef1e01

Browse files
committed
Ship release install integration guides
1 parent 94db91f commit aef1e01

18 files changed

Lines changed: 850 additions & 585 deletions

File tree

.github/workflows/release.yml

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*"
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
stint-cli:
13+
name: Build Stint CLI release assets
14+
runs-on: ubuntu-latest
15+
strategy:
16+
fail-fast: false
17+
matrix:
18+
include:
19+
- goos: darwin
20+
goarch: amd64
21+
- goos: darwin
22+
goarch: arm64
23+
- goos: linux
24+
goarch: amd64
25+
- goos: linux
26+
goarch: arm64
27+
steps:
28+
- uses: actions/checkout@v4
29+
- uses: actions/setup-go@v5
30+
with:
31+
go-version-file: go.mod
32+
cache: true
33+
- name: Build binary
34+
env:
35+
GOOS: ${{ matrix.goos }}
36+
GOARCH: ${{ matrix.goarch }}
37+
CGO_ENABLED: "0"
38+
VERSION: ${{ github.ref_name }}
39+
COMMIT: ${{ github.sha }}
40+
run: |
41+
mkdir -p dist
42+
go build \
43+
-trimpath \
44+
-ldflags "-s -w -X github.com/keithah/stint/internal/stintcli.versionValue=${VERSION} -X github.com/keithah/stint/internal/stintcli.commitValue=${COMMIT} -X github.com/keithah/stint/internal/stintcli.buildDateValue=$(date -u +%Y-%m-%dT%H:%M:%SZ)" \
45+
-o dist/stint \
46+
./cmd/stint
47+
- name: Package binary
48+
env:
49+
VERSION: ${{ github.ref_name }}
50+
GOOS: ${{ matrix.goos }}
51+
GOARCH: ${{ matrix.goarch }}
52+
run: |
53+
tar -C dist -czf "stint_${VERSION}_${GOOS}_${GOARCH}.tar.gz" stint
54+
- uses: actions/upload-artifact@v4
55+
with:
56+
name: stint-${{ matrix.goos }}-${{ matrix.goarch }}
57+
path: stint_${{ github.ref_name }}_${{ matrix.goos }}_${{ matrix.goarch }}.tar.gz
58+
59+
publish:
60+
name: Publish GitHub release
61+
needs: stint-cli
62+
runs-on: ubuntu-latest
63+
steps:
64+
- uses: actions/download-artifact@v4
65+
with:
66+
pattern: stint-*
67+
merge-multiple: true
68+
- uses: softprops/action-gh-release@v2
69+
with:
70+
files: stint_*.tar.gz
71+
generate_release_notes: true

README.md

Lines changed: 25 additions & 100 deletions
Original file line numberDiff line numberDiff line change
@@ -46,110 +46,35 @@ scripts/generate-sqlc.sh
4646

4747
## Editor Config
4848

49-
Build the native CLI:
49+
Install the native CLI from the latest release:
5050

5151
```bash
52-
make stint
53-
bin/stint config init --api-url http://localhost:8080/api/v1 --api-key waka_00000000-0000-4000-8000-000000000000
54-
bin/stint api-keys
55-
bin/stint api-keys create "Editor key" --scope write_heartbeats --scope read_stats
56-
bin/stint api-keys delete API_KEY_ID
57-
bin/stint oauth-apps
58-
bin/stint oauth-apps create "Local OAuth app" --redirect-uri http://localhost:3000/callback --scope read_stats
59-
bin/stint oauth-apps delete OAUTH_APP_ID
60-
bin/stint oauth token --client-id OAUTH_CLIENT_ID --client-secret OAUTH_CLIENT_SECRET --code AUTH_CODE --redirect-uri http://localhost:3000/callback
61-
bin/stint oauth token --client-id OAUTH_CLIENT_ID --client-secret OAUTH_CLIENT_SECRET --refresh-token REFRESH_TOKEN
62-
bin/stint oauth revoke ACCESS_OR_REFRESH_TOKEN --client-id OAUTH_CLIENT_ID --client-secret OAUTH_CLIENT_SECRET
63-
bin/stint account
64-
bin/stint account update account.json
65-
bin/stint account delete --confirm
66-
bin/stint meta
67-
bin/stint api-docs
68-
bin/stint leaders
69-
bin/stint leaders --language Go --country US
70-
bin/stint editors
71-
bin/stint program-languages
72-
bin/stint users public-username
73-
bin/stint users public-username stats last_7_days
74-
bin/stint users public-username stats --range last_30_days
75-
bin/stint users public-username summaries
76-
bin/stint users public-username summaries --start 2026-06-01 --end 2026-06-30
77-
bin/stint share SHARE_TOKEN stats
78-
bin/stint share SHARE_TOKEN stats --range last_7_days
79-
bin/stint share SHARE_TOKEN summaries
80-
bin/stint share SHARE_TOKEN summaries --start 2026-06-01 --end 2026-06-30
81-
bin/stint health
82-
bin/stint health ingestion
83-
bin/stint dev seed-key --github-id 4001 --username local-dev
84-
bin/stint dev heartbeats-purge --retention-days 0
85-
bin/stint dev leaderboard-update --range last_7_days
86-
bin/stint dev goals-evaluate
87-
bin/stint heartbeat --entity "$PWD/main.go" --write --project stint
88-
bin/stint heartbeat --entity "$PWD/main.go" --category "ai coding" --ai-model gpt-5-codex --ai-provider openai --ai-agent codex --metadata '{"source":"manual"}'
89-
bin/stint heartbeats "$(date +%F)"
90-
bin/stint durations "$(date +%F)" --slice-by language
91-
bin/stint summaries "$(date -u -v-6d +%F 2>/dev/null || date -u -d '6 days ago' +%F)" "$(date +%F)"
92-
bin/stint projects stint
93-
bin/stint projects stint commits --branch main
94-
bin/stint projects stint commits COMMIT_HASH
95-
bin/stint all-time
96-
bin/stint machine-names
97-
bin/stint user-agents
98-
bin/stint goals
99-
bin/stint goals create goal.json
100-
bin/stint goals update GOAL_ID goal.json
101-
bin/stint goals delete GOAL_ID
102-
bin/stint insights languages last_7_days
103-
bin/stint external-durations
104-
bin/stint external-durations create external-duration.json
105-
bin/stint external-durations bulk external-durations.json
106-
bin/stint external-durations delete 00000000-0000-4000-8000-000000000000
107-
bin/stint external-durations delete --ids id-1,id-2
108-
bin/stint custom-pricing
109-
bin/stint custom-pricing upsert custom-pricing.json
110-
bin/stint custom-pricing delete gpt-5-codex
111-
bin/stint pricing-sources
112-
bin/stint pricing-models
113-
bin/stint billing-prefs
114-
bin/stint billing-prefs upsert billing-pref.json
115-
bin/stint billing-prefs delete codex
116-
bin/stint ai-costs
117-
bin/stint ai-costs replace ai-costs.json
118-
bin/stint leaderboards
119-
bin/stint leaderboards create leaderboard.json
120-
bin/stint leaderboards update BOARD_ID leaderboard.json
121-
bin/stint leaderboards add-member BOARD_ID github-username
122-
bin/stint leaderboards remove-member BOARD_ID USER_ID
123-
bin/stint leaderboards delete BOARD_ID
124-
bin/stint share-tokens
125-
bin/stint share-tokens create "Public read"
126-
bin/stint share-tokens delete SHARE_TOKEN_ID
127-
bin/stint events
128-
bin/stint usage-events --start "$(date +%F)" --end "$(date +%F)"
129-
bin/stint usage-events summary --range last_30_days --cost-mode calculate
130-
bin/stint usage-events blocks --range last_7_days
131-
bin/stint data-dumps create heartbeats
132-
bin/stint data-dumps create daily
133-
bin/stint data-dumps
134-
bin/stint data-dumps download DUMP_ID
135-
bin/stint custom-rules
136-
bin/stint custom-rules replace custom-rules.json
137-
bin/stint custom-rules delete RULE_ID
138-
bin/stint custom-rules progress
139-
bin/stint custom-rules abort
140-
bin/stint import wakatime ~/Downloads/wakatime-dump.json
141-
gzip -dc ~/Downloads/wakatime-dump.json.gz | bin/stint import wakatime --stdin
142-
bin/stint doctor
143-
bin/stint collect
144-
bin/stint offline count
145-
bin/stint offline print
146-
bin/stint offline sync
147-
bin/stint --sync-ai-activity
52+
curl -fsSL https://stint.fyi/install.sh | sh
53+
stint config init --api-url http://localhost:8080/api/v1 --api-key waka_00000000-0000-4000-8000-000000000000
54+
stint doctor
55+
stint heartbeat --entity "$PWD/main.go" --write --project stint
14856
```
14957

150-
Package builds can stamp version metadata with `make stint VERSION=1.2.3 COMMIT="$(git rev-parse --short HEAD)" BUILD_DATE="$(date -u +%Y-%m-%dT%H:%M:%SZ)"`; verify it with `bin/stint --version --verbose`.
58+
For editor-only tracking, install the WakaTime plugin from your editor's marketplace and use this shared config:
59+
60+
```ini
61+
[settings]
62+
api_url = http://localhost:8080/api/v1
63+
api_key = waka_00000000-0000-4000-8000-000000000000
64+
heartbeat_rate_limit_seconds = 30
65+
offline = true
66+
```
67+
68+
Common CLI checks:
69+
70+
```bash
71+
stint today
72+
stint user-agents
73+
stint data-dumps download DUMP_ID
74+
stint offline sync
75+
stint --sync-ai-activity --ai-agent codex
76+
```
15177

152-
Use `make stint-install` to install both `stint` and the `stint-collect` helper used by `stint collect`.
15378
The CLI uses WakaTime-compatible resource paths: `~/.wakatime.cfg` for config,
15479
`~/.wakatime/offline_heartbeats.bdb` for queued heartbeats, and
15580
`~/.wakatime/wakatime.log` for request logs. When `WAKATIME_HOME` is set,
@@ -232,7 +157,7 @@ alias for API credentials.
232157
Normal heartbeat sends also scan supported local AI transcript sources unless
233158
`--sync-ai-disabled` is set or `settings.sync_ai_disabled = true` is configured,
234159
matching `wakatime-cli`'s default AI sync behavior.
235-
Use `bin/stint --sync-ai-activity` when you want to sync AI activity without
160+
Use `stint --sync-ai-activity` when you want to sync AI activity without
236161
sending a file heartbeat. AI file heartbeats respect the same include/exclude
237162
filters as normal file heartbeats. Supported sources include Codex, Claude,
238163
Continue dev data with session workspace mapping, Amp, Copilot CLI and VS Code workspace storage, Gemini, Antigravity

dockerfile_test.go

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,3 +48,30 @@ func TestWebDockerfileHealthcheckUsesReachableNextBinding(t *testing.T) {
4848
t.Fatal("web image should healthcheck the lightweight /healthz route")
4949
}
5050
}
51+
52+
func TestGitHubReleaseWorkflowPublishesStintBinaries(t *testing.T) {
53+
sourceBytes, err := os.ReadFile(".github/workflows/release.yml")
54+
if err != nil {
55+
t.Fatal(err)
56+
}
57+
source := string(sourceBytes)
58+
for _, want := range []string{
59+
"on:",
60+
"tags:",
61+
"v*",
62+
"cmd/stint",
63+
"goos: darwin",
64+
"goos: linux",
65+
"goarch: amd64",
66+
"goarch: arm64",
67+
"stint_${VERSION}_${GOOS}_${GOARCH}.tar.gz",
68+
"softprops/action-gh-release",
69+
} {
70+
if !strings.Contains(source, want) {
71+
t.Fatalf("release workflow missing %q", want)
72+
}
73+
}
74+
if strings.Contains(source, "go test ./...") {
75+
t.Fatal("release workflow should not run the full testcontainers test suite just to package binaries")
76+
}
77+
}

0 commit comments

Comments
 (0)