Skip to content

Commit ac54984

Browse files
authored
Release/1.3.8 (#40)
* bump up version code * bring back installer script guide in README.md * docs: update README.md to mention install.sh env vars * added new install.sh env vars to agents.sh * Feat/telemetry (#39) * add no-telemetry cli flag and toml config flag. read and call telemetry if false * send analytics in telemetry.Send * added telemetry message * read/write telemetry.json file * fixed cli-flags test * added tests for telemetry * docs: updated changelog * docs: added telemetry to README.md * removed debug prints * send telemetry in CI * use NoTelemetry instead of Debug in cli-flag test * fix no-telemetry flag name * fix: send erro when not nil * fix test error * send ci to analytics * docs: updated changelog * docs: added 1.3.8 release notes * added 1.3.8-alpha release notes to 1.3.8 * fix typos, handle error state
2 parents ab2c795 + 13a13e3 commit ac54984

14 files changed

Lines changed: 757 additions & 9 deletions

File tree

AGENTS.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ go build -o reposcan .
1515

1616
# Install
1717
curl -fsSL https://raw.githubusercontent.com/mabd-dev/reposcan/main/install.sh | sh
18+
19+
# VERSION: is optional with default value='latests'
20+
# ALIAS: is optional with default value='reposcan'
21+
curl -fsSL https://raw.githubusercontent.com/mabd-dev/reposcan/main/install.sh | VERSION=v1.3.8 ALIAS=reposcan sh
1822
```
1923

2024
### Testing

CHANGELOG.md

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,22 @@ All notable changes to this project will be documented in this file.
66
## Unreleased
77

88

9-
## [1.3.8] - 2026-04-27
9+
## [1.3.8] - 2026-05-21
10+
11+
### Added
12+
13+
- feat(telemetry): send anonymous telemetry usage by @mabd-dev in [#39](https://github.com/mabd-dev/reposcan/pull/39)
14+
- feat(release): release workflow and install.sh by @AnthonyGeorgeAZ in [#30](https://github.com/mabd-dev/reposcan/pull/30)
15+
- feat(analytics): add Analytics interface with Mixpanel and stdout backends by @mvanhorn in [#27](https://github.com/mabd-dev/reposcan/pull/27)
16+
- feat(changelog): add CHANGELOG.md by @vgauraha62 in [#26](https://github.com/mabd-dev/reposcan/pull/26)
17+
18+
### Fixed
19+
20+
- fix: hide redundant remote name in state column by @mvanhorn in [#23](https://github.com/mabd-dev/reposcan/pull/23)
21+
22+
---
23+
24+
## [1.3.8-alpha] - 2026-04-27
1025

1126
### Added
1227

README.md

Lines changed: 66 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,55 @@ https://github.com/user-attachments/assets/1c8370c6-3b94-4490-bc96-fc179ef14f1d
3232

3333
## 📦 Installation
3434

35-
### Go install (latest)
35+
### Install script (recommended)
36+
37+
The easiest way to install `reposcan`. Detects your OS and architecture automatically and installs the latest release binary into a directory on your `$PATH`:
38+
39+
```sh
40+
curl -fsSL https://raw.githubusercontent.com/mabd-dev/reposcan/main/install.sh | sh
41+
```
42+
43+
Supports **linux/amd64**, **darwin/amd64**, and **darwin/arm64**.
44+
45+
46+
#### Install environment variables
47+
48+
| env vars | Required | Default | Description |
49+
|---|---|---|---|
50+
| `VERSION` | false | latest | download a specific version |
51+
| `ALIAS` | false | reposcan | specify binary name |
52+
53+
```sh
54+
# with version
55+
curl -fsSL https://raw.githubusercontent.com/mabd-dev/reposcan/main/install.sh | VERSION=v1.3.8 sh
56+
```
57+
58+
```sh
59+
# with alias
60+
curl -fsSL https://raw.githubusercontent.com/mabd-dev/reposcan/main/install.sh | ALIAS=reposcan sh
61+
```
62+
63+
```sh
64+
# with both
65+
curl -fsSL https://raw.githubusercontent.com/mabd-dev/reposcan/main/install.sh | VERSION=v1.3.8 ALIAS=reposcan sh
66+
```
67+
68+
69+
#### Migrating from `go install`
70+
71+
If you previously installed reposcan via `go install`, the binary lives in `$GOPATH/bin` (usually `~/go/bin/reposcan`). The curl installer puts the binary in a different location, so both can coexist silently — meaning the old one may take precedence in your `$PATH`.
72+
73+
To avoid this, remove the old binary first:
3674

3775
```sh
38-
go install github.com/mabd-dev/reposcan@latest
76+
rm "$(which reposcan)"
3977
```
4078

41-
Make sure # $GOPATH/bin (or $HOME/go/bin) is in your $PATH
79+
Then install using the curl installer:
4280

81+
```sh
82+
curl -fsSL https://raw.githubusercontent.com/mabd-dev/reposcan/main/install.sh | sh
83+
```
4384

4485
### From source
4586
```sh
@@ -134,5 +175,27 @@ Each step overrides the one before it
134175
- [ ] Show branches with their states on each repo
135176

136177

178+
## Telemetry
179+
180+
reposcan collects anonymous usage data to help understand how the tool is used and improve it over time.
181+
You'll see a one-time notice about this on first run.
182+
183+
What is collected:
184+
- `os` — operating system (linux, windows, darwin)
185+
- `arch` — device cpu architecture
186+
- `tool-version` — tool version being used
187+
- `ci` — whether the tool is running in a CI environment
188+
189+
and other tool specific cli-flags like `filter`, `output_format`, `repo_count`
190+
191+
Nothing personal is collected — no usernames, tokens, or file paths.
192+
Events are sent to a [mixpanel](https://mixpanel.com/home/) (a third-party analytics service) and visible only to the maintainer.
193+
194+
195+
### Disable telemetry
196+
197+
Add `--no-telemetry` when running the command. Or in `~/.config/reposcan/config.toml` add `no-telemetry = true` at the top of the file (check [sample.toml](sample/config.toml))
198+
199+
137200
## 🤝 Contributing
138201
PRs, bug reports, and feature requests are welcome.

cmd/reposcan/flags_read_test.go

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ func TestReadFlags_AppliesAllFlags(t *testing.T) {
2020
cmd.Flags().String("json-output-path", "", "")
2121
cmd.Flags().IntP("max-workers", "w", 8, "")
2222
cmd.Flags().BoolP("debug", "", false, "")
23+
cmd.Flags().BoolP("no-telemetry", "", false, "")
2324
// cmd.Flags().StringP("colorscheme", "", "", "")
2425

2526
args := []string{
@@ -31,7 +32,8 @@ func TestReadFlags_AppliesAllFlags(t *testing.T) {
3132
"-f", "all",
3233
"--json-output-path", "/tmp/out",
3334
"-w", "16",
34-
"--debug", "true",
35+
"--debug=true",
36+
"--no-telemetry=false",
3537
// "--colorscheme", "something",
3638
}
3739
cmd.SetArgs(args)
@@ -66,7 +68,10 @@ func TestReadFlags_AppliesAllFlags(t *testing.T) {
6668
t.Fatalf("max workers not applied: %d", cfg.MaxWorkers)
6769
}
6870
if cfg.Debug != true {
69-
t.Fatalf("debugnot applied: %t", cfg.Debug)
71+
t.Fatalf("debug not applied: %t", cfg.Debug)
72+
}
73+
if cfg.NoTelemetry != false {
74+
t.Fatalf("telemetry not applied: %t", cfg.NoTelemetry)
7075
}
7176
}
7277

@@ -92,6 +97,7 @@ func TestReadTableOutput_SwitchToInteractiveOutput(t *testing.T) {
9297
cmd.Flags().String("json-output-path", "", "")
9398
cmd.Flags().IntP("max-workers", "w", 8, "")
9499
cmd.Flags().BoolP("debug", "", false, "")
100+
cmd.Flags().BoolP("no-telemetry", "", false, "")
95101
// cmd.Flags().StringP("colorscheme", "", "", "")
96102

97103
args := []string{
@@ -103,7 +109,8 @@ func TestReadTableOutput_SwitchToInteractiveOutput(t *testing.T) {
103109
"-f", "all",
104110
"--json-output-path", "/tmp/out",
105111
"-w", "16",
106-
"--debug", "true",
112+
"--debug=true",
113+
"--no-telemetry=false",
107114
// "--colorscheme", "something",
108115
}
109116
cmd.SetArgs(args)

cmd/reposcan/main.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ func init() {
3939
RootCmd.PersistentFlags().String("json-output-path", configs.Output.JSONPath, "Write scan report JSON files to this directory (optional)")
4040
RootCmd.PersistentFlags().IntP("max-workers", "w", configs.MaxWorkers, "Number of concurrent git checks")
4141
RootCmd.PersistentFlags().BoolP("debug", "", configs.Debug, "Enable/Disable debug mode")
42+
RootCmd.PersistentFlags().BoolP("no-telemetry", "", configs.NoTelemetry, "Enable/Disable sending telemetry")
4243
// RootCmd.PersistentFlags().StringP("colorscheme", "", configs.Output.ColorSchemeName, "Used only if 'output' is 'interactive'")
4344

4445
RootCmd.AddCommand(versionCmd)

cmd/reposcan/rootCmd.go

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import (
1212
"github.com/mabd-dev/reposcan/internal/render/file"
1313
"github.com/mabd-dev/reposcan/internal/render/stdout"
1414
"github.com/mabd-dev/reposcan/internal/render/tui"
15+
"github.com/mabd-dev/reposcan/internal/telemetry"
1516
"github.com/spf13/cobra"
1617
)
1718

@@ -72,6 +73,7 @@ var RootCmd = &cobra.Command{
7273
// - max-workers (-w) : number of concurrent git checks
7374
// - debug (--debug) : enable/disable debug mode
7475
// - colorscheme (--colorscheme) : enable/disable debug mode
76+
// - no-telemetry : enable/disable sending telemetry data
7577
func readFlags(cmd *cobra.Command, configs *config.Config) error {
7678
// Read roots flags
7779
roots, err := cmd.Flags().GetStringArray("root")
@@ -138,12 +140,22 @@ func readFlags(cmd *cobra.Command, configs *config.Config) error {
138140
}
139141
(*configs).Debug = debug
140142

143+
noTelemetry, err := cmd.Flags().GetBool("no-telemetry")
144+
if err != nil {
145+
return err
146+
}
147+
(*configs).NoTelemetry = noTelemetry
148+
141149
return nil
142150
}
143151

144152
func run(configs config.Config) error {
145153
report := internal.GenerateScanReport(configs)
146154

155+
if !configs.NoTelemetry {
156+
telemetry.Send(mixpanelToken, configs.Debug, configs.Only, configs.Output.Type, len(report.RepoStates))
157+
}
158+
147159
switch configs.Output.Type {
148160
case config.OutputJson:
149161
err := stdout.RenderScanReportAsJson(report)

docs/cli-flags.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,3 +60,8 @@ This document explains each CLI flag, its equivalent `config.toml` field, what i
6060
- Config: `debug = true/false`
6161
- Description: Enable/disable logging mode. Log file will be in `~/.config/reposcan/logs/`
6262
- Example: `--debug=false` or `--debug` same as `--debug=true`
63+
64+
- `--no-telemetry true/false`
65+
- Config: `no-telemetry = true/false`
66+
- Description: Enable/disable sending telemetry data
67+
- Example: `--no-telemetry=true` or `--no-telemetry`

go.mod

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ require (
88
github.com/charmbracelet/bubbletea v1.3.6
99
github.com/charmbracelet/lipgloss v1.1.0
1010
github.com/fatih/color v1.18.0
11+
github.com/google/uuid v1.6.0
1112
github.com/mattn/go-runewidth v0.0.16
1213
github.com/mixpanel/mixpanel-go v1.2.1
1314
github.com/muesli/reflow v0.3.0

go.sum

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ github.com/erikgeiser/coninput v0.0.0-20211004153227-1c3628e74d0f h1:Y/CXytFA4m6
2929
github.com/erikgeiser/coninput v0.0.0-20211004153227-1c3628e74d0f/go.mod h1:vw97MGsxSvLiUE2X8qFplwetxpGLQrlU1Q9AUEIzCaM=
3030
github.com/fatih/color v1.18.0 h1:S8gINlzdQ840/4pfAwic/ZE0djQEH3wM94VfqLTZcOM=
3131
github.com/fatih/color v1.18.0/go.mod h1:4FelSpRwEGDpQ12mAdzqdOukCy4u8WUtOY6lkT/6HfU=
32+
github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
33+
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
3234
github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8=
3335
github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw=
3436
github.com/jarcoal/httpmock v1.3.1 h1:iUx3whfZWVf3jT01hQTO/Eo5sAYtB2/rqaUuOtpInww=

internal/config/types.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ type Config struct {
1515
MaxWorkers int `toml:"maxWorkers"`
1616

1717
// Debug if true, enable logging to a file in [DefaultLogFileDir]
18-
Debug bool `toml:"debug"`
18+
Debug bool `toml:"debug"`
19+
NoTelemetry bool `toml:"no-telemetry"`
1920

2021
Version int `toml:"version"`
2122
}

0 commit comments

Comments
 (0)