Lines 215-255javascript
216 .command('playground')
217 .description('Launch the web-based playground for browsing experiment results')
218 .option('--port <port>', 'HTTP server port', '3000')
219 .option('--results-dir <dir>', 'Path to results directory', './results')
220 .option('--evals-dir <dir>', 'Path to evals directory', './evals')
221 .option('--watch', 'Enable live mode — watch results directory for changes')
222 .action(async (options) => {
223 const resultsDir = resolve(process.cwd(), options.resultsDir);
224 const evalsDir = resolve(process.cwd(), options.evalsDir);
225 console.log(chalk.blue('Starting Agent Eval Playground...'));
226 // Build args for the playground CLI
227 const playgroundArgs = [
228 '--results-dir', resultsDir,
229 '--evals-dir', evalsDir,
230 '--port', options.port,
233 playgroundArgs.push('--watch');
235 // Try to run the playground package directly, fall back to npx
236 const result = spawnSync('npx', ['@vercel/agent-eval-playground', ...playgroundArgs], { stdio: 'inherit', cwd: process.cwd() });
237 process.exit(result.status ?? 1);
HighRuntime Package Install
Package source invokes a package manager install command at runtime.
dist/cli.jsView on unpkg · L235 240 * Run-all handler: discover and run all experiments with fingerprint reuse
241 * and classification. Used by both `run-all` subcommand and the default
242 * (no-args) invocation.
244async function runAllCommand(experimentArgs, options) {
246 const projectDir = process.cwd();
247 const experimentsDir = resolve(projectDir, 'experiments');
248 const evalsDir = resolve(projectDir, 'evals');
249 const resultsDir = resolve(projectDir, 'results');
250 if (!existsSync(experimentsDir)) {
251 console.error(chalk.red('experiments/ directory not found'));
254 if (!existsSync(evalsDir)) {
255 console.error(chalk.red('evals/ directory not found'));