onetool¶
Exposes a single run tool that executes Python code. Your agent writes code; OneTool runs it.
Usage¶
Options¶
| Option | Description |
|---|---|
-c, --config PATH |
Path to onetool.yaml configuration file |
-v, --version |
Show version and exit |
Commands¶
init¶
Initialize and manage global configuration in ~/.onetool/.
Running onetool init without a subcommand creates the global config directory.
| Subcommand | Description |
|---|---|
validate |
Validate config and show status |
reset |
Reset global config to default templates |
init (default)¶
Creates the global config directory and copies template files if they don't already exist.
init validate¶
Validates configuration files and displays status including packs, secrets (names only), snippets, aliases, and MCP servers.
init reset¶
Resets config files in ~/.onetool/ to fresh templates. Prompts for each existing file before overwriting, with option to create backups. Backups are named file.bak, file.bak.1, file.bak.2, etc.
Examples¶
Configuration¶
Configuration files: .onetool/config/onetool.yaml (project) or ~/.onetool/config/onetool.yaml (global)
See onetool Configuration for full schema reference.
Quick Setup¶
Environment Variables¶
| Variable | Description |
|---|---|
ONETOOL_CONFIG |
Config file path override |
OT_LOG_LEVEL |
Log level (DEBUG/INFO/WARNING/ERROR) |
OT_LOG_DIR |
Log directory path |
How It Works¶
- Loads tools from
src/ot_tools/via AST-based discovery - Exposes a single
runtool that executes Python code - Communicates via stdio using the MCP protocol
Tool Discovery¶
Tools are discovered statically from tools_dir patterns in config:
Benefits: - No code execution during discovery - Instant startup - Hot reload support