JURIKO CLI
A conversational AI CLI tool with intelligent text editor capabilities and tool usage.
Features
- 🤖 Multi-LLM Provider Support: Choose from Anthropic Claude, OpenAI GPT, Grok, or Local LLM models
- 🎯 Interactive Provider Selection: Easy-to-use interface for selecting providers and models at startup
- 📝 Smart File Operations: AI automatically uses tools to view, create, and edit files
- ⚡ Bash Integration: Execute shell commands through natural conversation
- 🔧 Automatic Tool Selection: AI intelligently chooses the right tools for your requests
- 💬 Interactive UI: Beautiful terminal interface built with Ink
- ⚙️ Persistent Settings: Save your preferred provider and model settings
- 🌍 Global Installation: Install and use anywhere with
npm i -g @graphteon/juriko-cli
Installation
Prerequisites
- Node.js 16+
- API key from at least one supported provider (or a local LLM server):
Global Installation (Recommended)
npm install -g @graphteon/juriko-cli
Local Development
git clone <repository>
cd juriko-cli
npm install
npm run build
npm link
Setup
Multi-LLM Provider Support
JURIKO supports multiple AI providers. You can set up API keys for any or all of them:
Method 1: Environment Variables
export ANTHROPIC_API_KEY=your_anthropic_key_here
export OPENAI_API_KEY=your_openai_key_here
export GROK_API_KEY=your_grok_key_here
export LOCAL_API_KEY=your_local_api_key_here
export LOCAL_BASE_URL=http://localhost:1234/v1
Method 2: .env File
cp .env.example .env
Method 3: Command Line Flags
juriko --anthropic-key your_anthropic_key_here
juriko --openai-key your_openai_key_here
juriko --grok-key your_grok_key_here
Method 4: User Settings File
Create ~/.juriko/user-settings.json:
{
"provider": "anthropic",
"model": "claude-3-5-sonnet-20241022",
"apiKeys": {
"anthropic": "your_anthropic_key_here",
"openai": "your_openai_key_here",
"grok": "your_grok_key_here",
"local": "your_local_api_key_here"
},
"baseURLs": {
"local": "http://localhost:1234/v1"
}
}
Local LLM Setup
JURIKO supports connecting to local LLM servers that expose OpenAI-compatible APIs. This includes popular local LLM solutions like:
- LM Studio: Download and run models locally with a user-friendly interface
- Ollama: Lightweight, extensible framework for running LLMs locally
- llama.cpp: Direct C++ implementation for running LLaMA models
- Text Generation WebUI: Web interface for running various LLM models
- vLLM: High-throughput LLM serving engine
- LocalAI: OpenAI-compatible API for local models
Quick Setup Examples
LM Studio:
- Download and install LM Studio
- Download a model (e.g., Llama 2, Code Llama, Mistral)
- Start the local server (usually runs on
http://localhost:1234/v1)
- Select "Local" provider in JURIKO and use the wizard
Ollama:
- Install Ollama
- Pull a model:
ollama pull llama2
- Start Ollama server:
ollama serve (runs on http://localhost:11434/v1)
- Select "Local" provider in JURIKO and configure
llama.cpp:
- Build llama.cpp with server support
- Start server:
./server -m model.gguf --port 8080
- Use
http://localhost:8080/v1 as base URL in JURIKO
Local LLM Configuration Wizard
When you select "Local" as your provider, JURIKO will guide you through a 4-step configuration wizard:
- Base URL: Enter your local server URL (e.g.,
http://localhost:1234/v1)
- Model Name: Specify the model name your server uses
- API Key: Enter API key if your local server requires authentication (optional)
- Save Configuration: Choose whether to save settings for future use
The wizard includes helpful examples and validates your configuration before proceeding.
Provider Selection
When you first run JURIKO, you'll be presented with an interactive interface to:
- Select your preferred LLM provider (Anthropic, OpenAI, Grok, or Local)
- Choose a model from the available options for that provider
- Enter your API key if not already configured
- Save your preferences for future sessions
You can change providers anytime by:
- Typing
provider or switch in the chat
- Pressing
Ctrl+P for quick provider switching
- Running
juriko again to go through the selection process
Supported Models
Anthropic Claude:
claude-3-5-sonnet-20241022 (Latest Sonnet)
claude-3-5-haiku-20241022 (Fast and efficient)
claude-3-opus-20240229 (Most capable)
OpenAI:
gpt-4o (Latest GPT-4 Omni)
gpt-4o-mini (Fast and cost-effective)
gpt-4-turbo (High performance)
gpt-3.5-turbo (Fast and affordable)
Grok (X.AI):
grok-beta (Latest Grok model)
grok-vision-beta (With vision capabilities)
Local LLM:
custom-model (Your custom local model)
- Configure any model name through the setup wizard
Usage
Start the conversational AI assistant:
juriko
Or specify a working directory:
juriko -d /path/to/project
First Run Experience
On your first run, JURIKO will guide you through:
- Provider Selection: Choose from Anthropic, OpenAI, or Grok
- Model Selection: Pick the best model for your needs
- API Key Setup: Enter your API key (with option to save it)
- Ready to Chat: Start conversing with your chosen AI
Switching Providers
You can easily switch between providers and models:
- Type
provider or switch in the chat
- Press
Ctrl+P for quick access
- Your preferences are automatically saved to
~/.juriko/user-settings.json
Custom Instructions
You can provide custom instructions to tailor JURIKO's behavior to your project by creating a .juriko/JURIKO.md file in your project directory:
mkdir .juriko
Create .juriko/JURIKO.md with your custom instructions:
# Custom Instructions for JURIKO CLI
Always use TypeScript for any new code files.
When creating React components, use functional components with hooks.
Prefer const assertions and explicit typing over inference where it improves clarity.
Always add JSDoc comments for public functions and interfaces.
Follow the existing code style and patterns in this project.
JURIKO will automatically load and follow these instructions when working in your project directory. The custom instructions are added to JURIKO's system prompt and take priority over default behavior.
Example Conversations
Instead of typing commands, just tell JURIKO what you want to do:
💬 "Show me the contents of package.json"
💬 "Create a new file called hello.js with a simple console.log"
💬 "Find all TypeScript files in the src directory"
💬 "Replace 'oldFunction' with 'newFunction' in all JS files"
💬 "Run the tests and show me the results"
💬 "What's the current directory structure?"
Using with Local LLMs
JURIKO works seamlessly with local LLM servers. Here are some examples:
juriko
ollama serve
juriko
./server -m codellama-7b.gguf --port 8080
juriko
Local LLMs are particularly useful for:
- Privacy-sensitive projects where you don't want to send code to external APIs
- Offline development when internet connectivity is limited
- Cost optimization for high-volume usage
- Custom fine-tuned models specific to your domain or coding style
Development
npm install
npm run dev
npm run build
npm run lint
npm run typecheck
Architecture
- Multi-LLM Client: Unified interface supporting Anthropic, OpenAI, Grok, and Local LLM APIs
- Provider Selection: Interactive UI for choosing providers and models with local LLM wizard
- Agent: Core command processing and execution logic with multi-provider support
- Tools: Text editor and bash tool implementations
- UI: Ink-based terminal interface components with provider management and local LLM configuration
- Settings: Persistent user preferences, API key management, and local server configuration
- Types: TypeScript definitions for the entire system including local LLM support
License
MIT