Skip to content

Commit 568304e

Browse files
committed
1 parent 6472021 commit 568304e

10 files changed

Lines changed: 1945 additions & 20 deletions

File tree

AGENTS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
- TypeScript-first; follow shared configs from `@patricktree/config-eslint` and `@patricktree/config-typescript`.
2424
- Format with Prettier
2525
- Prefer `camelCase` for functions/variables, `PascalCase` for types/classes, and lower-case descriptive filenames under `src/`.
26+
- Only disable ESLint rules when there is truly no other viable option; prefer code or config fixes instead.
2627
- Respect each package's module target (CommonJS vs ESM) and keep exports aligned with existing `package.json` fields.
2728

2829
## Testing Guidelines
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
const baseEslintConfig = require('@patricktree/config-eslint/eslint-ecma.cjs');
2+
3+
module.exports = {
4+
...baseEslintConfig,
5+
parserOptions: {
6+
...baseEslintConfig.parserOptions,
7+
tsconfigRootDir: __dirname,
8+
},
9+
ignorePatterns: [...(baseEslintConfig.ignorePatterns || []), '**/bin/browser-tools-cli.js'],
10+
rules: {
11+
...baseEslintConfig.rules,
12+
/* allow for this package to use console logs - is a CLI application */
13+
'no-console': 'off',
14+
},
15+
};

packages/browser-tools/SKILL.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
name: browser-tools
3+
description: A standalone Chrome helper. It launches/inspects DevTools-enabled Chrome profiles, pastes prompts, captures screenshots, and kills stray helper processes.
4+
---
5+
6+
# browser-tools
7+
8+
## Description
9+
10+
A standalone Chrome helper inspired by Mario Zechner’s [“What if you don’t need MCP?”](https://mariozechner.at/posts/2025-11-02-what-if-you-dont-need-mcp/) article. It launches/inspects DevTools-enabled Chrome profiles, pastes prompts, captures screenshots, and kills stray helper processes without needing the full Oracle CLI.
11+
12+
## Usage
13+
14+
`./bin/browser-tools-cli.js`
15+
16+
Common commands include `start --profile`, `nav <url>`, `eval '<js>'`, `screenshot`, `search --content "<query>"`, `content <url>`, `inspect`, and `kill --all --force`
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/usr/bin/env node
2+
3+
try {
4+
await import('../dist/cli.js');
5+
} catch (err) {
6+
if (
7+
err.code === 'ERR_MODULE_NOT_FOUND' &&
8+
err.message.includes('Cannot find package') &&
9+
err.message.includes('dist/cli.js')
10+
) {
11+
throw new Error(
12+
'Could not find JS code to execute! Build this workspace project to fix this.',
13+
{ cause: err },
14+
);
15+
}
16+
throw err;
17+
}
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
{
2+
"name": "@patricktree/browser-tools",
3+
"private": true,
4+
"type": "module",
5+
"exports": {
6+
".": null,
7+
"./*": null
8+
},
9+
"bin": {
10+
"browser-tools": "./bin/browser-tools-cli.js"
11+
},
12+
"files": [
13+
"dist/**",
14+
"!dist/**/*.d.ts.map"
15+
],
16+
"scripts": {
17+
"build": "pnpm run internal:compile",
18+
"dev": "pnpm run build --watch --preserveWatchOutput",
19+
"internal:compile": "tsc -p ./tsconfig.project.json",
20+
"lint": "pnpm run lint:file .",
21+
"lint:file": "eslint --max-warnings 0",
22+
"lint:fix": "pnpm run lint --fix",
23+
"nuke": "pnpm run nuke:artifacts && del-cli node_modules",
24+
"nuke:artifacts": "del-cli dist \"*.tsbuildinfo\""
25+
},
26+
"dependencies": {
27+
"commander": "^14.0.0",
28+
"puppeteer-core": "^23.6.0"
29+
},
30+
"devDependencies": {
31+
"@types/node": "^20"
32+
}
33+
}

0 commit comments

Comments
 (0)