SkillAgentSearch skills...

Krabby

A keyboard interface to the web, inspired by Kakoune

Install / Use

/learn @alexherbo2/Krabby

README

Krabby

Platform Browser Discord IRC Plugins

Installation | Configuration | Documentation | Supported platforms | Browser compatibility | Troubleshooting | Contributing
<img src="https://www.iconfinder.com/icons/877852/download/svg/512" height="168" align="right">

Krabby is a browser extension (for Chrome and Firefox) for keyboard-based navigation, inspired by Kakoune.

The main differences with existing extensions are: multiple selections, keyboard layout agnostic, SOV (subject–object–verb) constructs and simple interaction with external programs. It is also quite usable with the mouse.

Thumbnail Button

See YouTube · Krabby and krabby-resources for all available demos.

TL;DR

WebExtensionKeyboard interfaceSubject–object–verb orderMultiple selectionsKakoune-inspired

Run the following in your terminal, then follow the onscreen instructions.

git clone https://github.com/alexherbo2/krabby
cd krabby
make install [static=no] [interactive=yes]

After installing, try to accomplish the following examples:

<details> <summary>Opening links in a paragraph</summary>

Navigate to https://tuppervim.org and type:

f{hint}s[alt+a][alt+I][ctrl+enter][alt+x]

Explanation

  • <kbd>f</kbd> enters hint mode,
  • {hint} is a placeholder for you to select a link,
  • <kbd>s</kbd> creates a selection out of the active element,
  • <kbd>Alt</kbd> + <kbd>a</kbd> expands the region,
  • <kbd>Alt</kbd> + <kbd>I</kbd> selects all links,
  • <kbd>Control</kbd> + <kbd>Enter</kbd> opens selected links in the background.
  • Optionally, <kbd>Alt</kbd> + <kbd>x</kbd> will undo the operation (closing right tabs).
</details> <details> <summary>Play videos with mpv</summary>

Navigate to https://youtube.com/results?search_query=Berserk+AMV and type:

F{hint}{hint}<page-down>{hint}<escape>m

Explanation

  • <kbd>F</kbd> enters hint mode (lock),
  • {hint} is a placeholder for you to select 2 links,
  • <kbd>Page Down</kbd> scrolls one page down,
  • {hint} is a placeholder for you to select another link,
  • <kbd>Escape</kbd> leaves hint mode.
  • Finally, <kbd>m</kbd> opens the selection with mpv.
</details>

If you want to play around without installing, a live demo is available here.

Features

  • Subject–object–verb order. Learn more at Differences with Vi(m).
  • Keyboard layout agnostic. Maps to physical keys, but displays with the US layout.
  • Multiple selections as a central way of interacting
  • Powerful selection manipulation primitives
  • Link hints
  • External editor support. Open your favorite editor on text inputs.
  • Tab search
  • Contextual commands
  • Contextual help
  • Simple interaction with external programs
  • Usable with the mouse. You can for example create a selection by grabbing a link with the mouse and <kbd>s</kbd> to create the selection. Or create multiple selections by clicking on hints with <kbd>F</kbd>. If you hold <kbd>Control</kbd> or <kbd>Command</kbd>, you can even make selections with the mouse selection area.
  • Limited scope. Krabby is not Vim, nor Kakoune. Krabby is trying to be a navigation tool and some concepts from code editors don’t translate well. For example, there is no concept of mode in Krabby, but a system of contexts.
  • Composability. Composability is better than extensibility. Krabby tries hard to provide features that interact well with each other. For example, <kbd>f</kbd> and <kbd>y</kbd> are two building blocks to focus a link and yank its URL. Depending on the context, <kbd>y</kbd> will yank the page or a link URL.
  • Modular (think Emacs). Krabby is divided into multiple small projects. At its core Krabby just holds the configuration and grabs its functionalities from other projects.
  • Chrome and Firefox support. It has also been tested on Opera, Vivaldi and Brave.

Dependencies

Extensions

  • Commands (WebExtension API to perform browser actions)
  • Shell (WebExtension API to execute external commands)
  • [Editor] (Open an external editor to edit text inputs)
  • [dmenu][webextension-dmenu] (Tab search, selection and beyond with a dmenu filter program)

Installation

Run the following in your terminal, then follow the onscreen instructions.

make install [static=no] [extensions=yes] [interactive=yes]

Supported platforms

Browser compatibility

| Web browser | Support | Engine | Notes | | ----------- |:-------:|:-------------------------------:| ------------------------------------------------------------------------ | | Chrome | ✓ | Blink | | | Chromium | ✓ | Blink | | | Firefox | ✓ | Gecko | Only developer or unbranded version | | Edge | ? | Blink | | | Opera | ✓ | Blink | | | Safari | ✗ | WebKit | | | Vivaldi | ✓ | Blink | | | Brave | ✓ | Blink | |

Credits

  • Kakoune ([@mawww]) for [ideas][Why Kakoune] and [selection.cc].
  • [Saka Key] ([@eejdoowad]) was a reference, for implementation and its code quality.
  • [@ul], for his advice and proofreading, especially in the early stages.
  • [@GeoGavilanes] for the Krabby icon.
  • [@occivink], for his work on [phantom selections][kakoune-phantom-selection], from which the “save and restore selections” feature is inspired.
  • mpv and Kakoune for their website, from which Krabby is inspired.
  • [@AdamWagner] for his work to unify scrolling mechanisms.

References

  • [Create a keyboard interface to the web]
View on GitHub
GitHub Stars307
CategoryDevelopment
Updated1mo ago
Forks20

Languages

HTML

Security Score

100/100

Audited on Feb 10, 2026

No findings