- providers.py: Provider abstraction with mock support - tool.py: Tool loading, saving, and wrapper script generation - runner.py: Tool execution engine with prompt building - ui.py: Dialog-based UI for tool management - cli.py: CLI entry point with list/create/edit/delete/test commands ~430 lines of Python as designed. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> |
||
|---|---|---|
| docs | ||
| src/smarttools | ||
| .gitignore | ||
| README.md | ||
| pyproject.toml | ||
README.md
SmartTools
A lightweight personal tool builder for AI-powered CLI commands.
What is this?
SmartTools lets you create custom AI-powered terminal commands. You define a tool once (name, prompt, provider), then use it like any Linux command.
# Create a summarizer, then use it like any command:
sum -i document.txt -o summary.txt --max 512
Quick Example
A tool is just a YAML config:
# ~/.smarttools/sum/config.yaml
name: sum
description: "Summarize documents"
prompt: |
Summarize the following text in {max} words or less:
{input}
provider: codex
provider_args: "-p"
inputs:
- name: max
flag: --max
default: 500
Then run it:
sum -i myfile.txt -o summary.txt
sum -i myfile.txt --dry-run # preview prompt
sum -i myfile.txt --provider mock # test without API
Features
- Simple UI - Create/edit/delete tools with
dialog-based interface - CLI-first - Tools work like regular Linux commands
- Provider-agnostic - Use Codex, Claude, Gemini, or any CLI AI tool
- Testing built-in -
--dry-run,--show-prompt,--provider mock - Minimal - ~430 lines of Python, minimal dependencies
Installation
pip install smarttools
Usage
# Launch UI to manage tools
smarttools
# Or use CLI:
smarttools list
smarttools create mytool
smarttools edit mytool
smarttools delete mytool
smarttools test mytool
Documentation
See docs/DESIGN.md for the full design document.
Philosophy
This is a personal power tool. You write the tools, you run the tools, you accept the responsibility. No trust tiers, no sandboxing, no signing - just like any bash script you write.
License
MIT