When Bash prompts you for a command, a library called readline handles your keystrokes. Readline lacks many features users have come to expect. Flyline is a readline replacement that provides an enhanced line editing experience with: - Intellisense style autosuggestions - Change directory using your prompt - Rich prompt customizations, (asynchronous widgets), and animations - Fuzzy history searching - Mouse support (click to move cursor, select text) - Improvements to Bash's tab completion - Synthesize tab completion suggestions with flycomp - Agent assisted command writing - Tooltips - Text selection - Auto close brackets and quotes - Syntax highlighting - Runs in the same process as Bash - Cursor animations and styles
Flyline is similar to ble.sh but is written in Rust and uses ratatui.rs to more easily draw complex user interfaces.
[!IMPORTANT] After installing, run
flyline run-tutorialand if you don't like the mouse capturing:flyline mouse --mode disabled
install.sh[!TIP] Run this command in bash to download flyline and update your
.bashrcto load the latest version. No need forsudo!
source <(curl -sSfL https://github.com/HalFrgrd/flyline/releases/latest/download/install.sh)
On macOS you must first install a version of Bash that supports custom builtins: brew install bash
On macOS and Linux, you can install via Homebrew:
brew install bash # Needed if you only have default macOS bash installed
brew install flyline
Arch users can install the AUR package:
paru -S flyline
The flake provides a package, a development shell, and a NixOS module. The
module installs Flyline through the system closure and loads that exact store
path into interactive Bash; it does not modify .bashrc or run an installer.
Add the input to your system flake:
inputs.flyline.url = "github:HalFrgrd/flyline";
Import the module and enable it in the NixOS configuration:
modules = [
inputs.flyline.nixosModules.default
];
programs.flyline.enable = true;
For local development, use nix develop. Build the package with
nix build .#flyline.
Download the latest libflyline.so for your system from the releases page. If you are on Linux, you probably want the gnu variant unless you know you are on a musl based Linux distro (e.g. Alpine, Chimera).
Then, in your .bashrc (or in your current Bash session):
enable flyline 2>/dev/null || enable -f /path/to/libflyline.so flyline
flyline run-tutorial
Clone the repo and run:
cargo build
enable flyline 2>/dev/null || enable -f /path/to/flyline_checkout/target/debug/libflyline.so flyline
flyline run-tutorial
Flyline sets up its own tab completion
so you can type flyline <Tab> in your shell to interactively browse and configure settings. Copy the commands into your .bashrc so they persist.
Explore this README and examples for what you can configure.
Flyline supports dynamic content in PS1, RPS1 / RPROMPT, PS1_FILL, PROMPT_RULER, and PS2.
The PS1 environment variable sets the left prompt just like normal. See Bash prompt documentation, Arch Linux wiki, or Starship for more information.

PS1='\u@\h:\w$ '
PS1='\u@\h:\w\n$ '
PS1='\e[01;32m\u@\h\e[00m:\e[01;34m\w\e[00m\n$ '
[!TIP] Do git metrics slow down your prompt loading time? See custom widget or example widgets for a solution.
The RPS1 / RPROMPT variable sets the right prompt similarly to Zsh.

RPS1='\t'
RPS1='\t\n<'
RPS1='\e[01;33m\t\n<\e[00m'
PS1_FILL fills the gap between the PS1 and RPS1 lines.

PS1_FILL='-'
PS1_FILL='🯁🯂🯃🮲🮳' # finger pointing to running man
PS1_FILL='🯁🯂🯃🮲🮳 \D{%.3f}'
PROMPT_RULER (or PS1_RULER) draws a horizontal separator above the prompt to cleanly separate previous command output from the new prompt.

# Draw a full-width line with a box-drawing character
PROMPT_RULER='─'
# Style the ruler with ANSI colours
PROMPT_RULER=$'\e[90m─\e[0m'
# Insert a blank line above the prompt
PROMPT_RULER='empty-line'
The PS2 environment variable configures the multi-line continuation prompt.
FLYLINE_PROMPT_LINE_NUMBER will be replaced by the line number:

# Styled line numbers with ANSI color
PS2='\e[2mFLYLINE_PROMPT_LINE_NUMBER>\e[0m '
# Custom prompt prefix with line numbers
PS2='\e[2mline FLYLINE_PROMPT_LINE_NUMBER:\e[0m '
# If you do want the default '> ' prompt, then you want:
PS2='\e[0m> '
PS1_FINAL, RPS1_FINAL, PS1_FILL_FINAL, and PROMPT_RULER_FINAL let you configure transient prompts. When a command is submitted, Flyline performs a final redraw using these environment variables instead of their standard counterparts. This keeps your terminal scrollback history clean by replacing complex, multi-line prompts with a minimal version.
PS1_FINAL='Ran at \D{%Y-%m-%d %H:%M:%S}> '
RPS1_FINAL=''
PS1_FILL_FINAL=''
PROMPT_RULER_FINAL=''
Flyline recognises the standard Bash time escape sequences and re-evaluates them on every prompt draw, so the time shown is always current:
| Sequence | Output |
|---|---|
\t |
24-hour time — HH:MM:SS |
\T |
12-hour time — HH:MM:SS |
\@ |
12-hour time with am/pm |
\A |
24-hour time — HH:MM |
\D{format} |
Custom format (see below) |
These can be placed in any of the supported prompt variables:
# Right prompt showing 24-hour time in green
RPS1='\e[01;32m\t\e[0m'
# Right prompt showing 12-hour am/pm time
RPS1='\e[01;34m\@\e[0m'
\D{format}Use \D{format} with any Chrono format string to display the time exactly how you want it. This is similar to \D{format} in the Bash prompt documentation, but the format string is interpreted by Chrono rather than strftime.
# Show date and time
RPS1='\e[01;32m\D{%Y-%m-%d %H:%M:%S}\e[0m'
# Show only hours and minutes
RPS1='\D{%H:%M}'
Create custom prompt widgets with flyline create-prompt-widget.
Flyline will replace strings in the prompt matching the widget name with the widget's output.
The available widget types are animation, mouse-mode, copy-buffer, custom, and last-command-duration.
Create your own animations with flyline create-prompt-widget animation --name [your animation name here] [FRAMES]....
Flyline will replace strings in the prompt matching the animation name with the animation:
More examples can b
| 日期 | 榜单 | 排名 | 周期新增 | 总 STAR |
|---|