Commands
A full list of the CLI command and its respective help text.
configure
Usage: genaiscript configure [options]
Interactive help to configure providers
Options: -p, --provider <string> Preferred LLM provider aliases (choices: "openai", "azure", "azure_serverless", "azure_serverless_models", "github", "ollama", "anthropic", "anthropic_bedrock", "google", "huggingface", "mistral", "alibaba", "deepseek", "transformers", "lmstudio", "jan", "llamafile", "litellm", "whisperasr") -h, --help display help for command
run
Usage: genaiscript run [options] <script> [files...]
Runs a GenAIScript against files.
Options: -p, --provider <string> Preferred LLM provider aliases (choices: "openai", "azure", "azure_serverless", "azure_serverless_models", "github", "ollama", "anthropic", "anthropic_bedrock", "google", "huggingface", "mistral", "alibaba", "deepseek", "transformers", "lmstudio", "jan", "llamafile", "litellm", "whisperasr") -m, --model <string> 'large' model alias (default) -sm, --small-model <string> 'small' alias model -vm, --vision-model <string> 'vision' alias model -ma, --model-alias <nameid...> model alias as name=modelid -re, --reasoning-effort <string> Reasoning effort for o* models (choices: "high", "medium", "low") -lp, --logprobs enable reporting token probabilities -tlp, --top-logprobs <number> number of top logprobs (1 to 5) -ef, --excluded-files <string...> excluded files -egi, --exclude-git-ignore exclude files that are ignored through the .gitignore file in the workspace root -ft, --fallback-tools Enable prompt-based tools instead of builtin LLM tool calling builtin tool calls -o, --out <string> output folder. Extra markdown fields for output and trace will also be generated -rmo, --remove-out remove output folder if it exists -ot, --out-trace <string> output file for trace -oo, --out-output <string> output file for output -od, --out-data <string> output file for data (.jsonl/ndjson will be aggregated). JSON schema information and validation will be included if available. -oa, --out-annotations <string> output file for annotations (.csv will be rendered as csv, .jsonl/ndjson will be aggregated) -ocl, --out-changelog <string> output file for changelogs -pr, --pull-request <number> pull request identifier -prc, --pull-request-comment [string] create comment on a pull request with a unique id (defaults to script id) -prd, --pull-request-description [string] create comment on a pull request description with a unique id (defaults to script id) -prr, --pull-request-reviews create pull request reviews from annotations -tm, --teams-message Posts a message to the teams channel -j, --json emit full JSON response to output -y, --yaml emit full YAML response to output -fe, --fail-on-errors fails on detected annotation error -r, --retry <number> number of retries (default: "10") -rd, --retry-delay <number> minimum delay between retries (default: "1000") -md, --max-delay <number> maximum delay between retries (default: "10000") -l, --label <string> label for the run -t, --temperature <number> temperature for the run -tp, --top-p <number> top-p for the run -mt, --max-tokens <number> maximum completion tokens for the run -mdr, --max-data-repairs <number> maximum data repairs -mtc, --max-tool-calls <number> maximum tool calls for the run -se, --seed <number> seed for the run -em, --embeddings-model <string> embeddings model for the run -c, --cache enable LLM result cache -cn, --cache-name <name> custom cache file name -cs, --csv-separator <string> csv separator (default: "\t") -ff, --fence-format <string> fence format (choices: "xml", "markdown", "none") -ae, --apply-edits apply file edits --vars <namevalue...> variables, as name=value, stored in env.vars. Use environment variables GENAISCRIPT_VAR_name=value to pass variable through the environment -rr, --run-retry <number> number of retries for the entire run --no-run-trace disable automatic trace generation -h, --help display help for command
test
Usage: genaiscript test|eval [options] [command]
Options: -h, --help display help for command
Commands: run [options] [script...] Runs the tests for scripts list [options] List available tests in workspace view Launch test viewer help [command] display help for command
test run
Usage: genaiscript test run [options] [script...]
Runs the tests for scripts
Arguments: script Script ids. If not provided, all scripts are tested
Options: --redteam run red team tests -p, --provider <string> Preferred LLM provider aliases (choices: "openai", "azure", "azure_serverless", "azure_serverless_models", "github", "ollama", "anthropic", "anthropic_bedrock", "google", "huggingface", "mistral", "alibaba", "deepseek", "transformers", "lmstudio", "jan", "llamafile", "litellm", "whisperasr") -m, --model <string> 'large' model alias (default) -sm, --small-model <string> 'small' alias model -vm, --vision-model <string> 'vision' alias model -ma, --model-alias <nameid...> model alias as name=modelid -re, --reasoning-effort <string> Reasoning effort for o* models (choices: "high", "medium", "low") --models <models...> models to test where mode is the key value pair list of m (model), s (small model), t (temperature), p (top-p) -o, --out <folder> output folder -rmo, --remove-out remove output folder if it exists --cli <string> override path to the cli -td, --test-delay <string> delay between tests in seconds --cache enable LLM result cache -v, --verbose verbose output -pv, --promptfoo-version [version] promptfoo version, default is 0.104.0 -os, --out-summary <file> append output summary in file -g, --groups <groups...> groups to include or exclude. Use :! prefix to exclude -h, --help display help for command
test list
Usage: genaiscript test list [options]
List available tests in workspace
Options: --redteam list red team tests -g, --groups <groups...> groups to include or exclude. Use :! prefix to exclude -h, --help display help for command
test view
Usage: genaiscript test view [options]
Launch test viewer
Options: -h, --help display help for command
convert
Usage: genaiscript convert [options] <script> [files...]
Converts file through a GenAIScript. Each file is processed separately throughthe GenAIScript and the LLM output is saved to a <filename>.genai.md (or customsuffix).
Options: -s, --suffix <string> suffix for converted files -rw, --rewrite rewrite input file with output (overrides suffix) -cw, --cancel-word <string> cancel word which allows the LLM to notify to ignore output -ef, --excluded-files <string...> excluded files -egi, --exclude-git-ignore exclude files that are ignored through the .gitignore file in the workspace root -m, --model <string> 'large' model alias (default) -sm, --small-model <string> 'small' alias model -vm, --vision-model <string> 'vision' alias model -ma, --model-alias <nameid...> model alias as name=modelid -ft, --fallback-tools Enable prompt-based tools instead of builtin LLM tool calling builtin tool calls -o, --out <string> output folder. Extra markdown fields for output and trace will also be generated --vars <namevalue...> variables, as name=value, stored in env.vars. Use environment variables GENAISCRIPT_VAR_name=value to pass variable through the environment -c, --cache enable LLM result cache -cn, --cache-name <name> custom cache file name -cc, --concurrency <number> number of concurrent conversions -h, --help display help for command
scripts
Usage: genaiscript scripts|script [options] [command]
Utility tasks for scripts
Options: -h, --help display help for command
Commands: list [options] [script...] List all available scripts in workspace create <name> Create a new script fix fix all definition files compile [folders...] Compile all scripts in workspace model [options] [script] List model connection information for scripts help [command] display help for command
scripts list
Usage: genaiscript scripts list [options] [script...]
List all available scripts in workspace
Arguments: script Script ids
Options: -g, --groups <groups...> groups to include or exclude. Use :! prefix to exclude -h, --help display help for command
scripts create
Usage: genaiscript scripts create [options] <name>
Create a new script
Arguments: name Name of the script
Options: -h, --help display help for command
scripts fix
Usage: genaiscript scripts fix [options]
fix all definition files
Options: -h, --help display help for command
scripts compile
Usage: genaiscript scripts compile [options] [folders...]
Compile all scripts in workspace
Arguments: folders Pattern to match files
Options: -h, --help display help for command
scripts model
Usage: genaiscript scripts model [options] [script]
List model connection information for scripts
Arguments: script Script id or file
Options: -t, --token show token -h, --help display help for command
cache
Usage: genaiscript cache [options] [command]
Cache management
Options: -h, --help display help for command
Commands: clear [name] Clear cache help [command] display help for command
cache clear
Usage: genaiscript cache clear [options] [name]
Clear cache
Arguments: name Name of the cache, tests
Options: -h, --help display help for command
video
Usage: genaiscript video [options] [command]
Video tasks
Options: -h, --help display help for command
Commands: probe <file> Probes metadata from a video/audio file extract-audio [options] <file> Transcode video/audio file extract-frames [options] <file> Extract video frames help [command] display help for command
video probe
Usage: genaiscript video probe [options] <file>
Probes metadata from a video/audio file
Arguments: file Audio or video file to inspect
Options: -h, --help display help for command
video extract-audio
Usage: genaiscript video extract-audio [options] <file>
Transcode video/audio file
Arguments: file Audio or video file to transcode
Options: -t, --transcription Convert audio for speech-to-text -h, --help display help for command
video extract-frames
Usage: genaiscript video extract-frames [options] <file>
Extract video frames
Arguments: file Audio or video file to transcode
Options: -k, --keyframes Extract only keyframes (intra frames) -st, --scene-threshold <number> Extract frames with a minimum threshold -c, --count <number> maximum number of frames to extract -s, --size <string> size of the output frames wxh -f, --format <string> Image file format -h, --help display help for command
retrieval
Usage: genaiscript retrieval|retreival [options] [command]
RAG support
Options: -h, --help display help for command
Commands: search [options] <query> [files...] Search using vector embeddings similarity fuzz [options] <query> [files...] Search using string distance help [command] display help for command
retrieval search
Usage: genaiscript retrieval search [options] <query> [files...]
Search using vector embeddings similarity
Options: -ef, --excluded-files <string...> excluded files -tk, --top-k <number> maximum number of results -h, --help display help for command
retrieval fuzz
Usage: genaiscript retrieval fuzz [options] <query> [files...]
Search using string distance
Options: -ef, --excluded-files <string...> excluded files -tk, --top-k <number> maximum number of results -h, --help display help for command
serve
Usage: genaiscript serve [options]
Start a GenAIScript local server
Options: -p, --port <number> Specify the port number, default: 8003 -k, --api-key <string> API key to authenticate requests -n, --network Opens server on 0.0.0.0 to make it accessible on the network -c, --cors <string> Enable CORS and sets the allowed origin. Use '*' to allow any origin. --remote <string> Remote repository URL to serve --remote-branch <string> Branch to serve from the remote --remote-force Force pull from remote repository --remote-install Install dependencies from remote repository --dispatch-progress Dispatch progress events to all clients -h, --help display help for command
parse
Usage: genaiscript parse|parsers [options] [command] <file...>
Parse various outputs
Arguments: file input JSONL files
Options: -h, --help display help for command
Commands: data [options] <file> Convert CSV, YAML, TOML, INI, XLSX, XML, MD/X frontmatter or JSON data files into various formats fence <language> <file> Extracts a code fenced regions of the given type pdf [options] <file> Parse a PDF into text and images docx [options] <file> Parse a DOCX into texts html-to-text <file> Parse an HTML file into text code <file> [query] Parse code using tree sitter and executes a query tokens [options] <files...> Count tokens in a set of files jsonl2json Converts JSONL files to a JSON file prompty [options] <file...> Converts .prompty files to genaiscript jinja2 [options] <file> Renders Jinj2 or prompty template secrets <file...> Applies secret scanning and redaction to files
parse data
Usage: genaiscript parse data [options] <file>
Convert CSV, YAML, TOML, INI, XLSX, XML, MD/X frontmatter or JSON data filesinto various formats
Options: -f, --format <string> output format (choices: "json", "json5", "yaml", "ini", "csv", "md") -h, --help display help for command
parse fence
Usage: genaiscript parse fence [options] <language> <file>
Extracts a code fenced regions of the given type
Options: -h, --help display help for command
parse pdf
Usage: genaiscript parse pdf [options] <file>
Parse a PDF into text and images
Options: -i, --images extract images -o, --out <string> output folder -h, --help display help for command
parse docx
Usage: genaiscript parse docx [options] <file>
Parse a DOCX into texts
Options: -f, --format <string> output format (choices: "markdown", "html", "text") -h, --help display help for command
parse html-to-text
Usage: genaiscript parse html-to-text [options] <file>
Parse an HTML file into text
Options: -h, --help display help for command
parse code
Usage: genaiscript parse code [options] <file> [query]
Parse code using tree sitter and executes a query
Options: -h, --help display help for command
parse tokens
Usage: genaiscript parse tokens [options] <files...>
Count tokens in a set of files
Options: -ef, --excluded-files <string...> excluded files -h, --help display help for command
parse jsonl2json
Usage: genaiscript parse jsonl2json [options]
Converts JSONL files to a JSON file
Options: -h, --help display help for command
parse prompty
Usage: genaiscript parse prompty [options] <file...>
Converts .prompty files to genaiscript
Arguments: file input JSONL files
Options: -o, --out <string> output folder -h, --help display help for command
parse jinja2
Usage: genaiscript parse jinja2 [options] <file>
Renders Jinj2 or prompty template
Arguments: file input Jinja2 or prompty template file
Options: --vars <namevalue...> variables, as name=value passed to the template -h, --help display help for command
parse secrets
Usage: genaiscript parse secrets [options] <file...>
Applies secret scanning and redaction to files
Arguments: file input files
Options: -h, --help display help for command
info
Usage: genaiscript info [options] [command]
Utility tasks
Options: -h, --help display help for command
Commands: help Show help for all commands system Show system information env [options] [provider] Show .env information
info help
Usage: genaiscript info help [options]
Show help for all commands
Options: -h, --help display help for command
info system
Usage: genaiscript info system [options]
Show system information
Options: -h, --help display help for command
info env
Usage: genaiscript info env [options] [provider]
Show .env information
Options: -t, --token show token -e, --error show errors -m, --models show models if possible -h, --help display help for command
models
Usage: genaiscript models [options] [command]
Options: -h, --help display help for command
Commands: list [provider] List all available models alias Show model alias mapping help [command] display help for command
models list
Usage: genaiscript models list [options] [provider]
List all available models
Options: -h, --help display help for command
models alias
Usage: genaiscript models alias [options]
Show model alias mapping
Options: -h, --help display help for command