Skip to main content
Any Framework

IronHive CLI - Universal CLI Agent Core for AI-powered automation

Published
Apr 29, 2026
5mo ago
Total Downloads
11.6K
11,640

Install

dotnet add package IronHive.Cli --version 0.10.3

No framework information available.

README

ironhive-cli

Universal CLI Agent Core

A foundation tool for AI-powered automationβ€”not just coding, but any task that benefits from intelligent command execution.

Philosophy

Do one thing well.

Receive a command. Plan. Execute. Return.

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚          External Systems               β”‚
β”‚   CI/CD Β· Schedulers Β· Orchestrators    β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                     β”‚ invoke
                     β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚             ironhive-cli                β”‚
β”‚   Command β†’ Plan β†’ Execute β†’ Done       β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                     β”‚ MCP
                     β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚           Plugins (MCP Servers)         β”‚
β”‚   code-beaker Β· memory-indexer Β· ...    β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Installation

# Install as dotnet tool
dotnet tool install -g IronHive.Cli

# Or build from source
git clone https://github.com/iyulab/ironhive-cli
cd ironhive-cli
git submodule update --init --recursive
dotnet build

Quick Start

# Interactive mode
ironhive

# Single command
ironhive -p "Write a README for this project"

# JSON output (for programmatic use)
ironhive -p "Hello" --output json

# Streaming JSON Lines
ironhive -p "Hello" --output jsonl

# Plain text (no ANSI)
ironhive -p "Hello" --plain

Session Management

# Continue most recent session
ironhive -c

# Resume specific session
ironhive -r <session-id>

# List sessions
ironhive sessions list
ironhive sessions list --output json

Model Configuration

# Environment variables
export GPUSTACK_ENDPOINT=http://localhost:8080/v1
export GPUSTACK_API_KEY=your-key
export GPUSTACK_MODEL=gpt-4o-mini

# Or OpenAI
export OPENAI_API_KEY=sk-xxx

Configuration

Configuration is merged in order (later overrides earlier):

  1. Global: ~/.ironhive/config.yaml
  2. Project: .ironhive/config.yaml
  3. Environment: IRONHIVE_*, GPUSTACK_*, OPENAI_*
  4. .env file: Project root .env
# .ironhive/config.yaml
limits:
  maxSessionTokens: 100000
  maxSessionCost: 10.00

context:
  compactionThreshold: 0.92
  goalReminderEnabled: true

CLAUDE.md Support

Place a CLAUDE.md file in your project root for automatic agent instructions.

Core Library Integration

Use IronHive.Cli.Core for direct .NET integration:

// Add to your project
<PackageReference Include="IronHive.Cli.Core" />

// Configure with DI
services.AddIronHiveWithOpenAI(apiKey, "gpt-4o-mini");
// Or
services.AddIronHiveWithOllama("llama3.2");

// Use
var agentLoop = serviceProvider.GetRequiredService<IAgentLoop>();
var response = await agentLoop.RunAsync("Hello");

// Streaming
await foreach (var chunk in agentLoop.RunStreamingAsync("Hello"))
{
    Console.Write(chunk.TextDelta);
}

See samples/console-chat for a complete example.

Samples

Sample Path Description
Console Chat samples/console-chat/ Core library direct integration
Web Chat samples/web-ai-chat/ Next.js + CLI subprocess
# Console Chat
cd samples/console-chat
dotnet run

# Web Chat
cd samples/web-ai-chat
npm install && npm run dev

Development

Requirements

  • .NET 10 SDK
  • Git (with submodules)

Build & Test

git submodule update --init --recursive
dotnet build
dotnet test

Project Structure

ironhive-cli/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ IronHive.Cli.Core/       # Core library (NuGet)
β”‚   β”‚   β”œβ”€β”€ Agent/               # AgentLoop, modes
β”‚   β”‚   β”œβ”€β”€ Extensions/          # DI helpers
β”‚   β”‚   β”œβ”€β”€ Session/             # Session management
β”‚   β”‚   └── Tools/               # Built-in tools
β”‚   └── IronHive.Cli/            # CLI application
β”œβ”€β”€ samples/
β”‚   β”œβ”€β”€ console-chat/            # .NET Core integration
β”‚   └── web-ai-chat/             # Next.js + subprocess
β”œβ”€β”€ tests/
└── submodules/
    β”œβ”€β”€ TokenMeter/              # Token counting
    └── ToolCallParser/          # tool_call parsing

Related Projects

License

MIT

Changes from Previous Version

No structural changes between v0.10.0 and v0.10.3.

Adoption Assessment

Assess this package against its supported frameworks, license, maintenance signals and dependency graph before making it a project standard.

No target framework metadata is available. Confirm compatibility in a representative project before standardising on this package.

Related Guides & Workflows

Learn how to evaluate, integrate, or audit this package in your .NET project.