tabby-ai-chat
v1.0.2
Published
AI Chat plugin for Tabby - Chat with AI while accessing terminal context
Downloads
745
Readme
tabby-ai-chat
AI Chat plugin for Tabby - Chat with AI while accessing terminal context.
Features
- AI Chat Panel - Integrated chat interface in terminal tabs
- Terminal Context - Automatically capture and send terminal output as context
- Multiple Providers - Support for OpenRouter and LiteLLM/custom endpoints
- Model Selection - Browse and search available models
- Code Actions - Copy code blocks or execute commands directly in terminal
- Customizable - Adjust panel width, temperature, token limits, and more
Installation
From Tabby Plugin Manager
- Open Tabby
- Go to Settings > Plugins
- Search for
tabby-ai-chat - Click Install
Manual Installation
# Install globally
npm install -g tabby-ai-chat
# Or install to Tabby's plugin directory
cd ~/.config/tabby/plugins # Linux/macOS
cd %APPDATA%\tabby\plugins # Windows
npm install tabby-ai-chatConfiguration
After installation, go to Settings > AI Chat to configure:
Provider Setup
OpenRouter (recommended for cloud):
- Get an API key from openrouter.ai/keys
- Select OpenRouter as provider
- Enter your API key
- Choose a model from the list
LiteLLM / Custom Endpoint (for self-hosted):
- Select LiteLLM as provider
- Enter your endpoint URL (e.g.,
http://localhost:4000/v1) - Optionally add an API key
- Enter or select your model name
Settings
| Setting | Description | Default | |---------|-------------|---------| | Provider | OpenRouter or LiteLLM | OpenRouter | | Max Tokens | Maximum response length | 4096 | | Temperature | Response randomness (0-1) | 0.7 | | Context Lines | Terminal lines to capture | 100 | | Command Execution | insert / execute / ask | insert | | Panel Width | Percentage of terminal width | 35% | | Auto-attach Context | Capture context when opening | true |
Usage
Keyboard Shortcuts
| Action | Default Shortcut |
|--------|------------------|
| Toggle AI Chat Panel | Ctrl+Shift+A (macOS: Cmd+Shift+A) |
Chat Interface
- Open the AI panel with
Ctrl+Shift+A - Type your question or request
- Click the attachment icon to include terminal context
- Press Enter or click Send
Code Blocks
AI responses with code blocks include:
- Copy button - Copy code to clipboard
- Execute button - Run command in terminal (behavior based on settings)
Development
# Clone the repository
git clone https://github.com/ephb/tabby-ai-chat.git
cd tabby-ai-chat
# Install dependencies
npm install
# Build
npm run build
# Watch mode for development
npm run watch
# Lint
npm run lintTesting Locally
Set the TABBY_PLUGINS environment variable to load the plugin:
# Linux/macOS
TABBY_PLUGINS=/path/to/tabby-ai-chat tabby
# Windows (PowerShell)
$env:TABBY_PLUGINS="C:\path\to\tabby-ai-chat"; tabbyLicense
MIT - See LICENSE for details.
Author
Philipp Bontemps [email protected]
Contributing
Contributions are welcome! Please open an issue or submit a pull request.
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
