Installation
The CLI is automatically installed with NeMo Guardrails:Available Commands
View all available commands:chat
Start an interactive chat session with your guardrails configuration.Basic Usage
Options
Path to a directory containing configuration files or a single configuration file.
Enable detailed logging information including LLM calls.
Enable verbose output but exclude prompts and responses for LLM calls.
Simplify the verbose output further.
Enable debug mode with rich flow execution information. Available levels:
WARNING, INFO, DEBUG.Enable streaming mode for token-by-token responses.
If specified, the chat CLI will interact with a server instead of loading the config locally.
The config_id to use when interacting with a server (required with
--server-url).Interactive Commands
When in a chat session, you can use special commands: Colang 2.x Commands:- Press
Ctrl+Ctwice to quit - Press
Enterwith empty input to check for pending async actions (Colang 2.x)
Examples
Enable verbose mode to see internal processing
- Canonical form detection
- Flow execution
- LLM prompts and completions
- Rail activations
server
Start a NeMo Guardrails REST API server.Basic Usage
Options
Path to a directory containing multiple configuration sub-folders.
The port that the server should listen on.
The default configuration to use when no config is specified in requests.
Enable verbose logging including prompts.
Disable the web-based Chat UI.
Enable automatic reloading when configuration files change.
A prefix to add to all server paths (must start with ’/’).
Examples
Start server on custom port
Enable auto-reload for development
API-only mode (no UI)
eval
Run evaluation tasks on your guardrails configuration.Basic Usage
The
eval command is part of the evaluation framework. See the evaluation documentation for detailed usage.Common Evaluation Types
actions-server
Start a dedicated actions server for remote action execution.Basic Usage
Options
The port that the actions server should listen on.
Use Case
The actions server allows you to:- Run custom Python actions remotely
- Separate action execution from the main guardrails server
- Scale action execution independently
config.yml
convert
Convert Colang files from older versions to the latest version.Basic Usage
Options
The path to the file or directory to migrate.
The version to migrate from. Available:
1.0, 2.0-alpha.Enable verbose logging.
Validate the output using the Colang parser.
Use the active decorator in the migrated code.
Add a main flow to the migrated configuration.
find-providers
List and interactively select LLM providers.Basic Usage
Options
Just list all available providers without interactive selection.
Interactive Mode
When run without--list, the command provides an interactive interface:
- Select provider type: Type to filter between “text completion” and “chat completion”
- Select provider: Type to filter through available providers
- Navigate: Use arrow keys to navigate, Tab to autocomplete, Enter to select
Common Workflows
Development Workflow
Testing Workflow
Deployment Workflow
Environment Variables
The CLI respects standard environment variables:Troubleshooting
Command Not Found
Ensure NeMo Guardrails is installed:Configuration Not Loading
Verify the path exists and contains valid files:Streaming Not Working
Enable streaming in configuration:config.yml
Port Already in Use
Change the port:Next Steps
Python API
Use guardrails programmatically
Server Guide
Deploy guardrails as a REST API
Configuration
Configure your guardrails
Evaluation
Test and evaluate your guardrails