Build PinchTab from source for development, custom modifications, or platforms without prebuilt binaries.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/pinchtab/pinchtab/llms.txt
Use this file to discover all available pages before exploring further.
Prerequisites
System Requirements
| Requirement | Version | Purpose |
|---|---|---|
| Go | 1.25+ | Build language |
| Git | Latest | Version control |
| Chrome/Chromium | Latest | Browser automation |
| macOS, Linux, or WSL2 | Current | Supported OS |
Recommended Setup
- macOS: Homebrew for package management
- Linux: apt (Debian/Ubuntu) or yum (RHEL/CentOS)
- WSL2: Full Linux environment (not WSL1)
Installation Steps
Build Process
Simple Build
The basic build command:- Compiles all Go source code
- Links dependencies from
go.mod - Produces executable binary:
./pinchtab - Takes approximately 30-60 seconds
Optimized Build (Smaller Binary)
For production or distribution, build with optimization flags:-s: Omit symbol table-w: Omit DWARF debugging information- Result: Smaller binary size (~12MB)
Cross-Compilation
Build for different platforms:Dependencies
Fromgo.mod:
- chromedp: Chrome DevTools Protocol implementation
- cdproto: CDP protocol definitions
- gobwas/ws: WebSocket client
- yaml.v3: YAML configuration parsing
Running the Server
Start in Headless Mode
Start in Headed Mode
See the browser window:Run in Background
Test the Server
Installing as System Binary
Install to Go’s bin directory for global access:~/go/bin is in your PATH:
pinchtab from anywhere:
Development Workflow
Setup Pre-commit Hooks
PinchTab uses pre-commit hooks for code quality:Code Formatting
Format code before committing:Running Tests
Code Quality Checks
Git Workflow for Contributors
Continuous Integration
GitHub Actions automatically runs on every push:- Format checks:
gofmt - Vet checks:
go vet - Build verification: Ensures code compiles
- Test suite: Full test coverage
- Linting:
golangci-lint
.github/workflows/ for CI configuration.
Troubleshooting
”go: command not found”
Solution: Install Go or add it to PATH:“Chrome not found” at runtime
Solution: Install Chromium or specify custom path:Build errors with dependencies
Solution: Clean and re-download modules:“gofmt: command not found”
Solution: gofmt comes with Go. Ensure Go is properly installed:Tests failing
Solution: Run tests with verbose output to see details:Port 9867 already in use
Solution: Change the port:Useful Commands
Resources
- GitHub Repository: https://github.com/pinchtab/pinchtab
- Go Documentation: https://golang.org/doc/
- Chrome DevTools Protocol: https://chromedevtools.github.io/devtools-protocol/
- Chromedp Library: https://github.com/chromedp/chromedp
Next Steps
Development Guide
Learn about PinchTab’s architecture
Contributing
Contribute to the project
Quick Start
Test your build with examples
API Reference
Explore the HTTP API