MCPcopy Index your code
hub / github.com/facebook/bunnylol.rs

github.com/facebook/bunnylol.rs @v0.2.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.2.0 ↗ · + Follow
625 symbols 925 edges 66 files 62 documented · 10%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

bunnylol.rs — Smart browser bookmarks with Rust

Crates.io Downloads Contributors Stargazers License

A modern rust clone of <a href="https://github.com/ccheever/bunny1">bunny1</a>.

Demo

Enter gh facebook/react in your browser's address bar to open the React repository on GitHub.

bunnylol.rs demo

Or run the CLI:

$ bunnylol gh facebook/react

Installation

Install from crates.io:

# Install both CLI and server (3.9MB)
$ cargo install bunnylol

# Install just the CLI (1.4MB - recommended for terminal use only)
$ cargo install bunnylol --features cli --no-default-features

# Install just the server (3.6MB - recommended for web server deployments)
$ cargo install bunnylol --features server --no-default-features

Or build from source:

# Clone the repository
$ git clone https://github.com/facebook/bunnylol.rs.git
$ cd bunnylol.rs

# Install both CLI and server
$ cargo install --path .

# Install just the CLI
$ cargo install --path . --features cli --no-default-features

# Install just the server
$ cargo install --path . --features server --no-default-features

CLI Quickstart

Use bunnylol to open URLs directly from your terminal!

Basic Usage

# Open GitHub
$ bunnylol gh

# Open Instagram Reels
$ bunnylol ig reels

# Open a specific GitHub repository
$ bunnylol gh facebook/react

# Preview URL without opening browser (dry-run)
$ bunnylol --dry-run gh facebook/react
# Output: https://github.com/facebook/react

# List all available commands with a beautiful table
$ bunnylol list

Quick Examples

CLI Command What it does
bunnylol gh Open GitHub homepage
bunnylol gh facebook/react Open facebook/react repository
bunnylol ig reels Open Instagram Reels
bunnylol tw @facebook Open Twitter profile
bunnylol r r/rust Open r/rust subreddit
bunnylol --dry-run meta ai Print Meta AI URL without opening
bunnylol --help Show help information
bunnylol --version Show version information
bunnylol list Display all commands in a formatted table

Recommended: Create a Shell Alias

For even faster access, add an alias to your shell configuration:

# Add to ~/.bashrc or ~/.zshrc
alias b="bunnylol"

# Then use it like this:
$ b ig reels
$ b gh facebook/react
$ b list

CLI Configuration

The bunnylol CLI supports optional configuration via a TOML file following the XDG Base Directory Specification.

Configuration File Location

Bunnylol uses different config file locations depending on how it's run:

For CLI and manual server usage (bunnylol serve): - Linux/macOS: ~/.config/bunnylol/config.toml (or $XDG_CONFIG_HOME/bunnylol/config.toml if set) - Windows: %APPDATA%\bunnylol\config.toml

For system service (sudo bunnylol service install): - Linux: /etc/bunnylol/config.toml

The config file is automatically created with sensible defaults when you first run bunnylol.

Configuration Features

The CLI works perfectly fine without any configuration file. However, you can customize the following features:

1. Default Browser Selection

Specify which browser to open URLs in:

# ~/.config/bunnylol/config.toml
browser = "firefox"  # or "chrome", "chromium", "safari", etc.

If not specified, the system default browser is used.

2. User-Defined Bindings

Create your own personalized shortcuts without recompiling bunnylol:

[user_bindings]
# URL binding: open a fixed URL or substitute URL-encoded args into {}
cal = { url = "https://calendar.google.com/calendar/u/1/r" }
jira = { url = "https://corp.atlassian.net/browse/{}", description = "Jira ticket" }

# Command binding: rewrite to another bunnylol command
work = { command = "gh mycompany", description = "Work GitHub" }
blog = { command = "gh username/blog" }

# Built-ins win by default. Use override = true only when you want to shadow one.
gh = { command = "gh mycompany/main-repo", override = true }

Then use them like any built-in command:

$ bunnylol cal
# Opens: https://calendar.google.com/calendar/u/1/r

$ bunnylol jira PROJ-123
# Opens: https://corp.atlassian.net/browse/PROJ-123

