npx agentspec-cli install 83678002-a23d-4f0c-8856-3778e2cca5b5 --file-type cursorrules→ .cursor/rules/
<!-- Canonical source: AGENTS.md — keep this file in sync --> # dollar-shell — AI Agent Rules ## Project identity dollar-shell is a micro-library for running OS and shell commands from JavaScript/TypeScript using template tag functions. Works in Node, Deno, and Bun with the same API. All streams are web streams. The npm package name is `dollar-shell`. ## Critical rules - **ESM-only.** The project is `"type": "module"`. Use `import`/`export` syntax. - **No transpilation.** Code runs directly in all target runtimes. - **No runtime dependencies.** Never add packages to `dependencies`. Only `devDependencies` are allowed. - **Do not modify or delete test expectations** without understanding why they changed. - **Do not add comments or remove comments** unless explicitly asked. - **Keep `src/index.js` and `src/index.d.ts` in sync.** All public API is exported from `src/index.js` and typed in `src/index.d.ts`. ## Code style - Prettier: 100 char width, single quotes, no bracket spacing, no trailing commas, arrow parens "avoid" (see `.prettierrc`). - 2-space indentation. - Imports at top of file, using `import` syntax. - No semicolons — follow existing patterns. ## Architecture quick reference - `src/index.js` is the main entry point. It dynamically imports the correct `spawn` implementation (Node/Deno/Bun) and the correct `shell` implementation (Unix/Windows) at import time. - All tag functions (`$`, `$$`, `$sh`, `shell`) are built by factory functions in `bq-spawn.js` and `bq-shell.js`. - Calling a tag function with an options object returns a new tag function with updated defaults while preserving `.from`, `.to`, `.io`, `.through` properties. - `raw()` wraps a value to bypass escaping (shell) or argument splitting (spawn). - `isWindows` boolean is exported. Runtime detection (Node/Deno/Bun) happens at import via dynamic imports. ## Verification commands - `npm test` — run the full test suite (tape-six) - `node tests/test-<name>.js` — run a single test file directly - `npm run test:bun` — run with Bun - `npm run test:deno` — run with Deno - `npm run ts-check` — TypeScript type checking (`tsc --noEmit`) - `npm run ts-test` — run `.ts` test files with tape6 - `npm run lint` — Prettier format check ## File layout - Entry point: `src/index.js` + `src/index.d.ts` - Tag factories: `src/bq-spawn.js` (spawn-based), `src/bq-shell.js` (shell-based) - Utilities: `src/utils.js` (raw, isWindows, winCmdEscape, etc.) - Spawn implementations: `src/spawn/node.js`, `src/spawn/deno.js`, `src/spawn/bun.js` - Shell implementations: `src/shell/unix.js`, `src/shell/windows.js` - Tests: `tests/` (automated, tape-six: `.js`, `.cjs`, `.ts`), `tests/manual/` (manual verification) - Wiki docs: `wiki/` (git submodule) ## When reading the codebase - Start with `AGENTS.md` for full setup, commands, and architecture. - `src/index.d.ts` is the best API reference for the public API. - Wiki markdown files in `wiki/` contain detailed usage docs. - `src/index.js`, `src/bq-spawn.js`, and `src/bq-shell.js` are the core modules — read them first.
nano-benchmark — AI Agent Rules
nano-benchmark is an ESM JavaScript package providing command-line utilities (`nano-bench`, `nano-watch`) for micro-benchmarking code with proper nonparametric statistics and significance testing. Node.js 20+, Bun, Deno. The `src/` modules (stats, significance tests, streaming counters) are internal — the user-facing surface is the two CLI tools in `bin/`.
by AgentHub Crawler
nano-binary-search — AI Agent Rules
nano-binary-search is a single-function binary search (lower bound) for JavaScript. Zero dependencies, single file. Equivalent to C++ `std::lower_bound` / Python `bisect.bisect_left`.
by AgentHub Crawler
console-toolkit — AI Agent Rules
console-toolkit is a zero-dependency ESM JavaScript library for rich CLI/TUI output: styled text, boxes, panels, tables, charts, plots, turtle graphics, and spinners. Node.js 20+, Bun, Deno.
by AgentHub Crawler
Sign in to leave a comment.
Patterns
Use `agent-browser` for web automation. Run `agent-browser --help` for all commands. 1. `agent-browser open <url>` - Navigate to page 2. `agent-browser snapshot -i` - Get interactive elements with refs (@e1, @e2)
by AgentHub Crawler