Files
cline/apps/examples/cli-agent
Tomás Barreiro 220a21bdcf Move sdk/apps/ to apps/ (#11200)
* Move the apps to the root dir

* Update all references from sdk/apps/ to apps/

* Update dependencies

* Install bun types

* Fix types

* Fix types

* Fix linter

* Ingore apps from vscode

* Fix security warning

* Fix windows install

* Enable windows dev mode

* Revert "Enable windows dev mode"

This reverts commit a46c99282e.

* Revert "Ingore apps from vscode"

This reverts commit 47f7b265d2.

* Revert "Fix windows install"

This reverts commit 1dabba1556.

* update the repo root

* fix root dir

* fix path

* fix other path

* Fix unrelated changes

* fix: address apps move follow-up blockers (#11228)

* fix: update root app command paths

* fix: include moved apps in root checks

* fix: clean up moved app path references

---------

Co-authored-by: Saoud Rizwan <7799382+saoudrizwan@users.noreply.github.com>
2026-06-03 01:49:57 +02:00
..
2026-06-03 01:49:57 +02:00
2026-06-03 01:49:57 +02:00
2026-06-03 01:49:57 +02:00
2026-06-03 01:49:57 +02:00

CLI Agent

An interactive terminal chat agent with streaming output and a shell tool. Type messages, get responses, and let the agent run shell commands on your behalf.

Getting started

Install dependencies:

bun install
bun run build:sdk

Set an API key:

export CLINE_API_KEY="cline_..."

Run:

bun dev

Type any message at the you: prompt to see a streaming response from the agent.

What it does

  • Creates a conversational Agent with a shell tool using createTool
  • Streams assistant-text-delta events to stdout as the agent responds
  • Logs tool calls and their results inline
  • Uses agent.run() for the first message and agent.continue() for follow-ups to maintain conversation context

Concepts demonstrated

  • createTool with zod schema validation
  • Event subscription for streaming and tool call visibility
  • Multi-turn conversation with run() / continue()
  • systemPrompt configuration

Notes

For the simplest possible example, see quickstart. For structured workflows with multiple tools, see code-review-bot.