Installation
To install Trusys, use the following command:Verify Installation
To ensure trusys is installed correctly, run:Login
Authenticate with your API Key<your_api_key> with the API key from your workspace. Learn how to create an API Key
Functional Evaluation
-
Run Evaluation with Custom Application and Prompt Library
-
If using custom application
CLI Options Explained
-
--applicationPath
Path to the local custom provider file (JavaScript or Python) that you have implemented. -
--output
Specify an output file for evaluation results.
Supported formats (based on file extension):
.txt,.json,.html,.yaml,.csv -
--cache
Enables response caching to improve performance by reusing successful API responses.
Failed or error responses are not cached, allowing retries and debugging. -
--noCache
Explicitly disables caching for the evaluation run. -
--local
Runs the evaluation entirely locally without uploading results to the Trusys platform.
Security Evaluation
-
Run Red Team Security Evaluation
-
If using custom application
CLI Options Explained
-
--applicationPath
Path to the local custom provider file used to invoke the AI application. -
--output
Specify the output file for security evaluation results. -
--cache
Enables caching of successful responses to speed up security test execution. -
--noCache
Disables caching to ensure every security probe is executed fresh. -
--local
Runs the security evaluation fully locally.
Exit Code
The Trusys CLI returns specific exit codes to help you integrate testing into your CI/CD pipelines and automation workflows. You can access the exit code using the$LASTEXITCODE variable (PowerShell/Windows) or $? (Unix/Linux/Mac).
Exit Code Values
The CLI returns the following exit codes:
0โ All test cases passed successfully with no failures.100โ At least one test case failed. This indicates that your application did not meet the expected evaluation criteria for one or more test cases.1โ An error occurred during execution. This could be due to configuration issues, authentication failures, network errors, or other operational problems unrelated to test case failures.