CLI
The Condor CLI is a powerful tool for testing APIs and automating workflows. This reference provides a detailed overview of the available commands and their options.
Command: condor
The main condor
command provides access to all subcommands and flags.
Usage
condor [flags]condor [command]
Flags
-h, --help
: Display help information for Condor.-v, --version
: Show the current version of Condor.
Available Commands
completion
: Generate autocompletion scripts for various shells.convert
: Convert collections from other formats (e.g., OpenAPI, Swagger) to Condor format.format
: Format your Condor files.run
: Run your tests.repl
: Start a basic expression REPL for Condor.help
: Display help information about any command.
Command: condor run
The condor run
command is used to execute tests from a specified file or directory.
Usage
condor run [path] [flags]
Flags
-
-f, --format string
: Output format. Options include:pretty
(default): User-friendly output with clear visuals.debug
: Detailed debug information.json
: Outputs results in JSON format for integrations.events
: Streams events in a structured format.
Example:
Terminal window condor run tests/ --format json -
-l, --level string
: Log verbosity level. Options include:debug
: Most detailed output for troubleshooting.info
: General information about the test run.warn
(default): Warnings and above.error
: Errors only.
Example:
Terminal window condor run tests/ --level debug
Command: condor repl
The condor repl
command starts a basic interactive read-eval-print loop for evaluating expressions and testing Condor functions. This does not yet support evaluating test blocks, request blocks, or anything other than standard expressions.
Usage
condor repl [flags]
Flags
-h, --help
: Display help information for therepl
command.
Global Flags
-f, --format string
: Output format (default:pretty
).-l, --level string
: Log verbosity level (default:warn
).
Examples:
$ condor replcondor> list::length(["a", "b", "c"])3condor> type::number("123.45")123.45condor> quit
$ echo 'list::length(["a", "b", "c"])' | condor repl3
Command: condor completion
The condor completion
command generates autocompletion scripts for various shells.
Usage
condor completion [command]
Available Subcommands
bash
: Generate an autocompletion script for Bash.fish
: Generate an autocompletion script for Fish.powershell
: Generate an autocompletion script for PowerShell.zsh
: Generate an autocompletion script for Zsh.
Flags
-h, --help
: Display help information for thecompletion
command.
Example:
condor completion bash > ~/.bash_completionsource ~/.bash_completion
Command: condor convert
The condor convert
command converts collections from other formats (e.g., OpenAPI, Swagger) to Condor format.
Usage
condor convert source [destination dir:./collection/resources] [flags]
Flags
-h, --help
: Display help information for theconvert
command.
Global Flags
-f, --format string
: Output format (default:pretty
).-l, --level string
: Log verbosity level (default:warn
).
Example:
condor convert openapi.yaml ./collection/resources
Command: condor format
The condor format
command formats Condor files to ensure consistency and readability.
Usage
condor format [path] [flags]
Flags
-c, --check
: Check only, don’t write formatted files.-h, --help
: Display help information for theformat
command.
Global Flags
-f, --format string
: Output format (default:pretty
).-l, --level string
: Log verbosity level (default:warn
).
Example:
condor format ./collection/tests --check
For more information about using the Condor CLI, refer to other sections of this documentation or the Writing Tests guide.