autocorrect
Correct grammar and spelling in text using a local or remote LLM.
Usage
agent-cli autocorrect [TEXT]
Description
This is a simple, one-shot command that:
- Reads text from your system clipboard (or from a direct argument)
- Sends the text to an LLM with a prompt to perform only technical corrections
- Copies the corrected text back to your clipboard, replacing the original
This tool is ideal for integrating with a system-wide hotkey.
Examples
# Correct text from clipboard
agent-cli autocorrect
# Correct text from argument
agent-cli autocorrect "this text has an eror"
Options
Provider Selection
| Option |
Description |
Default |
--llm-provider |
LLM provider: ollama, openai, gemini |
ollama |
Ollama Configuration
| Option |
Description |
Default |
--llm-ollama-model |
Ollama model to use |
gemma3:4b |
--llm-ollama-host |
Ollama server URL |
http://localhost:11434 |
OpenAI Configuration
| Option |
Description |
Default |
--llm-openai-model |
OpenAI model to use |
gpt-5-mini |
--openai-api-key |
OpenAI API key (or set OPENAI_API_KEY) |
- |
--openai-base-url |
Custom OpenAI-compatible API URL |
- |
Gemini Configuration
| Option |
Description |
Default |
--llm-gemini-model |
Gemini model to use |
gemini-2.5-flash |
--gemini-api-key |
Gemini API key (or set GEMINI_API_KEY) |
- |
General Options
| Option |
Description |
Default |
--log-level |
Set logging level |
WARNING |
--log-file PATH |
Path to a file to write logs to |
- |
--quiet, -q |
Suppress console output |
false |
--config PATH |
Path to a TOML configuration file |
- |
--print-args |
Print resolved arguments including config values |
false |
Workflow Integration
System-Wide Hotkey
Set up a hotkey to run autocorrect on your clipboard:
Typical Usage
- Select and copy text with errors
- Press your hotkey (e.g., Cmd+Shift+A)
- Paste the corrected text