$ bunnylol work
# Opens: https://github.com/mycompany

$ bunnylol blog
# Opens: https://github.com/username/blog

Legacy [aliases] entries are still read for compatibility, but they are deprecated. When bunnylol loads a config with [aliases], it migrates those entries into [user_bindings] and removes the old [aliases] section. Comments outside [aliases] are preserved.

3. Custom Default Search Engine

Override Google as the fallback search engine:

default_search = "ddg"  # Options: "google" (default), "ddg", "bing"

When a command isn't recognized, it will search using your configured engine instead of Google.

4. Command History Tracking

Track your recently used commands (enabled by default):

[history]
enabled = true
max_entries = 1000

History is stored at: - Linux/macOS: ~/.local/share/bunnylol/history (or $XDG_DATA_HOME/bunnylol/history if set) - Windows: %APPDATA%\bunnylol\history

Complete Configuration Example

Here's a full example with all available options:

# ~/.config/bunnylol/config.toml

# Browser to open URLs in (optional)
browser = "firefox"

# User-defined bindings (optional)
[user_bindings]
cal = { url = "https://calendar.google.com/calendar/u/1/r" }
jira = { url = "https://corp.atlassian.net/browse/{}", description = "Jira ticket" }
work = { command = "gh mycompany", description = "Work GitHub" }
blog = { command = "gh username/blog" }
gh = { command = "gh mycompany/main-repo", override = true }

# Default search engine when command not recognized (optional)
# Options: "google" (default), "ddg", "bing"
default_search = "ddg"

# Stock website provider (optional)
# Options: "yahoo" (default), "finviz", "tradingview", "google", "investing"
stock_provider = "finviz"

# Command history settings (optional)
[history]
enabled = true
max_entries = 1000

# Server configuration (for bunnylol serve) (optional)
[server]
port = 8000
address = "127.0.0.1"  # Use "0.0.0.0" for network access
log_level = "normal"   # Options: "normal", "debug", "critical", "off"
server_display_url = "https://bunny.example.com"  # Public URL shown on bindings page

Platform-Specific Directory Structure

The CLI uses platform-appropriate directories for configuration and data:

Platform Type Path
Linux/macOS User Config ~/.config/bunnylol/config.toml

(or $XDG_CONFIG_HOME/bunnylol/config.toml) | | Linux | System Config | /etc/bunnylol/config.toml

(when running as system service) | | Linux/macOS | Data | ~/.local/share/bunnylol/

(or $XDG_DATA_HOME/bunnylol/) | | Windows | Config | %APPDATA%\bunnylol\config.toml | | Windows | Data | %APPDATA%\bunnylol\ |

Quickstart - Web Server

After installing bunnylol, start the server:

$ bunnylol serve

Or use Docker:

$ git clone https://github.com/facebook/bunnylol.rs.git
$ cd bunnylol.rs
$ docker compose up -d

Or build from source:

$ git clone https://github.com/facebook/bunnylol.rs.git
$ cd bunnylol.rs
$ cargo run -- serve

Installing as a System Service

For production use on Linux, install bunnylol as a systemd service that starts automatically on boot:

# Install bunnylol first
$ cargo install bunnylol

# Install as system service (requires sudo, Linux only)
# Default: localhost only (127.0.0.1)
$ sudo bunnylol service install

# For network access (production servers)
$ sudo bunnylol service install --network

# The installer will:
# - Create /etc/systemd/system/bunnylol.service
# - Create /etc/bunnylol/config.toml with server settings
# - Enable autostart on boot
# - Start the service immediately

# Manage the service
$ sudo bunnylol service status
$ sudo bunnylol service logs -f
$ sudo bunnylol service restart

# Uninstall
$ sudo bunnylol service uninstall

Network Access: - Without --network (default): Binds to 127.0.0.1 (localhost only, secure default) - With --network: Binds to 0.0.0.0 (accessible from network, for production servers)

The service installer works on: - Linux: systemd (Ubuntu 16.04+, Debian 8+, CentOS 7+, etc.)

macOS and Windows: Use Docker instead (see above) or run bunnylol serve directly.

For more details, see the Deployment Guide.

Open your web browser and navigate to http://localhost:8000/?cmd=fb to get redirected to Facebook.

