Fast Travel
Fast Travel
Supercharge your search bar
Fast Travel is a Bunnylol-inspired, configurable, command-based search engine replacement that you can easily host on GitHub Pages. It streamlines your searches and navigates the web quickly with a lightweight, static engine designed for speed and simplicity.
For example:
- Typing
g kittenswill search for “kittens” on Google. - Typing
ddg privacywill search for “privacy” on DuckDuckGo. - Typing
r/technologywill take you directly to the r/technology subreddit. - Typing
hnwill take you directly to Hacker News. - Typing
apps balatrowill search for “balatro” on Steam on desktop, the Google Play Store on Android, and the App Store on iOS. - Typing
$AAPLwill open the Yahoo Finance stock quote page for AAPL.
Features
- Configurable Commands: Easily modify, add, or remove search commands.
- Lightweight & Fast: Optimized for speed with a minimalistic design and static hosting.
- Device-Aware Routing: Automatically directs your queries based on your device (Windows, Android, iOS, etc.).
- Typo Detection: Automatically detects and suggests corrections for misspelled commands.
Setup Instructions
-
Fork the Repository:
Click the “Fork” button on the repository page to create your own copy. - Deploy on GitHub Pages:
- Update the page URL in your repository settings (navigate to
Settings > Pages > Custom domain) or configure theCNAMEfile. - It is recommended to use a subdomain (e.g.,
fast-travel.yourdomain.com) or a root domain (e.g.,yourdomain.com) rather than deploying on a subdirectory (e.g.,yourdomain.com/fast-travel), as not all platforms correctly recognize subdirectory URLs for search engines.
- Update the page URL in your repository settings (navigate to
-
Optional – Enable GitHub Actions:
If you experience workflow failures, consider enabling GitHub Actions with write access to ensure necessary updates are applied. -
Optional – Update Your Config:
Open theconfig.jsonfile to modify, add, or remove commands and routes. -
Replace Your Search Engine:
Follow these steps to replace your default search engine in popular browsers:Chrome on Windows/MacOS
1. Open **Settings > Search Engine > Manage search engines** or paste `chrome://settings/searchEngines` into your address bar. 2. In the "Site search" (or "Other search engines") section, click **Add**. 3. Fill in the details: - **Search engine:** Fast Travel - **Shortcut:** (e.g., `ft`) - **URL:** `https://fast-travel.yourdomain.com?q=%s` 4. Click **Add**. 5. Next to your new entry, click the menu icon and select **Make default**.Chrome on Android/iOS
1. Visit your Fast Travel page (e.g., `https://fast-travel.yourdomain.com`). 2. Perform a search using Fast Travel. (Don't skip this step.) 3. Tap the three dots in the top-right corner. 4. Choose **Settings**, then **Search engine**. 5. Select **Fast Travel** from the "Recently visited" section.Firefox on Windows/MacOS
1. Visit your Fast Travel page (e.g., `https://fast-travel.yourdomain.com`). 2. Right-click on the address bar and choose **Add Fast Travel**. 3. Open the hamburger menu in the top-right corner, then go to **Settings > Search**. 4. In the "Default Search Engine" section, select **Fast Travel** from the drop-down menu.Firefox on Android/iOS
1. Tap the three dots in the top-right corner. 2. Choose **Settings**, then **Search**. 3. Select **Default Search Engine**, then **+ Add Search Engine** 4. Fill in the details: - **Name:** Fast Travel - **Search string URL:** `https://fast-travel.yourdomain.com?q=%s` 5. Select Fast TravelNote:
Using a custom domain (likefast-travel.yourdomain.comoryourdomain.com) is preferred over a subdirectory deployment for optimal compatibility.
How the Commands Work
Fast Travel uses a command-based syntax defined in the config.json file. Commands are processed sequentially—if a query matches multiple patterns, the first match is used. Here’s how to use and customize them:
Basic Command Usage
- Open the Page:
- Syntax:
<command> - Example: Typing
gopens the default Google homepage.
- Syntax:
- Search a Query:
- Syntax:
<command> <query> - Example: Typing
g kittenssearches for “kittens” on Google using the command’s fallback URL.
- Syntax:
- Prefix Commands
- Syntax:
<prefix><term>[ <additional query>] - Examples:
- Typing
r/technologyimmediately opens the Reddit page for the r/technology subreddit. - Typing
$AAPLopens the Yahoo Finance quote page for AAPL.
- Typing
- Syntax:
- Subcommands / Custom Patterns
- Syntax:
<command> <subcommand>/<query>or using a custom regex defined in the config. - Examples:
- Typing
yt subsopens your YouTube subscriptions. - Typing
gh u/DoubleGremlin181searches for DoubleGremlin181’s profile on GitHub.
- Typing
- Syntax:
OS-Specific Options
Fast Travel adjusts its behavior based on your device’s operating system. The config.json file includes routes optimized for various platforms:
- Desktop: Windows, MacOS, Linux
- Mobile: Android, iOS
- Fallback: Use
*to apply to all devices
For instance, the apps command provides different routing options depending on whether you’re on Android (using the Play Store), iOS (using the App Store), or Desktop (using the Steam Store).
Customizing Commands
- Editing the Config:
Open theconfig.jsonfile to modify, add, or remove commands and their routes. You can customize:- Default URLs: The page that opens when no query is provided.
- Fallback URLs: Used for searches by appending the query to a specified URL.
- Custom Patterns: Regex or pattern-based routing (e.g.,
gh u/DoubleGremlin181) for advanced operations. These patterns typically follow thesubcommand/<parameter>structure. - Type: Commands can either be
default(space delimited) orprefix(starts with) type.
- Order of Processing:
The file is parsed sequentially. If a query matches multiple patterns, the first match is used. Arrange your custom patterns accordingly to ensure the desired behavior.
Tip: Adding debug=true to the URL parameters prints debug statements to the console and adds a 3s delay.
Credits
Ten Blue Links
Thanks to Ten Blue Links for serving as a valuable reference on how to replace the default search engine.
Favicon
This favicon was generated using graphics from Twitter Twemoji:
- Author: Copyright 2020 Twitter, Inc and other contributors (GitHub Repository)
- Source: 1f50e.svg
- License: CC-BY 4.0