The command line may be the most user-friendly interface for an AI agent.Author and source: Shaoshuopai
Between 2025 and 2026, leading AI companies sequentially released a new class of CLI-based Agent tools.
Anthropic released Claude Code, an AI programming assistant that runs in the terminal. OpenAI released Codex CLI, and Google released Gemini CLI. In this wave, nearly every notable AI company has bet on the command line.
This is counterintuitive. The command line is a product of the 1970s; the emergence of GUIs brought computers to the masses, and now mobile internet has made touch-based interaction the default. By conventional logic, the direction of technology should be increasingly “visual” and increasingly “user-friendly.” So why, in the age of AI, is the oldest form of interaction making a comeback?
The answer is not sentiment—it's engineering logic.
The GUI is not friendly to AI.
The GUI is designed for human visual navigation. Buttons, pop-ups, drag-and-drop, and hover effects—these interaction paradigms are built on human visual intuition. Humans glance at the interface, scan button locations, and intuitively determine their next action. This system is extremely natural for humans and requires almost no learning curve.
But LLMs do not work this way at all. LLMs take tokens as input and produce tokens as output. Their "thinking" occurs in language space, not in pixel space.
Having AI control the GUI means bridging a significant gap:
The cost of understanding is extremely high. AI must rely on computer vision or the Accessibility Tree to "understand" the interface—which buttons are clickable, where the input fields are located, and what the current popup means. This is not AI’s strength; rather, it’s an additional burden.
The state is implicit and unpredictable. The same button may be clickable today but grayed out tomorrow due to some condition. This implicit state is "context" for humans but represents uncertainty for AI—it cannot reliably determine under what conditions this action is available.
Operations are not composable. There is no way to pipe together two GUI operations. "Search results → Filter → Export" requires three separate clicks in the GUI and cannot be passed, reused, or automated as a single unit.
Difficult to test and verify. When AI performs a GUI operation, how can you confirm it succeeded? You need to take screenshots and parse the interface state—the entire feedback loop is slow and fragile.
In comparison, each feature of the CLI seems tailor-made for AI.
Three advantages of CLI for AI agents: composability
The core of the Unix philosophy is: “Do one thing and do it well; make programs work together.”
This design principle from decades ago has taken on new significance in the AI era.
The CLI tool chains standard input and output. For example, `linkly search "React performance optimization" | head -5` passes the search results to the next command. Similarly, `linkly search "architecture design" --json | jq '.results[].doc_id'` extracts all document IDs for further processing.
For an AI agent, composability means chaining multiple commands into complex, multi-step workflows, where the output of each step is structured text that can be consumed by the next. There is no "click → wait → screenshot → parse" cycle typical of GUIs—only clean inputs and outputs.
Predictability
The behavior of each command is entirely determined by its parameters. Running "linkly search "database" --limit 10" today yields this result; running it tomorrow (assuming the database hasn't changed) yields the same result. There is no implicit state, no confusion over "Why did this feature work before but not now?"
This is extremely important for AI. When AI reasons about a tool, it needs to build a mental model: what are the inputs, what are the outputs, and what are the side effects. The implicit state of a GUI introduces uncertainty into this mental model. The explicit parameters of a CLI make this mental model reliable and precise.
linkly read 42 --offset 80 --limit 100 — the meaning of this command is entirely determined by its parameters. AI can precisely infer its behavior without guessing any implicit context.
Auditability
All CLI operations are text sequences that can be logged. The commands the AI executed and the outputs it received are all human-readable text.
This transparency offers two benefits.
For the AI itself: It can perform self-checks. For example, "The previous Linkly search for 'contract template' returned zero results, indicating the keyword is incorrect—try using 'contract sample' instead." This kind of text-based self-correction is fundamental to the reliable operation of AI agents.
For humans: Post-action review is possible. You can see which commands the AI executed and the inputs and outputs at each step, making the entire reasoning chain transparent. GUI operations make it difficult to trace “what was clicked,” whereas CLI operation logs are inherently audit trails.
Design Practices for Linkly AI CLI
LinklyAI is a locally developed search engine and knowledge base creation software. When designing Linkly AI’s CLI tool, we considered the AI Agent as one of the primary users from the outset.
4 carefully designed core commands
The Linkly AI CLI has only four core commands:

These four commands fully adhere to the Unix philosophy: each does one thing well, with clear input and output contracts. An AI agent can combine them in any way to create complex retrieval workflows.
A typical agent workflow is as follows:

The output of each step is structured text that can be directly consumed and reasoned about by AI. There are no GUI operations and no burden of visual parsing.
Combine with pipelines, etc.
Another advantage of the CLI is that it can be freely combined with other commands in the system, enabling new capabilities beyond the scope of any single tool.
Filter and extract: The --json output can be directly piped to jq to extract fields, and the result can then be passed to the next tool:
- Search documents, retrieve only the doc_id list, then batch fetch outlines.
- linkly search "database design" --json | jq -r '.results[].doc_id' | xargs -I{} linkly outline {}
Combine with grep for secondary filtering: first use semantic search to narrow the range, then filter with precise keywords:
- linkly search "architecture design" | grep -i "microservices|distributed"
Statistics and analysis: Combine with wc, sort, uniq for document statistics:
- Count how many PDFs are in the knowledge base.
- linkly search "" --json | jq '.results[].type' | sort | uniq -c
Combine with scripts: Automate repetitive tasks in shell scripts for batch processing:

GUI tools cannot participate in these combinations. The output of CLI tools is a text stream, which can naturally be consumed by any other tool, making the overall system far more powerful than the simple sum of its individual tools.
The CLI is also the simplest way to bridge MCP.
CLI and MCP are not mutually exclusive. With a single command, linkly mcp can turn a CLI into a stdio MCP server, available to any AI client that supports MCP:
Json:

This is much simpler than directly configuring an HTTP MCP server—users don’t need to know the port number or manually write URLs in JSON; they simply need to tell the AI client, “Run this command.”
The CLI has become the gateway to the MCP ecosystem, with virtually zero configuration friction for users.
Broader trends
Claude Code chose to prioritize releasing a CLI version over an IDE plugin, a decision grounded in clear engineering logic: IDE plugins are constrained by their host environments, whereas CLI tools can run anywhere there is a terminal, can be invoked by any agent, and can be combined with any other tool.
This reveals a more fundamental principle: the essence of an AI Agent invoking tools is executing commands. Tool invocation (function call / tool use) semantically equates to a CLI—given a name and parameters, it returns a result. CLI tools are naturally functions that an Agent can call, requiring no transformation layer.
The phrase "Terminal as the new IDE" was mentioned even before the rise of AI, but in the AI era, it has taken on an entirely new meaning: not just "writing code in the terminal," but "agents interacting with the world through the terminal."
In the past, the CLI was a tool exclusive to technical professionals. In the future, the CLI could become the universal language of agents—humans converse with agents using natural language, while agents interact with systems via the CLI.
Summary
The GUI will not be significantly affected—it remains the best interface for humans to directly interact with computers. However, when your AI tool needs to invoke another tool, the CLI is the most natural bridge, and more software will introduce additional CLI tools to accommodate agent workflows.
Want to try searching your documents in the terminal? Check out these two articles: Search Your Documents Without Leaving the Terminal and One Command to Let 30+ AI Tools Read Local Files.
