Skip to main content

Build your own CLI coding agent from scratch

A hands-on tutorial series for building an Effect-TS powered CLI agent with type-safe tool execution and streaming responses.

What You'll Learn

Master the essential skills to build production-ready CLI agents with modern tooling and best practices

🔄

Prompt Orchestration

Master multi-turn conversations with context management and streaming responses

🛠️

Tool Execution

Build type-safe tools with schema validation and Effect-based error handling

Message Streaming

Implement real-time UI updates with progressive rendering and live tool feedback

🤖

LLM Integration

Swap between Anthropic, OpenAI, and Google providers with zero architectural changes

CLI UX Polish

Create beautiful terminal interfaces with colors, markdown rendering, and diff previews

📦

Effect-TS Runtime

Compose layers, manage dependencies, and handle errors with pure functional patterns

How It Works

A simple three-step process to master CLI agent development from fundamentals to production deployment

1

Watch

Follow step-by-step walkthroughs that explain every concept and design decision

2

Code

Build the agent yourself with hands-on exercises and working code examples

3

Run

Test your CLI agent immediately and see real-time tool execution in action

Series Outline

11 comprehensive episodes taking you from setup to production-ready CLI agent

Ep 1

Bootstrap the Runtime

Set up Effect-TS layers, Bun context, and dependency injection to create a composable foundation.

⏱️ 15 min📊 Beginner
Ep 2

Provider Configuration

Build a flexible config system supporting Anthropic, OpenAI, and Google with environment-based detection.

⏱️ 12 min📊 Beginner
Ep 3

First Tool: Read File

Create your first tool with schema validation, path safety, and Error handling through Effects.

⏱️ 18 min📊 Intermediate
Ep 4

The Agent Loop

Wire up the core orchestration loop connecting user input, LLM responses, and tool execution.

⏱️ 20 min📊 Intermediate
Ep 5

Streaming Responses

Implement real-time streaming UI with Vercel AI SDK for responsive, progressive output.

⏱️ 16 min📊 Intermediate
Ep 6

Search: Glob & Grep

Add powerful file search and content matching using ripgrep with type-safe adapters.

⏱️ 14 min📊 Intermediate
Ep 7

Edit with Diff Preview

Build safe file editing with unified diff rendering and user-controlled gating.

⏱️ 22 min📊 Advanced
Ep 8

Markdown Rendering

Parse and display beautiful markdown with syntax highlighting and metadata extraction.

⏱️ 12 min📊 Intermediate
Ep 9

Session Persistence

Implement chat history and session management with file-based key-value storage.

⏱️ 16 min📊 Intermediate
Ep 10

Add a Custom Tool

Learn the pattern for creating your own tools and integrating them into the registry.

⏱️ 18 min📊 Advanced
Ep 11

Performance & Concurrency

Optimize with concurrent operations, caching strategies, and Effect-TS performance patterns.

⏱️ 20 min📊 Advanced

Ready to Build?

Start building your own AI-powered CLI agent today. Follow the step-by-step tutorial series.