MCPcopy Index your code
hub / github.com/Magic-JD/is-fast

github.com/Magic-JD/is-fast @v0.17.7

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.17.7 ↗ · + Follow
423 symbols 882 edges 56 files 1 documented · 0%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

🌍 Internet Search Fast from the Terminal

is-fast is a TUI tool designed for quick and efficient internet searches directly from the terminal, ideal for environments where you don't have easy access to a browser. With simple commands, you can search the web, navigate results, and view content seamlessly in the terminal. It supports custom configurations for styling, content extraction, and syntax highlighting, and allows direct URL viewing, local HTML file rendering, and history tracking. is-fast is fast, lightweight, and perfect for developers and terminal enthusiasts.

This tool makes searching from the terminal fast and simple! 🚀

demo See more demos here!

⚡ is-fast

is-fast "search query"

or

is-fast search query

No waiting - just internet search fast in your terminal.
It is fast!


Running the Project 🏃

Prerequisites

Before running the project, ensure you have the following installed:

  • Rust (latest stable version) 🦀
  • Cargo (comes with Rust) 📦

Installing the program Latest Release 🐧 🍏 🪟

Install prebuilt binaries via shell script

curl --proto '=https' --tlsv1.2 -LsSf https://github.com/Magic-JD/is-fast/releases/latest/download/is-fast-installer.sh | sh

Install prebuilt binaries via Homebrew

brew install is-fast

Install latest from source with cargo:

cargo install --git https://github.com/Magic-JD/is-fast.git

Table Of Contents


Configuration Guide

This project supports both built-in and user-provided configurations for styles and content selection rules. Configuration is handled using a TOML file, and a default configuration is embedded within the binary. Users can override this configuration by placing a custom config file in their system's configuration directory. Changes will only take effect once the program is run again.

Default Configuration

A built-in configuration is included with the binary and is loaded automatically. The default configuration defines styles for various elements and selectors for extracting content from different websites.

Users can override the default configuration by creating a TOML configuration file in their system’s configuration directory.

--generate-config

Creates a config.toml in your system's configuration directory for customization:

is-fast --generate-config

This will only run if the user does not already have a configuration file in that location.

Location of User Configuration File

If not generated the configuration file should be placed in:

  • Linux: ~/.config/is-fast/config.toml
  • macOS: ~/Library/Application Support/is-fast/config.toml
  • Windows: %APPDATA%\is-fast\config.toml

If the --generate-config command is used a copy of the default configuration will be placed there automatically.

If you don't want to use the default config location, setting the environment variable IS_FAST_CONFIG_PATH will enable you to place it wherever you like.

export IS_FAST_CONFIG_PATH="/full/path/to/config.toml"

Tool Configuration

These configuration values are set for the entire tool, and will be in effect for every site.

🎨 Display Settings

The [display] section defines visual aspects of the output.

Border Color

This sets the border color used in the UI.

Page Margin

A percentage of the page width that should be empty on either side.

Scroll Amount

The amount that page down/page up should scroll you. Default to full page. Valid values are full, half and a numerical value, which will scroll that number of lines.

Color Mode

This sets when color should be shown. The default behavior is for it to show in the TUI but not in the --piped or redirected output. Possible values are tui never and always. This can be overriden by applying the --color flag when running is-fast

[display]
border_color = "#74c7ec"
page_margin = 10
scroll = "10"
color_mode = "always"

🕰️ History Settings

The [history] section defines how historical entries should be displayed.

Title Color

Sets the color for titles in the history list.

URL Color

Defines the color for URLs in the history list.

Time Color

Sets the color for the time field in the history list.

Text Color

Defines the text color of the search bar for history entries.

Search Type

Determines the type of search used for history entries. Available options: - fuzzy (default) - Uses a fuzzy search algorithm. - substring - Matches substrings exactly. - exact - Requires an exact match.

Enabled

Set this to false to stop tracking the sites you have visited.

[history]
title_color = "rgb(137, 180, 250)"
url_color = "rgb(186, 194, 222)"
time_color = "rgb(242, 205, 205)"
text_color = "rgb(116, 199, 236)"
search_type = "fuzzy"
enabled = false # Not currently tracking your history.

⌨️ Keybinding Settings

The [keybindings] section defines keyboard shortcuts for navigation in the UI.

Exit The key(s) used to exit the page view. Example: q|ESC

Next / Previous Keys used to navigate forward and backward between pages. Example: n|RIGHT, b|LEFT

Down / Up Scroll down or up by one line. Example: j|DOWN, k|UP

Page Up / Page Down Scroll up or down by a page. The number of lines is configured in the [display] section. Example: u+CTRL|PAGE_UP, d+CTRL|PAGE_DOWN

Open in Browser Opens the current item in the system's default browser. Example: o

Each field accepts one or more key combinations separated by |. Combinations can use modifiers like CTRL or ALT with + (e.g., o+CTRL).

[keybindings]
exit = "q|ESC"
next = "n|RIGHT"
previous = "b|LEFT"
down = "j|DOWN"
up = "k|UP"
page_up = "u+CTRL|PAGE_UP"
page_down = "d+CTRL|PAGE_DOWN"
open_in_browser = "o"

🔍 Search Configuration

Engine

Determines which search engine is used when performing searches. Available options:

  • duckduckgo (default) - Uses DuckDuckGo for search queries.
  • google - Uses Google Custom Search. Requires API configuration (see below).
  • kagi - Uses Kagi Search. Requires API configuration (see below).

