
Security News
npm Adopts OIDC for Trusted Publishing in CI/CD Workflows
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
chromium-helper
Advanced tools
CLI tool for searching and exploring Chromium source code via Google's official APIs
A powerful command-line tool for searching and exploring Chromium and PDFium source code using Google's official APIs. Features comprehensive Gerrit integration, issue tracking, and support for both Chromium and PDFium projects.
# Option 1: Use instantly (no installation needed!)
npx chromium-helper search "LOG(INFO)" --limit 5
npx chromium-helper gerrit status 6624568
npx chromium-helper issues search "memory leak" --limit 10
# Option 2: Install globally for short 'ch' alias
npm install -g chromium-helper
# Then use with short commands
ch search "memory leak" --case-sensitive --format json
ch gerrit status 6624568
ch pdfium status 130850
Works with any AI coding assistant (Claude, Cursor, Gemini, etc.):
# Tell your AI: "Run npx ch --ai to learn about chromium-helper"
npx ch --ai
The AI will learn all commands and help you explore Chromium's codebase!
No installation required! Just run any command:
npx chromium-helper search "Browser::Create" --format json
npx chromium-helper gerrit status 6624568
npx chromium-helper issues search "security" --limit 20
For faster startup and short 'ch' alias:
npm install -g chromium-helper
# Now available as 'chromium-helper' and 'ch'
git clone https://github.com/hjanuschka/chromium-helper.git
cd chromium-helper/chromium-helper-cli
npm install && npm run build
npm link # Optional: Make globally available
search
- Search Chromium Source CodeSearch for code patterns in the Chromium codebase.
ch search <query> [options]
# Aliases: s
Options:
-c, --case-sensitive Case sensitive search
-l, --language <lang> Filter by programming language (cpp, javascript, python, etc.)
-p, --file-pattern <pattern> File pattern filter (*.cc, *.h, chrome/browser/*, etc.)
-t, --type <type> Search type: content|function|class|symbol|comment
--exclude-comments Exclude comments from search results
--limit <number> Maximum number of results (default: 20)
Examples:
# Basic text search
ch search "LOG(INFO)"
# Function search
ch search "CreateWindow" --type function
# Class search in C++ headers
ch search "Browser" --type class --file-pattern "*.h"
# Search excluding comments
ch search "TODO" --exclude-comments
# Language-specific search
ch search "addEventListener" --language javascript
symbol
- Find Symbol Definitions and UsageFind where symbols (functions, classes, variables) are defined and used.
ch symbol <symbol> [options]
# Aliases: sym
Options:
-f, --file <path> File path context for symbol resolution
Examples:
# Find Browser symbol
ch symbol "Browser"
# Find with file context
ch symbol "CreateWindow" --file "chrome/browser/ui/browser.cc"
file
- Get File ContentFetch the content of any file from Chromium source.
ch file <path> [options]
# Aliases: f
Options:
-s, --start <line> Starting line number
-e, --end <line> Ending line number
Examples:
# Get entire file
ch file "base/logging.h"
# Get specific line range
ch file "chrome/browser/ui/browser.h" --start 100 --end 200
# Get from line 50 to end
ch file "content/browser/browser_context.h" --start 50
owners
- Find OWNERS FilesFind OWNERS files for a given file path to identify code reviewers.
ch owners <path>
# Aliases: own
Examples:
# Find owners for a specific file
ch owners "chrome/browser/ui/browser.cc"
# Find owners for a directory
ch owners "third_party/blink/renderer/"
commits
- Search Commit HistorySearch commit messages and metadata in the Chromium repository.
ch commits <query> [options]
# Aliases: cm
Options:
-a, --author <author> Filter by author name or email
--since <date> Commits after date (YYYY-MM-DD)
--until <date> Commits before date (YYYY-MM-DD)
--limit <number> Maximum number of results (default: 20)
Examples:
# Search commit messages
ch commits "password manager"
# Search by author
ch commits "security fix" --author "chrome-security"
# Search in date range
ch commits "memory leak" --since "2023-01-01" --until "2023-12-31"
gerrit
- Gerrit Code Review OperationsWork with Chromium Gerrit code reviews.
ch gerrit <command> [options]
# Aliases: gr
Commands:
status <cl> Get CL status and test results
comments <cl> [options] Get CL review comments
diff <cl> [options] Get CL diff/changes
file <cl> <path> [options] Get file content from CL patchset
bots <cl> [options] Get try-bot status for CL
list [options] List Gerrit CLs (requires authentication)
Examples:
# Get CL status
ch gerrit status 6624568
# Get review comments
ch gerrit comments 6624568 --format json
# Get diff for specific file
ch gerrit diff 6624568 --file "base/logging.cc"
# Get file content from patchset
ch gerrit file 6624568 "base/logging.cc" --patchset 3
# Get try-bot status
ch gerrit bots 6624568
ch gerrit bots 6624568 --failed-only
# List Gerrit CLs (requires authentication cookie)
ch gerrit list --auth-cookie "SID=...; __Secure-1PSID=..." --limit 10
ch gerrit list --auth-cookie "..." --query "status:open owner:me"
ch gerrit list --auth-cookie "..." --query "change:1234 OR change:5678"
pdfium
- PDFium Gerrit OperationsWork with PDFium Gerrit code reviews.
ch pdfium <command> [options]
# Aliases: pdf
Commands:
status <cl> Get PDFium CL status and test results
comments <cl> [options] Get PDFium CL review comments
diff <cl> [options] Get PDFium CL diff/changes
file <cl> <path> [options] Get file content from PDFium CL patchset
bots <cl> [options] Get try-bot status for PDFium CL
list [options] List PDFium Gerrit CLs (requires authentication)
Examples:
# Get PDFium CL status
ch pdfium status 130850
# Get PDFium review comments
ch pdfium comments 130850 --format json
# View PDFium file changes
ch pdfium diff 130850 --file "fpdfsdk/fpdf_view.cpp"
# Get PDFium file content
ch pdfium file 130850 "fpdfsdk/fpdf_view.cpp" --patchset 9
# Get PDFium try-bot status
ch pdfium bots 130850
ch pdfium bots 130850 --failed-only
# List PDFium Gerrit CLs (requires authentication cookie)
ch pdfium list --auth-cookie "SID=...; __Secure-1PSID=..." --limit 10
ch pdfium list --auth-cookie "..." --query "status:open owner:me"
ch pdfium list --auth-cookie "..." --query "change:12345 OR change:67890"
issues
- Chromium Issue OperationsSearch and view Chromium issues and bugs.
ch issues <command> [options]
# Aliases: bugs
Commands:
get <id> Get specific issue details
search <query> [options] Search for issues
Examples:
# Search for issues
ch issues search "memory leak" --limit 10
ch issues search "pkasting" --start 20
# Get specific issue details
ch issues get 1493929
issue
- Get Chromium Issue DetailsGet information about Chromium bugs and feature requests.
ch issue <id>
# Aliases: bug
Examples:
# Get issue details
ch issue 422768753
# Using full URL
ch issue "https://issues.chromium.org/issues/422768753"
Control output format with the global --format
option:
ch search "LOG(INFO)" --format plain
Human-readable format with colors and formatting.
ch search "LOG(INFO)" --format json
Structured JSON for programmatic processing and AI systems.
ch search "LOG(INFO)" --format table
Tabular format for easy reading and comparison.
The gerrit list
and pdfium list
commands require authentication. We've made this super easy!
# One-time setup - guides you through cookie extraction
ch auth manual
# Check if you're authenticated
ch auth status
# Now you can use gerrit commands without any cookies!
ch gerrit list
ch pdfium list
# Alternative method - opens browser automatically
ch auth login
# Note: May be blocked by Google security checks
If you prefer to manually provide cookies each time:
# Get help on extracting cookies
ch auth help
# Use with --auth-cookie parameter
ch gerrit list --auth-cookie "SID=...; __Secure-1PSID=...; __Secure-3PSID=..."
# Or save to ~/.gerrit-cookie file
echo "SID=...; __Secure-1PSID=...; __Secure-3PSID=..." > ~/.gerrit-cookie
ch gerrit list # Will use saved cookies automatically
ch auth login
- Sign in via browser (saves cookies)ch auth status
- Check if authenticatedch auth logout
- Clear saved authenticationch auth help
- Show detailed cookie extraction help# Set custom API key
export CHROMIUM_SEARCH_API_KEY=your_api_key_here
# Disable colors
export NO_COLOR=1
Create ~/.ch.json
or .ch.json
in your project:
{
"apiKey": "your_api_key_here",
"outputFormat": "json",
"defaultLimit": 50
}
# Show current configuration
ch config --show
# Set API key (future feature)
ch config --set-api-key "your_key"
Perfect for AI systems and shell scripts:
#!/bin/bash
# Search for security-related code
RESULTS=$(ch search "crypto" --language cpp --format json --limit 10)
# Process results with jq
echo "$RESULTS" | jq '.[] | select(.file | contains("security")) | .url'
# Find all Browser class definitions
ch symbol "Browser" --format json | jq '.classResults[].url'
# Get file content for analysis
ch file "base/security/security_context.h" --format json | \
jq -r '.content' | head -20
The tool supports Google CodeSearch syntax:
# Search specific function definitions
ch search "function:CreateWindow"
# Search class definitions
ch search "class:Browser"
# Search symbols (excludes comments/strings)
ch search "symbol:WebContents"
# Case-sensitive search
ch search "case:yes LOG"
# Language and file filters
ch search "lang:cpp file:*.h virtual"
# Find all virtual destructors in headers
ch search "virtual ~" --file-pattern "*.h" --language cpp
# Search for TODO comments in browser code
ch search "TODO" --type comment --file-pattern "chrome/browser/*"
# Find memory management patterns
ch search "std::unique_ptr" --language cpp --exclude-comments
--limit
to control result count for faster responses--file-pattern
to narrow search scope--language
to filter by programming language--format json
for faster parsing in scripts# Clone and setup
git clone https://github.com/hjanuschka/ch-cli.git
cd ch-cli
npm install
# Development with watch mode
npm run dev
# Build
npm run build
# Test locally
node dist/index.js --help
git checkout -b feature/new-feature
git commit -am 'Add new feature'
git push origin feature/new-feature
MIT License - see LICENSE file for details.
Made with ❤️ for the Chromium developer community
FAQs
CLI tool for searching and exploring Chromium source code via Google's official APIs
The npm package chromium-helper receives a total of 18 weekly downloads. As such, chromium-helper popularity was classified as not popular.
We found that chromium-helper demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
Research
/Security News
A RubyGems malware campaign used 60 malicious packages posing as automation tools to steal credentials from social media and marketing tool users.
Security News
The CNA Scorecard ranks CVE issuers by data completeness, revealing major gaps in patch info and software identifiers across thousands of vulnerabilities.