llmswap
https://github.com/sreenathmmenon/llmswap
A universal tool (SDK and CLI) for developers, allowing easy interaction with various AI providers (OpenAI/GPT-4o, Claude, Gemini, Groq, etc.) directly from the terminal.
This is a Python project - installation pip install llmswap
.
Directly from the terminal you can: Generate code and commands, for example llmswap generate "sort files by size"
will output du -sh * | sort -hr
. Create functions and entire scripts, for example llmswap generate "Python function to read JSON"
will generate ready-to-use code with error handling. Perform code reviews, debug errors, analyze logs.
Use cases and examples
https://sreenathmenon.com/blog/2025-09-04-stopped-alt-tabbing-chatgpt-while-coding/
The author emphasizes the main advantage: llmswap
brings AI directly into the terminal. Instead of constantly switching between a code editor, a browser with ChatGPT, a search engine, and other assistants, you get answers instantly without losing focus.
Killer feature: Integration with Vim (and other editors). Using the :r !
command in Vim, you can insert the result of any console command directly into a file. llmswap
makes this incredibly useful – it can insert code snippets where the cursor is located.
The tool can be part of the workflow for:
- DevOps: Generating
docker-compose.yml
, Kubernetes configurations, systemd services. - Database Administration: Creating complex SQL queries (
find duplicate emails in table
), commands for MongoDB. - Log Analysis: Creating commands for
awk
,grep
,zgrep
to analyze regular and archived logs. - and much more.
#cli