High-performance browser automation bridge and multi-instance orchestrator with advanced stealth injection and real-time dashboard.
refactor: replace Makefile with simple setup script
Dataa9ceb54c0ada
diff --git a/DEVELOPMENT.md b/DEVELOPMENT.mdindex f32377f7..745a182e 100644--- a/DEVELOPMENT.md+++ b/DEVELOPMENT.md@@ -14,10 +14,10 @@ git clone https://github.com/pinchtab/pinchtab.gitcd pinchtab# 2. Setup (installs git hooks, downloads deps)-make setup+./setup.sh# 3. Build and run-make build+go build ./cmd/pinchtab./pinchtab```@@ -32,10 +32,10 @@ git clone https://github.com/pinchtab/pinchtab.gitcd pinchtab```-### 2. Run automated setup+### 2. Run setup script```bash-make setup+./setup.sh```This will:@@ -63,16 +63,13 @@ Git hooks automatically run on `git commit`. To manually check your code:```bash# Format code-make fmt+gofmt -w .# Run linter-make lint+golangci-lint run# Run tests-make test--# All checks (format + lint + test)-make check+go test ./...```## Common Issues@@ -81,7 +78,7 @@ make checkRe-run setup:```bash-make install-hooks+./scripts/install-hooks.sh```Verify hooks installed:@@ -102,7 +99,7 @@ go install github.com/golangci/golangci-lint/cmd/golangci-lint@latestRun format before committing:```bash-make fmt+gofmt -w .```### Tests failing locally@@ -122,25 +119,27 @@ go test -run TestName ./...```bash# All tests-make test+go test ./...-# With coverage report-make test-cover-# Opens coverage.html in browser-```+# Verbose output+go test -v ./...-Or directly with Go:-```bash-go test ./... # All tests-go test -v ./... # Verbose-go test -run TestName ./... # Specific test+# Specific test+go test -run TestName ./...++# With coverage+go test -cover ./...++# Generate coverage report+go test -coverprofile=coverage.out ./...+go tool cover -html=coverage.out```## Code Style-- **Format:** `gofmt` (automatic via git hook, or run `make fmt`)-- **Lint:** `golangci-lint` (automatic via git hook, or run `make lint`)-- **Tests:** Must pass (`make test`)+- **Format:** `gofmt` (automatic via git hook, or run `gofmt -w .`)+- **Lint:** `golangci-lint` (automatic via git hook, or run `golangci-lint run`)+- **Tests:** Must pass (`go test ./...`)## Git Workflow@@ -151,8 +150,8 @@ git checkout -b feature/your-feature# 2. Make changes# ... edit files ...-# 3. Check your work (optional, hooks will run on commit)-make check+# 3. Test your changes+go test ./...# 4. Commit (git hooks run automatically: gofmt + lint)git commit -m "feat: description"@@ -184,25 +183,30 @@ Validate docs: `./scripts/check-docs-json.sh`## Useful Commands```bash-# Development-make setup # Setup dev environment (run once)-make build # Build pinchtab binary-make run # Build and run-make fmt # Format code-make lint # Run linter-make test # Run tests-make test-cover # Run tests with coverage-make check # Format + lint + test-make clean # Remove build artifacts-make help # Show all commands--# Direct Go commands-gofmt -w . # Format all files-gofmt -l . # List files that need formatting-go test ./... # Run all tests-go test -v ./... # Verbose tests-go clean # Clean build cache-go get -u ./... # Update dependencies+# Setup+./setup.sh # Setup dev environment (run once)+./scripts/install-hooks.sh # Re-install git hooks++# Build & Run+go build ./cmd/pinchtab # Build pinchtab binary+go run ./cmd/pinchtab # Build and run+go clean # Clean build cache++# Code Quality+gofmt -w . # Format all files+gofmt -l . # List files that need formatting+golangci-lint run # Run linter++# Testing+go test ./... # Run all tests+go test -v ./... # Verbose output+go test -run TestName ./... # Specific test+go test -cover ./... # With coverage++# Dependencies+go mod download # Download dependencies+go mod tidy # Clean up go.mod+go get -u ./... # Update dependencies```## Getting Helpdiff --git a/Makefile b/Makefiledeleted file mode 100644index cdbd25f9..00000000--- a/Makefile+++ /dev/null@@ -1,85 +0,0 @@-.PHONY: setup install-hooks test lint fmt check build clean help--## Setup (run once after clone)-setup: install-hooks- @echo "✅ Development environment ready!"- @echo ""- @echo "Next steps:"- @echo " make test # Run tests"- @echo " make build # Build pinchtab"- @echo " make fmt # Format code"--## Install git hooks-install-hooks:- @echo "Installing git hooks..."- @./scripts/install-hooks.sh--## Run tests-test:- go test ./...--## Run tests with coverage-test-cover:- go test -cover ./...- go test -coverprofile=coverage.out ./...- go tool cover -html=coverage.out -o coverage.html- @echo "Coverage report: coverage.html"--## Run linter-lint:- @if command -v golangci-lint >/dev/null 2>&1; then \- golangci-lint run --timeout=5m; \- else \- echo "⚠️ golangci-lint not installed"; \- echo "Install: brew install golangci-lint"; \- echo "Or: go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest"; \- fi--## Format code-fmt:- gofmt -w .- @echo "✅ Code formatted"--## Check code (fmt + lint + test)-check: fmt lint test- @echo "✅ All checks passed"--## Build pinchtab binary-build:- go build -o pinchtab ./cmd/pinchtab--## Build for release-build-release:- CGO_ENABLED=0 go build -ldflags="-s -w" -o pinchtab ./cmd/pinchtab--## Clean build artifacts-clean:- go clean- rm -f pinchtab coverage.out coverage.html--## Run pinchtab-run: build- ./pinchtab--## Show help-help:- @echo "Pinchtab Development Commands"- @echo ""- @echo "Setup:"- @echo " make setup Setup development environment (run once)"- @echo " make install-hooks Install git hooks"- @echo ""- @echo "Development:"- @echo " make fmt Format code with gofmt"- @echo " make lint Run golangci-lint"- @echo " make test Run tests"- @echo " make test-cover Run tests with coverage report"- @echo " make check Run fmt + lint + test"- @echo ""- @echo "Build:"- @echo " make build Build pinchtab binary"- @echo " make build-release Build optimized release binary"- @echo " make run Build and run pinchtab"- @echo ""- @echo "Cleanup:"- @echo " make clean Remove build artifacts"diff --git a/README.md b/README.mdindex 2de95ba5..675fc7a2 100644--- a/README.md+++ b/README.md@@ -181,8 +181,8 @@ Want to contribute? See [DEVELOPMENT.md](DEVELOPMENT.md) for setup instructions.```bashgit clone https://github.com/pinchtab/pinchtab.gitcd pinchtab-make setup # Installs git hooks, downloads deps-make build # Build pinchtab binary+./setup.sh # Installs git hooks, downloads deps+go build ./cmd/pinchtab # Build pinchtab binary```See [CONTRIBUTING.md](CONTRIBUTING.md) for contribution guidelines.diff --git a/setup.sh b/setup.shnew file mode 100755index 00000000..f4b601f2--- /dev/null+++ b/setup.sh@@ -0,0 +1,37 @@+#!/usr/bin/env bash+set -euo pipefail++echo "🔧 Setting up pinchtab development environment..."+echo ""++# Install git hooks+echo "📌 Installing git hooks..."+./scripts/install-hooks.sh++# Download dependencies+echo "📦 Downloading Go dependencies..."+go mod download++# Verify environment+echo "✅ Verifying Go environment..."+go version+echo ""++# Optional: Check for golangci-lint+if command -v golangci-lint &>/dev/null; then+ echo "✅ golangci-lint found: $(golangci-lint --version | head -1)"+else+ echo "⚠️ golangci-lint not found (optional for local linting)"+ echo " Install: brew install golangci-lint"+ echo " Or: go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest"+fi++echo ""+echo "✅ Development environment ready!"+echo ""+echo "Next steps:"+echo " go build ./cmd/pinchtab # Build pinchtab"+echo " go test ./... # Run tests"+echo " gofmt -w . # Format code"+echo ""+echo "Git hooks will run automatically on commit."