Setting up a CLI chatbot sounds like an afternoon of configuration work. In practice, the first productive use across all three variants I describe takes less than an hour. The difference lies in what you want to have at the end — and which provider fits your existing subscription.
Why use a CLI at all? I have described the background in A chatbot on the command line. Here it is about the how. Three concrete paths with the major cloud providers Anthropic, OpenAI, and Google. For local models without a cloud connection, a separate article follows — the setup is substantially different and deserves its own guide. Before that, a short section for everyone who has never actively worked with a command line.
What even is a command line?
A command line is a text window on your computer in which you type commands instead of clicking them via menus and buttons. You type a line, press Enter, the machine executes. That is all. Behind the slick screen interfaces we use every day, exactly this logic keeps running. We just normally don’t see it.
In everyday speech several terms come up that mean roughly the same thing but are not the same. A brief sorting:
- Command line is the umbrella term. It refers to the text-based input of commands.
- CLI stands for „command line interface“ and is the abbreviation for it. When someone says „tool XY has a CLI“, they mean: you can operate the tool via commands in a text window.
- Terminal is the window itself in which you type. The word comes from the era of mainframe computers, when physical terminals stood in front of the machine as the input device.
- Shell is the program that actually processes your inputs and passes them on to the machine. Different shells have different command languages.
Under Windows you encounter three concrete shells, all of which can run in a terminal window:
- Command Prompt (the old
cmd.exe) is the historical Windows shell. It works, but it is too narrow for modern tasks. - PowerShell is the modern Microsoft shell. IT administrators in companies work with it today, and many developer tools require it.
- Git Bash or WSL (Windows Subsystem for Linux) are Linux-like shells under Windows. Anyone who works with open-source tools that come from the Linux world finds their way around there faster.
For the three CLI chatbot paths below, PowerShell or Windows Terminal are entirely sufficient. Both are pre-installed in Windows 11.
How do you open a command line under Windows?
Three standard ways, each step by step:
Path 1: Windows Terminal (modern, recommended — pre-installed from Windows 11, can be installed from the Microsoft Store under Windows 10):
- Press the Windows key on your keyboard.
- Type „Terminal“.
- Click the „Terminal“ result.
Path 2: PowerShell directly (works on every current Windows version):
- Press the Windows key.
- Type „PowerShell“.
- Click „Windows PowerShell“.
Path 3: Classic Command Prompt (only if older guides insist on it):
- Press the Windows key.
- Type „cmd“ or „Command Prompt“.
- Confirm with Enter.
The window that opens shows a blinking cursor after a path such as C:UsersYourName>. That is exactly where you type your commands and confirm with Enter. That is the command line you will work with below.
If a command needs administrator rights — the case with some installations — right-click the entry in the Start menu and select „Run as administrator“. That opens the terminal with elevated rights.
Prerequisite for all three paths: install Node.js
All three CLI chatbots presented are installed via npm, which comes with Node.js. Install it once, and it then suffices for every further CLI tool from the JavaScript ecosystem.
- Open nodejs.org in your browser.
- Download the LTS version for Windows (installer file).
- Double-click the installer file and follow the standard setup. The defaults suit most cases.
- After the installation, open a new PowerShell or a Windows Terminal and check success with:
node --version
npm --version
Both commands each output a version number. Your machine is then ready for all three paths below.
Authentication: subscription or API key?
One thing up front, because it works the same way with all three providers and is glossed over in many guides: you do not need a separate API key with pay-per-token billing if you already have a subscription. Anthropic, OpenAI, and Google offer two ways with their CLI tools:
- Login with an existing subscription (Claude Pro/Team/Enterprise, ChatGPT Plus/Pro/Business/Enterprise, Google AI Pro/Workspace). At the first start of the CLI tool, the browser opens, you log in, and the token automatically lands in the tool. You use your existing subscription allowance. No additional cost per token.
- API key with pay-per-token billing. Sensible if you automate a great deal or have no subscription. You set the key up as an environment variable.
With a free version (Claude Free, ChatGPT Free, Gemini Free) you cannot use the CLI tools productively. The free tiers are intended for the browser interface.
Setting up a CLI chatbot: three paths compared
Path 1: Claude Code (Anthropic) — quick to get going
If you have a Claude Pro or Team subscription, or are willing to set one up, Claude Code from Anthropic is the most direct entry point.
The installation runs via npm in PowerShell or the Windows Terminal:
npm install -g @anthropic-ai/claude-code
After the installation, go into a directory with documents or source texts and start:
claude
At the first start, the browser opens and walks you through the login with your Anthropic account. As soon as the authentication is in place, the model has direct access to all files in the current directory and its subdirectories.
Alternative for API use: set the environment variable ANTHROPIC_API_KEY with your API key. Under Windows via the search bar — type „environment variables“, click „Edit the system environment variables“, then „Environment Variables…“ at the bottom, and create the new entry in the user area. Close and reopen the terminal once so that the variable takes effect.
First productive task: open a directory with five to ten Markdown or XML documents. Enter: „Check these documents for inconsistent use of the term [your technical term] and list all the deviations.“ The output is immediately usable.
What to watch out for: your input data goes over the Anthropic servers. For sensitive product data, clarify the data-protection question before you start. Anthropic offers contractual guarantees for Team and Enterprise plans that inputs are not used for model training — that is a contractual matter, not a technical one.
Path 2: Codex CLI (OpenAI) — with an existing ChatGPT subscription
Anyone with a ChatGPT Plus, Pro, Business, or Enterprise subscription can use Codex CLI from OpenAI without paying extra.
Installation:
npm install -g @openai/codex
First start in the project directory:
codex
At the first call, the tool walks you through the login. Choose „Sign in with ChatGPT“ — the browser opens, you authenticate, done. The tool uses the allowance of your existing subscription.
Alternative API use: OPENAI_API_KEY as an environment variable. Sensible if you have no ChatGPT subscription or want the tool to run automatically in scripts without a browser login.
First productive task: Codex is particularly suited to code and script tasks in a project directory. Enter: „Create a PowerShell script that checks all XML files in this folder for duplicate ID attributes and writes the hits into a CSV.“ The tool generates the script, asks for confirmation before saving, and can run it directly on request.
What to watch out for: Codex CLI is optimised for programming and automation tasks. For pure text tasks in the writing department, Claude Code is often more natural. The data-protection question is analogous to Claude Code: inputs go over OpenAI servers, Enterprise plans have contractual training-exclusion clauses.
Path 3: Gemini CLI (Google) — with an existing Google AI subscription
Anyone who subscribes to Google AI Pro or Google Workspace with the Gemini module can deploy Gemini CLI from Google.
Installation:
npm install -g @google/gemini-cli
Start in the project directory:
gemini
At the first start, the tool opens the browser and walks you through the Google login. As soon as the account is linked, the tool runs on your subscription allowance.
Alternative API use: GEMINI_API_KEY as an environment variable. Suitable for API-first setups or if you have created a key via Google AI Studio.
First productive task: Gemini CLI offers a repertoire comparable to Claude Code and Codex CLI. For technical writing, for example: „Analyse all Markdown files in ./docs and list sections without a correct heading hierarchy.“ The results land directly in the terminal.
What to watch out for: Google processes inputs analogously to the other two providers. For Workspace customers, extended contractual terms with a training exclusion apply. Outside the Workspace world — that is, with a pure Google AI Pro private subscription — the terms are weaker; that is relevant for sensitive company data.
Which path for which case?
A rough orientation from practice, not as a rule but as a starting point for your own decision.
The decisive filter is almost always set by the existing subscription: anyone who already subscribes to Claude Pro, ChatGPT Plus, or Google AI Pro starts with the matching CLI tool and pays nothing extra. Anyone who has nothing yet chooses by focus:
- Claude Code is strong in text analysis, writing, and long contexts. First choice when the tasks are linguistically demanding.
- Codex CLI is optimised for programming and scripting. First choice when the focus is on automation and file transformations.
- Gemini CLI is the obvious choice in Google Workspace organisations, because identity management and data flow stay in one hand.
When data must not leave the company, none of these three paths is suitable. Then you need a local solution with Ollama, LM Studio, or comparable tools — a separate article on that follows, because the setup runs differently (model download, local API server, hardware requirements).
Concrete use cases for technical writing
A CLI chatbot only pays off with a concrete task that puts it to work. Three types I see regularly in practice.
Terminology consistency check across large numbers of files. You have 500 XML files and want to know in which of them the old component designation still appears. A script passes each file to the model and collects the hits in a list. Done in an hour in the terminal. In the browser this would be half a day of clicking, file by file.
Pre-check before external translation. A script runs every source text through the model and reports unclear references, open placeholders, and stylistic inconsistencies before the material goes to the language service provider. The return rate drops, because the provider works with clean sources.
Markdown linting and structure checking. If your writing department uses a Markdown-based CCMS or a docs-as-code environment, structural requirements can be checked automatically: heading hierarchy, mandatory fields in metadata blocks, consistent linking structure. For the simple cases, a standard linter such as markdownlint is enough. For content consistency — for instance whether a manual refers to the right component — the model takes over.
Common mistakes during setup
I see the first mistake regularly: expecting too much of the first hour. Setting up a CLI chatbot takes little time. Using it productively takes practice. Anyone who expects highly complex tasks immediately after the installation and is disappointed has set the expectation wrong, not the tool.
The second mistake: no concrete use case before the installation. Anyone who just starts to „have a look“ will no longer use the tool after two weeks. Identify beforehand a task that recurs and that would sensibly use file access.
The third: asking the data-protection question only after the installation. With a cloud tool in a company context, clarify beforehand which data you may hand over. That is not bureaucratic caution but entrepreneurial responsibility.
Conclusion
Setting up a CLI chatbot is worthwhile when a concrete task exists that needs file access or automation. Start with the provider you already subscribe to anyway — and begin with a small, concrete task. The strategic embedding of AI use into your documentation processes I describe in Introducing AI in technical writing.
AI in the writing department without half-truths — let’s talk
Before an AI tool is introduced, it is worth looking at the data base and at the tasks a model concretely takes on. Schübeler Consulting examines with you where AI saves effort today and where it is merely additional complexity.
An appointment for an initial consultation: info@schuebeler-consulting.de or via the website.
— Johann Jörgen Schübeler, Schübeler Consulting