CLI Packages Overview
Overview
Token Ring provides two primary CLI packages for different use cases:
@tokenring-ai/cli - Current Terminal Interface
Purpose: Provides a basic terminal interface for interacting with Token Ring AI agents and services.
Key Features:
- Simple terminal-based interface
- Agent selection and management
- Basic human interface request handling
- Command history and auto-completion
- Support for commands like
/editand/multi
Use Case: Simple terminal interactions with minimal UI features.
@tokenring-ai/cli-ink - Ink-based Enhanced Interactive CLI
Purpose: Provides an enhanced, interactive terminal interface using the Ink framework for rich terminal applications.
Key Features:
- Interactive terminal interface with Ink framework
- Real-time event processing with color-coded output
- Comprehensive command support (
/help,/markdown,/quit,/exit) - Dynamic screen management
- Code block syntax highlighting
- Responsive layout that adapts to terminal size
- Web application integration
- Workflow agent spawning
Use Case: Feature-rich terminal experience with advanced UI capabilities.
Comparison
| Feature | @tokenring-ai/cli | @tokenring-ai/cli-ink |
|---|---|---|
| UI Framework | Basic terminal UI | Ink framework |
| Output Formatting | Basic text | Color-coded, syntax highlighting |
| Commands | /edit, /multi | /help, /markdown, /quit, /exit |
| Screen Management | Basic screens | Dynamic screen switching |
| Human Interface | Basic handling | Comprehensive handling with multiple request types |
| Web Integration | Limited | Full SPA and web application support |
| Workflow Support | Basic | Advanced workflow agent spawning |
Usage
For Basic Terminal Interface
import { TokenRingApp } from '@tokenring-ai/app';
import cliPlugin from '@tokenring-ai/cli';
const app = new TokenRingApp();
app.use(cliPlugin);
await app.start();
For Enhanced Ink-based Interface
import { TokenRingApp } from '@tokenring-ai/app';
import cliInkPlugin from '@tokenring-ai/cli-ink';
const app = new TokenRingApp();
app.install(cliInkPlugin);
await app.start();
@tokenring-ai/cli Dependencies
@tokenring-ai/agent: Core agent framework@tokenring-ai/app: Application framework@tokenring-ai/chat: Chat service@inquirer/prompts: Interactive promptschalk: Terminal color stylingexeca: Process execution
@tokenring-ai/cli-ink Dependencies
@tokenring-ai/agent: Core agent framework@tokenring-ai/app: Application framework@tokenring-ai/utility: Shared utilities@tokenring-ai/web-host: Web resource hostingink: Terminal UI frameworkink-syntax-highlight: Code syntax highlighting@inquirer/prompts: Interactive promptschalk: Terminal color stylingexeca: Process executionopen: URL opening
Development Status
@tokenring-ai/cli: Active development, recommended for new projects@tokenring-ai/cli-ink: Stalled due to the horrible performance and UI glitching problems in the ink package