CLI Commands & NPM Scripts
Relevant source files
The following files were used as context for generating this wiki page:
Introduction
The Abee (SynthCrowd) project utilizes a variety of NPM scripts and CLI commands to manage its multi-stage pipeline, which includes customer profile interpretation, population generation, autonomous browser agent execution, and code optimization loops. These scripts facilitate both development workflows and the execution of comprehensive validation suites to ensure persona fidelity and system reliability.
The project is divided into two primary environments: the core engine (root directory) and a demonstration website (demo-website). Each environment maintains its own set of scripts for building, testing, and local development.
Sources: package.json:1-15, README.md:1-10, demo-website/package.json:1-10
Core Engine Scripts
The root package.json contains scripts for compiling the TypeScript codebase and running specific segments of the testing pipeline. These scripts primarily leverage tsx for direct execution of TypeScript files or tsc for building the production distribution.
Build and Development
The engine uses standard TypeScript compilation and Convex for its backend services.
| Script | Command | Description |
|---|---|---|
build | tsc | Compiles the TypeScript source code into the dist/ directory. |
dev | npx convex dev | Starts the Convex development server for real-time database operations. |
Sources: package.json:7, package.json:14, README.md:281-283
Testing and Validation Pipeline
A significant portion of the CLI interaction involves executing test scripts that exercise different parts of the Abee pipeline.
| Script | Command | Purpose |
|---|---|---|
test:pipeline | npx tsx src/test-pipeline.ts | Tests the persona engine (NL input to compiled personas) without launching browsers. |
test:population | npx tsx src/test-population.ts | Validates population generation and Gaussian variance logic. |
test:agent | npx tsx src/test-agent.ts | Runs a single browser agent (e.g., "Grandma" persona) on a target site. |
test:agent:techbro | npx tsx src/test-agent-techbro.ts | Runs a specialized "Tech Bro" agent to test persona-specific browsing behavior. |
test:full | npx tsx src/test-full-pipeline.ts | Executes the complete pipeline including reporting and Convex streaming. |
test:parallel | npx tsx src/test-parallel.ts | Tests batched parallel execution of multiple agents. |
Sources: package.json:8-13, README.md:265-279
Execution Flow of Test Scripts
The following diagram illustrates how a typical full pipeline test script (e.g., test:full) orchestrates internal engine modules:
This flow represents the automated execution sequence when triggered via the CLI.
Sources: src/test-full-pipeline.ts:6-20, src/test-smoke.ts:25-90
Demo Website Scripts
The demo-website directory contains its own package.json focused on the frontend development and local testing of the target site used for optimization demos.
Development and Build
The demo site uses Vite for modern web development and Vitest for unit testing.
| Script | Command | Description |
|---|---|---|
dev | vite | Starts the local development server with HMR and instant preview. |
build | vite build | Builds the demo application for production. |
preview | vite preview | Previews the production build locally. |
lint | eslint . | Runs ESLint to check for code quality and style issues. |
Sources: demo-website/package.json:5-10, demo-website/README.md:32-34
Testing
The demo website includes unit and watch-mode testing capabilities.
| Script | Command | Description |
|---|---|---|
test | vitest run | Runs the test suite once. |
test:watch | vitest | Runs the test suite in interactive watch mode. |
Sources: demo-website/package.json:11-12
Infrastructure & Environment Setup
Before running CLI commands, certain environment variables and prerequisites must be configured.
Prerequisites and Setup Commands
- Clone and Install:
git clone <repo-url> npm install - Environment Configuration: Users must create a
.envfile withANTHROPIC_API_KEYandBROWSER_USE_API_KEY. - External Dependencies: Running agent tests requires the
browser-use-sdk.
Sources: README.md:250-261, src/test-smoke.ts:16-23
Tool Integration via CLI
The project integrates several third-party tools that are initialized during the execution of CLI-driven smoke tests:
The smoke test verifies that all 7 integrated tools (Anthropic, Browser Use, Convex, Laminar, HUD, Daytona, and MongoDB) are responsive.
Sources: src/test-smoke.ts:11-150
Summary
The CLI interface of Abee provides developers with granular control over the synthetic testing lifecycle. By utilizing a modular script architecture in package.json, users can validate individual components like the Population Generator or execute the Full Pipeline to see real-time agent navigation and automated reporting. The separation between core engine scripts and the demo-website scripts ensures that the target environment can be developed and audited independently before being subjected to synthetic user testing.