Topic
Building CLI Tools for LLM APIs
12 posts on building cli tools for llm apis — part of api integration on the n4n AI blog.
Testing an LLM CLI tool: mocking GPT-5 responses in Python
Learn testing llm cli mock gpt-5 python by building a mocked OpenAI-compatible server and pytest harness for a CLI tool end to end.
Streaming GPT-5 responses to the terminal in Python
Learn how to stream GPT-5 responses to the terminal in Python with Server-Sent Events, building a minimal CLI that prints tokens as they arrive.
Storing API keys safely in a Python LLM CLI tool
A hands-on tutorial to store API keys Python CLI apps securely using environment variables, OS keyring, and encrypted files with verification for LLM tooling.
Packaging your Python LLM CLI tool with pipx
Learn how to package python llm cli pipx tools for clean isolated installs, from project layout to publishing on PyPI and verifying the install.
From bash script to Python CLI: wrapping GPT-5 calls with Click
Build a robust Python CLI for GPT-5 using Click: project setup, API calls, streaming, retries, and packaging with runnable code and verification steps.
Building a Go CLI with Cobra, Viper, and the OpenAI API
Build a Go CLI with Cobra and Viper that calls the OpenAI API. Step-by-step tutorial with runnable code for a practical llm command-line tool.
Building a batch summarization CLI with the Claude API in Go
Step-by-step guide to build a batch summarization cli claude api go tool that processes files concurrently with retries and shows expected output.
Adding progress bars and spinners to a Go LLM CLI
Step-by-step guide to adding progress bars and spinners to a Go CLI for LLM API calls, covering streaming, spinners, and clean interrupts.
Building an LLM CLI tool in Go with Cobra and Claude Opus 4.8
Step-by-step guide to building a Go CLI with Cobra that queries Claude Opus 4.8 via the Anthropic API, including runnable code and expected output.
Building a multi-model CLI in Python: GPT-5, Claude Opus 4.8, Gemini 3
A practical guide to building a multi-model CLI in Python that routes between GPT-5, Claude Opus 4.8, and Gemini 3 with clean abstractions.
Build a GPT-5 command-line client in Python with Click
Step-by-step tutorial to build gpt-5 cli python tool with Click and the OpenAI SDK, including streaming, config, and error handling for engineers.
A Go CLI for comparing Gemini 3 and Llama 4 outputs side by side
Build a Go CLI to send one prompt to Gemini 3 and Llama 4 and print responses side by side via an OpenAI-compatible gateway, with full runnable code.
More topics in api integration
- Function Calling Fundamentals27
- Structured Outputs & JSON Mode19
- cURL LLM API Cookbook15
- Integrating GPT-5, Claude Opus 4.8, Gemini 3, Llama 4 & More via One API15
- Next.js AI Chat Integration (App Router + Vercel AI SDK)15
- FastAPI LLM Backend Integration14
- Go net/http LLM API Client14
- LangChain + OpenAI-Compatible Gateway Integration14
- Node.js OpenAI-Compatible SDK Integration14
- Python + OpenAI-Compatible SDK Integration14
- Rate Limits, Retries & Backoff Strategies14
- React Streaming Chat UI Patterns14