https://github.com/johanli233/viby
Viby vibes everything.
https://github.com/johanli233/viby
llm mcp shell uv
Last synced: 5 months ago
JSON representation
Viby vibes everything.
- Host: GitHub
- URL: https://github.com/johanli233/viby
- Owner: JohanLi233
- License: gpl-3.0
- Created: 2025-04-30T02:19:50.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2025-05-08T08:43:20.000Z (5 months ago)
- Last Synced: 2025-05-08T09:37:51.062Z (5 months ago)
- Topics: llm, mcp, shell, uv
- Language: Python
- Homepage:
- Size: 1.36 MB
- Stars: 45
- Watchers: 6
- Forks: 2
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
![]()
Viby
Viby vibes everything
## π Overview
Viby is a powerful AI agent that lives in your terminal, designed to solve virtually any task you throw at it. Whether you need code assistance, shell commands, information retrieval, or creative content - Viby vibes with your needs and delivers solutions instantly.
## β¨ Features
- **Intelligent Conversations** - Engage in natural multi-turn dialogues
- **Automatic Shell Command Generation** - Get optimized shell commands when needed
- **Pipeline Integration** - Process data from other commands (e.g., `git diff | viby "write a commit message"`)
- **MCP Tools** - Extended capabilities through Model Context Protocol integration
- **Smart Tool Discovery** - Automatically finds and uses the most relevant tools within configured MCP servers
- **History Management** - Complete interaction history with search, export, and management
- **Command Embeddings** - Semantic search in tools using embedded vectors for accurate tool selection
- **Multi-language Support** - Full interface in English and Chinese with easy language switching
## π§ Installation
```sh
# Install from PyPI
pip install viby
# OR
uv tool install viby
```### Alternative Installation
```sh
# Install from source with uv
uv pip install -e .
```## Usage Examples
### Basic Question
```sh
yb "Write a quicksort in python"
# -> Sure! Here is a quicksort algorithm implemented in **Python**:
```### Interactive Chat Mode
```sh
yb --chat
# or
yb -c
|> Tell me about quantum computing
# -> [AI responds about quantum computing]
|> What are the practical applications?
# -> [AI responds with follow-up information]
|> exit
```### Process Piped Content
```sh
git diff | yb "Generate a commit message"
# -> Added information to the README
``````sh
yb "What is this project about?" < README.md
# -> This project is about...
```### Generate Shell Command
```sh
yb "How many lines of python code did I write?"
# -> find . -type f -name "*.py" | xargs wc -l
# -> [r]run, [e]edit, [y]copy, [c]chat, [q]quit (default: run):
```### Advanced Model Selection
```sh
# Use think model for complex analysis
yb --think "Analyze this complex algorithm and suggest optimizations"# Use fast model for quick responses
yb --fast "Translate 'Hello, World!' to French"
```### Shell Command Magic Integration
```sh
# List directory contents
yb "$(ls) What files are in the current directory?"
# -> The current directory contains: file1.txt, file2.py, directory1/...# Analyze Git status
yb "$(git status) Which files should I commit first?"# View code files
yb "$(cat main.py) How can I improve this code?"
```### Smart Tool Discovery
```sh
# Viby will automatically discover and use relevant tools
yb "What's the weather in San Francisco?"
# -> [Viby identifies and uses weather tools]
# -> The current weather in San Francisco is 68Β°F and partly cloudy...# Managing tool embeddings from configured MCP servers
yb tools embed
# -> Updates tools' semantic embeddings for better tool discovery
```### History Management
```sh
# View recent interactions
yb history list# Search your history
yb history search "python"# Export your interaction history
yb history export history.json# View command history
yb history shell
```### Automatically Use MCP Tools When Needed
```sh
yb "What time is it now?"
# -> [AI uses time tool to get current time]
# -> "datetime": "2025-05-03T00:49:57+08:00"
```### Keyboard Shortcuts
Viby provides a convenient keyboard shortcut (Ctrl+Q) that allows you to quickly use Viby with the current command line content:
```sh
# Install the keyboard shortcuts (auto-detects your shell)
yb shortcuts# After installation, type any command and press Ctrl+Q
help me analysis my readme file # Now press Ctrl+Q
# -> This transforms into: yb help me analysis my readme file
# -> [AI analyzes and responds to question]
```Supported shells:
- Bash
- Zsh
- FishAfter installing shortcuts, you'll need to reload your shell configuration (`source ~/.bashrc`, `source ~/.zshrc`, or equivalent) or restart your terminal for the shortcuts to take effect.
For more detailed examples and advanced usage, see the [Usage Examples](./docs/viby_usage_examples.md) documentation.
## Configuration
Viby reads configuration from `~/.config/viby/config.yaml`. You can set the model, parameters, and MCP options here.
### Interactive Configuration
Use the configuration wizard to set up your preferences:
```sh
yb --config
```This allows you to configure:
- API endpoint and key
- Model
- Temperature and token settings
- MCP tools enablement
- Interface language### MCP Server Configuration
Viby supports Model Context Protocol (MCP) servers for extended capabilities. MCP configurations are stored in `~/.config/viby/mcp_servers.json`.
## β Star History
## π Documentation
- [Usage Examples](./docs/viby_usage_examples.md) - Detailed examples of all Viby features
- [Project Design Document](./docs/viby_project_design.md) - Technical architecture and design## π€ Contributing
Contributions are welcome! Feel free to submit a Pull Request or create an Issue.