Cline CLI & My Undying Love of Cline Core

Cline CLI Preview is available. After months of work, Cline is now a standalone service powered by Cline Core, exposing a gRPC API for scriptable automation, multi-instance orchestration, and building custom interfaces. The agent loop that works anywhere.

Cline CLI & My Undying Love of Cline Core

Cline CLI Preview is available & open source now! When I started working on Cline, he was a tightly integrated VS Code extension, and it's taken months to liberate him into a standalone service that can be embedded into any environment.

That's Cline Core. Cline for JetBrains was built on top of this service, and now I'm really excited to be able to use Cline CLI in the terminal too. Home is where the heart is, and the CLI stole mine many years ago.

npm install -g cline
0:00
/1:39

Our focus in the CLI has been scriptability. One of my catchphrases is that "LLMs convert unstructured data into structured data" – and this is incredibly helpful in scripts. Imagine something like writing a cron job (i.e. automatically recurring task) that reads all your friends' social media, produces structured JSON about them, and then redeploys a little static website about what's going on in their lives - notifying you about key moments automatically. The open source Cline CLI could make this a weekend project.

Some of my favourite ideas from our Discord for what you can build with the Cline CLI:

  • Video game NPCs that write their memories to files
  • Web interface orchestrator for background Clines
  • Cline in Jupyter notebooks / other non-IDE apps
  • Remote control mobile app
  • Cline powered Discord bot that answers common questions
  • Cline in shell scripts
  • Cline in GitHub issues automatically triaging / analyzing bug reports

I think you get the idea, anything is now possible with our best OSS agent boy. He's growing up, and ready to help out around the farm. Yes, I write blogs by hand.

Okay let's get into the details.

What's Special About Cline CLI

Our CLI is a companion to your IDE, they are meant to work together seamlessly. More than that, the CLI is designed to manage many agents running in parallel, provide full scriptability, and offer a convenient chat interface.

Full Feature CLI

The Cline CLI brings the full power of Cline. All of the features are available, like plan & act, checkpoints, terminal execution, and headless browser use. As usual, Cline CLI supports a huge range of providers and models to choose from. Additionally, the advanced tools provide orchestration capabilities, allowing you to easily manage a fleet of Clines.

0:00
/0:41

Experimental Subagents

IDE Cline (like in VS Code & JetBrains) can call the Cline CLI to delegate tasks with a fresh context window. In this first version, Cline is instructed to use one sub-cline at a time, and to wait until the sub-cline completes.

It's hard to get agents working well together, but we are creating a framework for the necessary experimentation to happen

0:00
/0:18

Multiheaded Cline Hydra

Our architecture allows for multiple frontends to be attached to a running task. It would be quite doable today to create a mobile app that remote controls your desktop Cline instance. Or you might want to have your IDE remote control a cline operating on a server.

NOTE: these interoperability features are only available between JetBrains IDEs and the CLI currently (support for VS Code is coming soon, but we have to do a scary migration).

It's also possible to pass task between the IDE and CLI, check this out:

0:00
/0:23

The Architecture of Cline Core

The scheme is that Cline Core runs as a simple node process, exposing a gRPC API that allows him to be integrated into anything the community can imagine. It's also possible to attach multiple frontends at the same time, do it over the network, and pass tasks around. Here's how it looks:

The "Presentation Layer" (aka user interface) connects as a gRPC client to Cline Core and tells him what to do. Cline Core sends back a subscription of state changes & LLM messages, which allows the presentation layer to display stuff.

Cline Core connects as a gRPC client to the "Host Provider Layer" which implements integration into what he's being embedded into. So, for example, Cline Core can ask VS Code to provide the linter output. We also provide a generic host provider with the Cline CLI, so you don't have to implement this if you don't want to.

Full gRPC documentation coming soon – we're still sanding off some rough edges, though Cline Core is completely available in our source. You can come talk to me in the #cli chatroom on Discord.