@nemasu/galdr
v0.5.0
Published
CLI tool that combines multiple AI coding assistants (Claude, Gemini, Copilot, DeepSeek API, Cursor)
Maintainers
Readme
Galdr
A CLI tool that integrates multiple CLI AI coding assistants (Claude Code, Gemini CLI, Copilot CLI, Cursor CLI) and DeepSeek API support with provider switching and persistent context management.
Features
- Multi-Provider Integration: Single interface for Claude, Gemini, Copilot, DeepSeek, and Cursor
- Provider Switching: Automatic switching between providers when token limits are reached
- Switching Modes: Rollover, manual, and round-robin provider selection strategies
- Context Persistence: Complete conversation history stored and restored between sessions
- Context Compaction: Automatic summarization of long conversations to manage token session limits
- Session Management: Save, load, and manage multiple conversation sessions
- DeepSeek Tool Integration: Built-in support for file operations (read, write, list, find, edit, Google search, DuckDuckGo search, web fetch)
- Existing Tool Integration: No API account necessary, Galdr leverages installed AI CLI tools.
Installation
NPM Package (Recommended)
# Install from npm
npm i -g @nemasu/galdrPrerequisites
Install at least one of these AI CLI tools:
- Claude CLI
- Gemini CLI
- GitHub Copilot CLI
- DeepSeek API (requires API key)
- Cursor CLI untested
Development Setup (From Source)
# Clone and install
npm install
npm run build
# Optional: Install globally
npm linkUsage
Basic Commands
# Start interactive chat
galdr
# Chat with initial prompt
galdr "explain how async/await works in JavaScript"
# Use specific provider
galdr --provider geminiChat Commands
| Command | Description |
|---------|-------------|
| /exit, /quit | Exit the chat |
| /switch <provider> | Switch to specific provider |
| /mode <mode> | Change switching mode |
| /model <provider> <model> | Set model for provider |
| /clear | Clear history and screen |
| /compact [keep] | Compact history, keep N recent messages |
| /history | Show conversation statistics |
| /status | Show provider availability |
| /verbose | Toggle verbose logging |
| /help | Show all commands |
| /sessions | List saved sessions |
| /session-new <name> [desc] | Create new session |
| /session-load <name> | Load existing session |
| /session-save [desc] | Save current session |
| /session-delete <name> | Delete session |
| /session-rename <old> <new> | Rename session |
Context Management
# Show conversation history
galdr context --show
# Clear conversation context
galdr context --clear
# Compact context (keep last 10 messages)
galdr context --compact 10Provider Status
# Check provider availability and usage
galdr statusConfiguration
Switching Modes
Galdr supports three provider switching strategies:
- Manual (Default): User manually chooses provider for each request
- Rollover: Automatically switches to next provider when token limits are reached
- Round-robin: Cycles through providers for each request
Change modes in-chat with /mode <mode>
Auto-Compaction
When conversation history exceeds 50 messages, Galdr automatically:
- Keeps the 20 most recent messages
- Summarizes older messages using available LLMs
- Maintains conversation context while staying within token limits
Manual compaction: /compact [N] - keeps N recent messages, summarizes the rest
Session Management
Organize conversations into sessions:
- Create, save, and load multiple conversation contexts
- Store sessions for different projects or topics
- Persistent storage in
.galdr/sessions/
Data Storage
- Sessions:
.galdr/sessions/directory - Configuration:
~/.galdr/config.json(for defaults and DeepSeek API key)
Development
Building from Source
For development or if you want to build from source:
# Install dependencies
npm install
# Build the project
npm run build
# Run locally
npm startTesting
- Credit Limit Detection: Tests for detecting credit limit messages across all providers
- Session Limit Logic: Tests for context limit detection and conversation trimming
# Run all tests
npm test
# Run specific test categories
npm test -- --testPathPattern="credit-limit"
npm test -- --testPathPattern="session-limit"
# Run in watch mode
npm run test:watch
# Generate coverage report
npm run test:coveragePlanned Enhancements
- Improve token limit detection
- Context usage indicator
- Multi-provider comparison mode?
License
MIT License
