Skip to main content
Enable browser control with the --browser flag:
lukan --browser

Browser Options

FlagDescription
--browser-visibleLaunch Chrome with visible window
--browser-user-profileUse default Chrome profile
--browser-cdp <url>Connect to existing Chrome via CDP
--browser-allow-internalAllow navigation to internal/private URLs

Available Tools

ToolDescription
BrowserNavigateNavigate to a URL
BrowserNewTabOpen a new tab
BrowserSnapshotTake an accessibility tree snapshot (compact mode available)
BrowserScreenshotTake a JPEG screenshot of the current page
BrowserClickClick an element by reference number
BrowserTypeType text into an input field
BrowserEvaluateEvaluate JavaScript (with security blocklist)
BrowserSavePDFSave the current page as a PDF file
BrowserTabsList open tabs
BrowserSwitchTabSwitch between tabs

Usage Examples

// Navigate to a page
BrowserNavigate({ url: "https://example.com" })

// Take a screenshot
BrowserScreenshot({})

// Click an element (use selector from snapshot)
BrowserClick({ selector: "#submit-button" })

// Type in an input
BrowserType({ selector: "#search-input", text: "search query" })

// Evaluate JavaScript
BrowserEvaluate({ script: "return document.title" })

// Switch tabs
BrowserSwitchTab({ tabIndex: 1 })

// Save page as PDF
BrowserSavePDF({ path: "output.pdf" })

Connecting to Existing Chrome

Instead of launching a new Chrome instance, connect to one already running:
# Start Chrome with remote debugging
google-chrome --remote-debugging-port=9222

# Connect Lukan to it
lukan --browser --browser-cdp http://localhost:9222
This is useful when you need to continue a session that was already authenticated.