Skip to content

feat(browser): add cookies subcommand to list browser cookies#1062

Open
riba2534 wants to merge 1 commit intojackwener:mainfrom
riba2534:feat/browser-cookies-command
Open

feat(browser): add cookies subcommand to list browser cookies#1062
riba2534 wants to merge 1 commit intojackwener:mainfrom
riba2534:feat/browser-cookies-command

Conversation

@riba2534
Copy link
Copy Markdown

Summary

Adds opencli browser cookies CLI command to expose the existing extension cookie capability (including HttpOnly cookies) up to the CLI layer.

What's new

  • opencli browser cookies — list browser cookies
  • --domain <domain> — filter by domain
  • --url <url> — filter by URL
  • --name <name> — client-side name filtering
  • -f, --format <fmt> — output format: table/json/yaml/csv/md

Why

The daemon and Chrome extension already support reading all cookies via chrome.cookies.getAll(), including HttpOnly ones. However, there was no CLI command to access this capability. This PR closes that gap.

Testing

  • Unit tests added in src/cli.test.ts (5 test cases, all passing)
  • Extension regression tests pass
  • End-to-end verified against github.com — successfully extracts HttpOnly cookies like user_session with httpOnly: true

Example

opencli browser cookies --domain .github.com --format json

Adds `opencli browser cookies` CLI command with support for:
- `--domain` and `--url` filters (passed to `chrome.cookies.getAll`)
- `--name` client-side filtering
- `--format` output (table/json/yaml/csv/md)

This exposes the existing extension/daemon cookie capability
up to the CLI layer, including HttpOnly cookies.

Includes unit tests covering default output, filtering,
JSON format, and empty result handling.
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.

1 participant