Command
Options
Path to a directory containing configuration files to use. Can also point to a single configuration file.
If the chat should be verbose and output detailed logging information including internal events and flow execution.
If the chat should be verbose but exclude the prompts and responses for the LLM calls. Automatically enables
--verbose.Simplify the verbose output further.
Enable debug mode which prints rich information about the flows execution. Available levels: WARNING, INFO, DEBUG. Automatically enables
--verbose.If the chat should use the streaming mode, if possible. Requires output rails to have streaming enabled.
If specified, the chat CLI will interact with a server rather than load the config locally. Must also specify
--config-id.The config_id to be used when interacting with the server (required when using
--server-url).Examples
Basic Usage
Start a chat session with default config:config directory in the current folder.
Specify Config Directory
Start chat with a specific config:Verbose Mode
Enable detailed logging:- Internal events
- Flow execution details
- LLM prompts and completions
- Context updates
Verbose Without LLM Details
Show verbose output but hide LLM prompts:Debug Mode
Enable rich debug output:WARNING: Show only warningsINFO: Show informational messages (recommended)DEBUG: Show detailed debug information
Streaming Mode
Enable streaming for real-time responses:Chat with Remote Server
Connect to a running guardrails server:Interactive Commands
While in a chat session, you can use special commands:Colang 1.0
- Type your message and press Enter to chat
- Press Ctrl+C twice to exit
Colang 2.x
- Type your message and press Enter to chat
- Type
!<command>to execute debugger commands - Type
/<event>to send custom events - Press empty Enter to check for async actions
- Press Ctrl+C to exit
Debugger Commands (Colang 2.x)
Custom Events (Colang 2.x)
Send custom events:Configuration Requirements
Colang 1.0
Minimal config.yml:Colang 2.x
Minimal config.yml:Example Session
Streaming Example
Verbose Output Example
Troubleshooting
Config Not Found
Make sure your config directory exists:config.ymlorconfig.yaml- At least one
.cofile (for Colang flows)
Streaming Not Supported
If you get aStreamingNotSupportedError:
- Add to your config.yml:
- Or remove the
--streamingflag
Model Not Found
Ensure your API key is set:Connection Error (Server Mode)
Check if server is running:Advanced Usage
Testing Specific Rails
Create a test config with only specific rails:config.yml
Debugging Flow Execution
Use debug mode to see detailed flow execution:Testing with Mock Data
Set deterministic random seed for testing:Best Practices
- Start Simple: Begin with
--verbose-no-llmto see flow execution without LLM noise - Use Streaming: Enable streaming for better UX when testing long responses
- Debug Incrementally: Use debug levels progressively (INFO → DEBUG)
- Test Rails: Chat is great for testing how rails behave with different inputs
- Use Server Mode: Test against a server to verify production-like behavior