📌 API Configuration for Google Search

If you choose google as your search engine, you must set up a Google Custom Search API. Follow these steps:

  1. Visit the Google Custom Search API page.
  2. Click Get Started and enable the API in your Google Cloud Console.
  3. Generate an API Key from the credentials section.
  4. Create a Custom Search Engine and obtain the Search Engine ID.
  5. Set the following environment variables:
export IS_FAST_GOOGLE_API_KEY="your_api_key_here"
export IS_FAST_GOOGLE_SEARCH_ENGINE_ID="your_search_engine_id_here"

These values must be provided for Google Search to function properly.

📌 API Configuration for Kagi Search

If you choose kagi as your search engine, you must have access to the Kagi search API. Relevant documentation is here.

After obtaining access and your API key, set the following environment variable:

export IS_FAST_KAGI_API_KEY="your_api_key_here"

Custom search engine

If you want to add your own custom search engine, please fork the repository and follow the instructions on this file.

[search]
engine = "google"

Site

If you want to restrict your search only to a certain domain, setting this value will only show you search results from that domain. This can be overridden by the --site argument.

[search]
site = "en.wikipedia.org"

Timeout

This setting allows you to set the timeout in seconds before the tool will give up on a search or page.

[search]
timeout = 10

🔍 Selectors

Definition

Selectors allow you to extract only relevant content from different websites. This is useful for customizing certain sites for a better user experience. If no selector is provided for a specific site then body will be used. Glob matching is used to match the site, or even certain urls within the site to extract the most relevant text. NOTE: If there are multiple globs that could match, the most restrictive should be placed higher in the config! Selectors are chosen from the first match only. Note that the CSS selectors defined here apply the full standard CSS selector logic, and are not limited to #id and .class only. This is in the tool configuration rather than the site configuration, because it is the most common reason that you would want to have a site specific configuration. This saves the user having to create a separate file for every case.

[selectors]
"*en.wikipedia.org*" = "p"
"*github.com/*/blob/*" = ".react-code-line-contents" # Selectors will apply in this order
"*github.com*" = ".markdown-body"

Effect

When processing content from Wikipedia, only `

` elements will be extracted. For GitHub, if the url contains the endpoint blob it will return only elements with the CSS class .react-code-line-contents. Otherwise, it will return the .markdown-body.

❓ Miscellaneous Settings

Open tool

This setting is unset by default, and controls the program that is used to open the page if you choose to open in browser. If unset this will be your default open tool. If you set this value it will execute the tool given to it. The tool must be available in your system to be able to run.

Text size supported

Enabling this will allow text size to be shown when available. This is currently only supported for direct output to kitty terminal. If you are not running this code in kitty v0.40.0+ terminal, or you are using tmux, screen, zellij or another alternate screen then this will not work, and you should not turn it on. By default, this is false. If this is switched off, the text size configuration will have no impact on the output.

[misc]
open_tool = "w3m"
text_size_supported = false

📝 Custom Site Configuration

This allows you to add or change the site configuration, based on the site url. Using glob matches, it allows you to specify any number of additional configurations, which are then applied in order. In any case the configurations are conflicting, the last one in the list will be applied. The configurations are given as file names, which must be located in the same config directory as your config.toml.

[custom_config]
"*.example.com/*" = ["alternate_headers.toml", "alternate_color_scheme.toml"]

Site Configuration

Site configurations are set in the config.toml file to define the default behaviour for is-fast, but they can be updated with additional configurations in the custom config section of the tool configuration. This allows all of these configurations to be specified on a site by site basis.

🏷 Block Elements

Definition

Block elements are HTML tags that should have a new line before and after them when processed. This helps preserve readability and logical structure in the parsed content.

Block Elements support limited CSS selector features.

div#center will newline only divs that are marked center. div.this.that will newline divs with the class this or the class that. .this.that will newline any element with the class this OR the class that.

that will newline any element with the id that.

div#center.this will newline any div with the i

Extension points exported contracts — how you extend this code

Search (Interface)
(no doc) [4 implementers]
src/search_engine/search_type.rs
HistoryViewer (Interface)
(no doc) [2 implementers]
src/app/enum_values.rs
PageViewer (Interface)
(no doc) [2 implementers]
src/app/enum_values.rs
AppFunctions (Interface)
(no doc) [2 implementers]
src/app/enum_values.rs

Core symbols most depended-on inside this repo

get
called by 33
src/search_engine/cache.rs
insert
called by 27
src/search_engine/cache.rs
determine_nth_element
called by 12
src/cli/parser.rs
to_display
called by 11
src/transform/format.rs
read_file_content
called by 10
src/transform/pretty_print.rs
determine_ignored
called by 9
src/cli/parser.rs
parse_pretty_print
called by 9
src/cli/parser.rs
basic_syntax_highlighter
called by 9
src/transform/format.rs

Shape

Function 182
Method 168
Class 54
Enum 15
Interface 4

Languages

Rust100%

Modules by API surface

src/config/load.rs41 symbols
src/cli/parser.rs38 symbols
src/config/color_conversion.rs30 symbols
src/transform/format.rs28 symbols
src/config/site.rs23 symbols
src/transform/page.rs21 symbols
src/search_engine/cache.rs19 symbols
src/tui/history_content.rs16 symbols
src/config/format.rs15 symbols
src/config/tool_raw.rs14 symbols
src/tui/history_widgets.rs12 symbols
src/tui/display.rs11 symbols

For agents

$ claude mcp add is-fast \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact