Home
Softono

Bonk

Open source MIT Go
11
Stars
1
Forks
3
Issues
0
Watchers
2 months
Last Commit

 About Bonk

Go-native browser automation via Chrome DevTools Protocol. No Node.js, no relay process, no external dependencies.

Platforms

Web Self-hosted

Languages

Go

Links

Need Help Installing Bonk?

We provide expert installation service for this software. Our team will install, configure, and secure Bonk on your server. plans start at just $30.

bonk

Go Reference Go Report Card codecov

A fast, stealth-first browser automation library for Go. Direct Chrome DevTools Protocol over WebSocket — no WebDriver, no relay, no detection.

Documentation

Features

  • Direct CDP — WebSocket to Chrome, zero intermediaries, undetectable by default
  • Stealth by default — skips Runtime.enable, patches navigator/plugins/WebGL, strips headless signals
  • Code-generated protocol bindings — full coverage of all 55 CDP domains from upstream .pdl files
  • Context-awarepage.WithContext(ctx) / page.Timeout(d) for deadlines and cancellation
  • Auto-wait elements — polls for visibility before interaction, retries stale references
  • Network interception — intercept, modify, mock, or block requests and responses via the Fetch domain
  • Device emulation — built-in presets for iPhone 15, Pixel 8, iPad Pro, Galaxy S23, and more
  • Session persistence — save and restore cookies and localStorage across runs
  • Isolated contexts — separate cookie jars, proxies, viewports, and locales per context
  • Single dependency — only coder/websocket

Installation

go get github.com/joakimcarlsson/bonk

Quick Start

package main

import (
	"fmt"
	"log"

	"github.com/joakimcarlsson/bonk"
)

func main() {
	b, err := bonk.Launch()
	if err != nil {
		log.Fatal(err)
	}
	defer b.Close()

	ctx, err := b.NewContext()
	if err != nil {
		log.Fatal(err)
	}

	page, err := ctx.NewPage()
	if err != nil {
		log.Fatal(err)
	}

	if err := page.Navigate("https://example.com"); err != nil {
		log.Fatal(err)
	}

	title, _ := page.Title()
	fmt.Println(title)
}

License

See LICENSE file.