Open http://localhost:8000/?cmd=gh facebook/bunnylol.rs to be redirected to this repo.

Setting bunnylol to be your default search engine

You can set your default search engine to http://localhost:8000/?cmd=%s and use bunnylol.rs for everything. For this to work, you will need to have the server deployed and running locally or on a server.

Note: For best results, deploy bunnylol on a networked server accessible from all your devices, rather than just running it locally.

Desktop Browsers

Mobile Browsers

Note: iOS Safari does not support custom search engines, so you'll need to use Firefox (or another browser that does) instead.

iOS (Firefox)

  1. Install Firefox and set it as the default browser
  2. Change your default search engine in Firefox for iOS

Android (Firefox)

Command Reference

📚 Click to view all available commands (46 commands, 82+ bindings)

Development & Package Managers

Command Aliases Description Example
gh Navigate to GitHub repositories gh facebook/react
gitlab gl Navigate to GitLab projects or search GitLab gitlab gitlab-org/gitlab
cargo crates Navigate to crates.io or search for Rust crates cargo serde
npm npmjs Navigate to npmjs.com or search for npm packages npm react
pypi pip Navigate to pypi.org or search for Python packages pypi requests
rubygems gem, gems Navigate to rubygems.org or search for Ruby gems gem rails
go golang, gopkg Navigate to pkg.go.dev or search for Go packages go http
nuget Navigate to nuget.org or search for .NET packages nuget newtonsoft
packagist composer Navigate to packagist.org or search for PHP packages packagist symfony
brew homebrew Navigate to formulae.brew.sh or search for Homebrew packages brew wget
choco chocolatey Navigate to community.chocolatey.org or search for Windows packages choco git
dockerhub docker Navigate to Docker Hub or search for container images docker nginx

Programming Documentation

Command Aliases Description Example
rust Navigate to Rust documentation or search Rust std docs rust HashMap
python pydocs, py Navigate to Python documentation or search for Python resources python list
node nodejs Navigate to Node.js API documentation or specific module docs node fs
godocs Navigate to Go language documentation godocs
hack Navigate to Hack documentation or search Hack docs hack async
mdn Navigate to MDN Web Docs or search for web development resources mdn flexbox
stackoverflow so Navigate to Stack Overflow or search for programming questions so rust ownership

Social Media

Command Aliases Description Example
ig instagram Navigate to Instagram profiles, search, or access Reels/Messages ig @instagram
tw Navigate to Twitter profiles or search Twitter tw @MetaOpenSource
threads Navigate to Threads profiles or search Threads threads @zuck
fb Navigate to Facebook pages or search Facebook fb Meta
li linkedin Navigate to LinkedIn or search li software engineer
reddit r Navigate to Reddit or search subreddits r r/rust
yt youtube Navigate to YouTube or search for videos (suppo

Extension points exported contracts — how you extend this code

BunnylolCommand (Interface)
Bunnylol Command trait that all URL builders must implement [50 implementers]
src/commands/bunnylol_command.rs

Core symbols most depended-on inside this repo

build_search_url
called by 29
src/utils/url_encoding.rs
write_test_config
called by 12
tests/cli_integration.rs
add
called by 11
src/history.rs
build_path_url
called by 9
src/utils/url_encoding.rs
server_config_with_display_url
called by 9
src/config/mod.rs
encode_url
called by 7
src/utils/url_encoding.rs
search_url
called by 6
src/commands/search.rs
url_binding
called by 6
src/config/user_bindings.rs

Shape

Function 382
Method 166
Class 70
Enum 6
Interface 1

Languages

Rust100%

Modules by API surface

src/config/mod.rs54 symbols
src/commands/github.rs28 symbols
src/commands/stock.rs25 symbols
tests/cli_integration.rs21 symbols
src/config/user_bindings.rs21 symbols
src/config/alias_migration.rs21 symbols
src/utils/url_encoding.rs16 symbols
src/history.rs16 symbols
src/commands/instagram.rs16 symbols
src/bunnylol_command_registry.rs15 symbols
src/commands/schwab.rs14 symbols
tests/server_e2e.rs13 symbols

For agents

$ claude mcp add bunnylol.rs \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page