Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@ mise exec -- npx playwright test e2e/ui-prefs.spec.mjs
# Manual test log generation
mise exec -- node e2e/loggen.mjs --count 200
mise exec -- bash -lc 'node e2e/loggen.mjs --follow --rate 20 | go run ./cmd/peek --all --no-browser'

# Linux install script (release binaries)
curl -fsSL https://raw.githubusercontent.com/mchurichi/peek/main/scripts/get-peek.sh | sh -s -- install
curl -fsSL https://raw.githubusercontent.com/mchurichi/peek/main/scripts/get-peek.sh | sh -s -- uninstall
curl -fsSL https://raw.githubusercontent.com/mchurichi/peek/main/scripts/get-peek.sh | sh -s -- uninstall --purge --force
```

No linter or formatter is configured yet. Use `mise exec -- go vet ./...` for basic checks.
Expand Down Expand Up @@ -75,6 +80,7 @@ e2e/loggen.mjs Manual test-data log generator (json/logfmt/mixed)
.github/workflows/release-create-tag-from-merged-pr-label.yml Run main-branch CI then create SemVer tag from merged PR release label
.github/workflows/release-publish-artifacts-from-tag.yml Publish GitHub Release artifacts on SemVer tag push
.github/scripts/release-utils.cjs Shared release-label and SemVer helper functions for workflows
scripts/get-peek.sh Linux install/uninstall script for GitHub release binaries
.goreleaser.yml GoReleaser build/archive/checksum config
```

Expand Down Expand Up @@ -151,5 +157,6 @@ BadgerDB keys: `log:{timestamp_nano}:{id}` — enables time-range key seeking.
- **Run Go and test commands via mise**: use `mise exec -- ...` for `go`, `node`, and `npm` commands documented here
- **Docs boundary**: `/README.md` is consumer-facing usage; `/docs/README.md` is technical/developer/testing guidance
- **Technical utilities docs**: document tools like `e2e/loggen.mjs` in `/docs/README.md`, not `/README.md`
- **Installer script compatibility**: keep `scripts/get-peek.sh` POSIX `sh` and aligned with GoReleaser asset names/checksum output
- **Keep AGENTS.md up to date**: any change that alters build commands, project structure, dependencies, architecture, conventions, or critical rules documented here MUST include a corresponding update to this file in the same commit
- **Release labels are mandatory for PRs**: exactly one of `release:patch`, `release:minor`, `release:major`, or `skip-release` is required before merge
20 changes: 20 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,24 @@ $ kubectl logs -l app=frontdesk -w | peek
## Installation

```bash
# Linux quick install (latest) to ~/.local/bin
curl -fsSL https://raw.githubusercontent.com/mchurichi/peek/main/scripts/get-peek.sh | sh -s -- install

# Linux quick install (specific version)
curl -fsSL https://raw.githubusercontent.com/mchurichi/peek/main/scripts/get-peek.sh | sh -s -- install --version v0.1.0

# Linux system install to /usr/local/bin (uses sudo when needed)
curl -fsSL https://raw.githubusercontent.com/mchurichi/peek/main/scripts/get-peek.sh | sh -s -- install --system

# Linux uninstall (remove binary only)
curl -fsSL https://raw.githubusercontent.com/mchurichi/peek/main/scripts/get-peek.sh | sh -s -- uninstall

# Linux uninstall + remove all ~/.peek data/config
curl -fsSL https://raw.githubusercontent.com/mchurichi/peek/main/scripts/get-peek.sh | sh -s -- uninstall --purge

# Linux uninstall + purge non-interactively
curl -fsSL https://raw.githubusercontent.com/mchurichi/peek/main/scripts/get-peek.sh | sh -s -- uninstall --purge --force

# Build from source
git clone https://github.com/mchurichi/peek.git
cd peek
Expand Down Expand Up @@ -316,6 +334,8 @@ peek/
│ └── server/ # HTTP server, WebSocket, embedded UI (index.html)
├── internal/
│ └── config/ # Configuration management
├── scripts/
│ └── get-peek.sh # Linux install/uninstall script for GitHub release binaries
└── go.mod
```

Expand Down
21 changes: 21 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,27 @@ WebSocket endpoint for real-time log streaming
- **Storage**: Efficient compression with BadgerDB
- **Binary**: <20MB

## Linux Installer Script

`scripts/get-peek.sh` provides Linux install/uninstall for release artifacts published on GitHub Releases.

- Shell target: POSIX `sh` (do not introduce bash-only syntax).
- Supported architectures: `amd64` and `arm64`.
- Default install directory: `~/.local/bin`.
- System install: `--system` targets `/usr/local/bin` (uses `sudo` when needed).
- `uninstall` command removes the installed binary.
- Optional `--purge` removes all `~/.peek` data and config after confirmation.
- Use `--purge --force` for non-interactive purge automation.

The installer depends on GoReleaser archive naming and checksums:

- Release tag: `vX.Y.Z`
- Primary archive lookup: `peek_X.Y.Z_linux_<arch>.tar.gz` (no `v` prefix)
- Fallback archive lookup: `peek_vX.Y.Z_linux_<arch>.tar.gz`
- Checksums file: `checksums.txt`

If `.goreleaser.yml` changes these names, update `scripts/get-peek.sh` in the same change.

## Developer Test Data Generator

This section is for development/testing workflows only; end-user usage stays in `/README.md`.
Expand Down
Loading