Reference Documentation
Complete technical reference for clinvk commands, configuration, and APIs.
Overview
This reference section provides detailed documentation for all clinvk features, options, and behaviors. Use this section when you need precise information about specific commands, configuration options, or API endpoints.
How to Use This Reference
- CLI Commands: Look up specific commands for syntax, flags, and examples
- Configuration: Find all available configuration options and their defaults
- Environment Variables: Discover environment-based configuration options
- Exit Codes: Understand program exit codes for scripting
- API Reference: Integrate clinvk with your applications
Quick Navigation
| Section |
Description |
Use When... |
| CLI Commands |
Command-line interface reference |
You need command syntax or flags |
| Configuration |
Configuration file options |
Setting up or modifying config |
| Environment Variables |
Environment-based settings |
Configuring via environment |
| Exit Codes |
Program exit codes |
Writing scripts with clinvk |
| API Reference |
HTTP API documentation |
Integrating with applications |
CLI Commands Overview
Configuration Priority
Configuration values are resolved in this order (highest to lowest priority):
- CLI Flags - Command-line arguments override everything
- Environment Variables -
CLINVK_* variables
- Config File -
~/.clinvk/config.yaml
- Defaults - Built-in default values
# Example: CLI flag wins over environment variable
export CLINVK_BACKEND=codex
clinvk -b claude "prompt" # Uses claude, not codex
Common Flags Reference
These flags work across most commands:
| Flag |
Short |
Description |
Example |
--backend |
-b |
Backend to use |
-b codex |
--model |
-m |
Model override |
-m o3-mini |
--workdir |
-w |
Working directory |
-w ./project |
--output-format |
-o |
Output format |
-o json |
--config |
|
Custom config path |
--config /path/to/config.yaml |
--dry-run |
|
Show command only |
--dry-run |
--help |
-h |
Show help |
-h |
Backends Reference
| Backend |
Binary |
Default Model |
Best For |
| Claude |
claude |
Backend default |
Complex reasoning, code review |
| Codex |
codex |
Backend default |
Quick coding tasks |
| Gemini |
gemini |
Backend default |
General assistance |
| Format |
Description |
Best For |
text |
Plain text output |
Human reading |
json |
Structured JSON |
Scripting, parsing |
stream-json |
Streaming JSON events |
Real-time processing |
API Compatibility
clinvk provides three API styles for integration:
| API Style |
Endpoint Prefix |
Best For |
| Native REST |
/api/v1/ |
Full clinvk features |
| OpenAI Compatible |
/openai/v1/ |
OpenAI SDK users |
| Anthropic Compatible |
/anthropic/v1/ |
Anthropic SDK users |
Getting Help
- Use
--help with any command for quick reference
- Check Troubleshooting for common issues
- See FAQ for frequently asked questions