A powerful CLI-based coding assistant that helps you write, edit, and manage code autonomously.
WTFCode 1.0.6 refreshes release metadata for the latest package build:
- bumped packaging metadata to 1.0.6;
- updated runtime MCP client version reporting;
- refreshed release documentation and lock metadata.
See CHANGELOG.md for full release notes.
- Agent Mode: Full autonomous tool use (Read, Write, Edit, Bash, Glob).
- Ask Mode: Quick Q&A for your codebase.
- Auto Code Edit: Precise file modifications using search and replace.
- Auto Command Execute: Runs shell commands and tests.
WTFCode uses the following tools to interact with your environment:
read_file: Reads file content with line numbers.write_file: Creates or overwrites files.edit_file: Performs surgical text replacements in existing files.execute_command: Runs bash/shell commands.glob_search: Finds files using pattern matching.mcp_call: Calls a configured MCP server tool over stdio.
- Install it:
For linux/macos:
uv pip install git+https://github.com/pavel444-byte/WTFCode.gitFor windows:
uv pip install git+https://github.com/pavel444-byte/WTFCode.git[windows]-
Configure Environment: Create a
.envfile in the root directory and add your API key:OPENAI_API_KEY=your_actual_key_here
For Azure OpenAI, set these additional variables:
AZURE_OPENAI_API_KEY=your_azure_openai_api_key_here AZURE_OPENAI_ENDPOINT=https://your-resource.openai.azure.com/ AZURE_OPENAI_API_VERSION=2024-12-01-preview PROVIDER=azure_openai
For Llama (via Ollama), install Ollama and set:
LLAMA_BASE_URL=http://localhost:11434 LLAMA_API_KEY=ollama PROVIDER=llama
Optional MCP server configuration in
~/.wtfcode/config.yml:mcp_servers: filesystem: command: "npx" args: ["-y", "@modelcontextprotocol/server-filesystem", "."] env: {}
Run CLI mode:
wtfcodeFollow the on-screen prompts to switch between Agent and Ask modes.
MCP management command:
/mcp enable <server>
/mcp disable <server>
/mcp restart <server>
/mcp install <server> <package_or_link> [extra_args...]Context management commands:
/context clear
/context image add /path/to/image.png
/context image list
/context image remove {index|all|/path/to/image.png}Image context supports PNG, JPEG, GIF, and WebP files. Attached images are sent with the next Agent or Ask request, then automatically removed from context after that message.
Run Web mode (module-style invocation compatible with web.py imports):
uv run python -m streamlit run web.py