Skip to content

feat: add support for custom Chrome args in launchBrowser#12

Merged
konard merged 3 commits intomainfrom
issue-11-f0db41c23d6b
Dec 28, 2025
Merged

feat: add support for custom Chrome args in launchBrowser#12
konard merged 3 commits intomainfrom
issue-11-f0db41c23d6b

Conversation

@konard
Copy link
Member

@konard konard commented Dec 28, 2025

Summary

  • Add args option to launchBrowser function to allow passing custom Chrome arguments
  • Custom args are appended to the default CHROME_ARGS
  • Useful for headless server environments (Docker, CI/CD) requiring flags like --no-sandbox

Changes

  • src/browser/launcher.js: Add args option, combine with default CHROME_ARGS
  • tests/unit/browser/launcher.test.js: Add unit tests for the new option
  • README.md: Add API documentation for launchBrowser function
  • .changeset/add-custom-chrome-args.md: Add changeset for minor version bump

Usage Example

import { launchBrowser } from 'browser-commander';

const { browser, page } = await launchBrowser({
  engine: 'puppeteer',
  headless: true,
  args: ['--no-sandbox', '--disable-setuid-sandbox', '--disable-dev-shm-usage'],
});

Test plan

  • Unit tests pass (356 passing)
  • Lint checks pass
  • Format checks pass
  • CI workflow passes

Fixes #11

🤖 Generated with Claude Code

Adding CLAUDE.md with task information for AI processing.
This file will be removed when the task is complete.

Issue: #11
@konard konard self-assigned this Dec 28, 2025
Add `args` option to launchBrowser function to allow passing custom
Chrome arguments that are appended to the default CHROME_ARGS.
This is useful for headless server environments (Docker, CI/CD) that
require flags like --no-sandbox, --disable-setuid-sandbox.

- Add `args` parameter to launchBrowser options (default: [])
- Combine default CHROME_ARGS with custom args
- Add unit tests for the new args option
- Add documentation in README.md API Reference section

Fixes #11

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@konard konard changed the title [WIP] Add support for custom Chrome args in launchBrowser feat: add support for custom Chrome args in launchBrowser Dec 28, 2025
@konard konard marked this pull request as ready for review December 28, 2025 04:54
@konard
Copy link
Member Author

konard commented Dec 28, 2025

🤖 Solution Draft Log

This log file contains the complete execution trace of the AI solution draft process.

💰 Cost estimation:

  • Public pricing estimate: $3.585705 USD
  • Calculated by Anthropic: $2.192101 USD
  • Difference: $-1.393604 (-38.87%)
    📎 Log file uploaded as GitHub Gist (424KB)
    🔗 View complete solution draft log

Now working session is ended, feel free to review and add any feedback on the solution draft.

@konard konard merged commit c3e2687 into main Dec 28, 2025
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add support for custom Chrome args in launchBrowser

1 participant