CLI Reference
Command-line interface reference for poly-bench
Loading...
poly-bench includes commands for validation, compilation, execution, project setup, dependency management, cache management, formatting, and editor integration.
| Command | Description |
|---|---|
poly-bench check <file> | Parse and validate a .bench file |
poly-bench compile [file] | Compile-check benchmarks without running |
poly-bench cache <stats|clear|clean> | Inspect or manage compile cache/workspace |
poly-bench run [file] | Execute benchmarks |
poly-bench codegen <file> | Generate runtime code without running |
poly-bench fmt [files...] | Format .bench files |
poly-bench init [name] | Initialize a new project |
poly-bench new <name> | Create a new benchmark template |
poly-bench add | Add language dependencies |
poly-bench remove | Remove language dependencies |
poly-bench install | Install dependencies from polybench.toml |
poly-bench build | Build/regenerate runtime environment |
poly-bench upgrade | Upgrade to latest binary |
poly-bench lsp | Start the language server |
poly-bench runExecute benchmarks from a .bench file, or run all files in benchmarks/ when no file is provided.
$poly-bench run [OPTIONS] [FILE]| Option | Description |
|---|---|
--lang <LANG> | Restrict language: go, ts/typescript, rust/rs |
--iterations <N> | Override iteration count |
--report <FORMAT> | console (default), markdown, json |
--output <DIR> / -o <DIR> | Output directory for reports/charts |
--go-project <DIR> | Explicit Go project root (go.mod) |
--ts-project <DIR> | Explicit TS project root (package.json/node_modules) |
$poly-bench run benchmarks/hash.bench \$--lang go \$--report json \$--output out/out/results.json after each run.poly-bench checkParse and validate a benchmark DSL file.
$poly-bench check <FILE> [--show-ast]poly-bench compileCompile-check benchmarks without running them.
$poly-bench compile [FILE] [--lang <LANG>] [--no-cache] [--clear-cache]| Option | Description |
|---|---|
--lang <LANG> | Compile-check only one language (go, ts, typescript, rust, rs) |
--no-cache | Disable compile-result cache for this run |
--clear-cache | Clear cache before compiling |
compile in CI to catch embedded-language errors before benchmark execution.poly-bench cacheManage compile cache and workspace state.
$poly-bench cache stats$poly-bench cache clear$poly-bench cache clean| Subcommand | Description |
|---|---|
stats | Show cache statistics and workspace size |
clear | Clear compile cache entries |
clean | Clean entire .polybench/ workspace |
poly-bench codegenGenerate code from DSL without running.
$poly-bench codegen <FILE> --lang <LANG> --output <DIR>LANG supports go, ts/typescript, rust/rs.
poly-bench fmtFormat benchmark files.
$poly-bench fmt [FILES...] [--write]| Option | Description |
|---|---|
--write / -w | Write formatted content back to files (otherwise prints to stdout) |
poly-bench init$poly-bench init [NAME] [--languages go,ts,rust] [--no-example]poly-bench new$poly-bench new <NAME>poly-bench add$poly-bench add --go <PKG>$poly-bench add --ts <PKG>$poly-bench add --rs <CRATE> [--features <F1,F2,...>]poly-bench remove$poly-bench remove --go <PKG>$poly-bench remove --ts <PKG>$poly-bench remove --rs <CRATE>poly-bench install$poly-bench installpoly-bench build$poly-bench build [--force] [--skip-install]poly-bench lsp$poly-bench lsppoly-bench upgrade$poly-bench upgrade| Option | Description |
|---|---|
--version, -V, -v | Print version and exit |
--color <WHEN> | Color mode: auto, always, never |
--quiet, -q | Reduce log output |
--help, -h | Show help |