Skip to content

nobbmaestro/lazyhis

Repository files navigation

LazyHis

A simple terminal UI for shell history, written in Go!

GitHub Release GitHub Last Commit GitHub Commits Since MIT License

animated

Why LazyHis?

LazyHis focuses on simplicity, speed, and a clean terminal UI.

  • 🚀 Fast: Written in Go for maximum performance.
  • 🎨 Customizable: Supports themes and keybindings.
  • 🔍 Powerful: Advanced filtering, customizable, and shell integration.

Table of contents

Quick Install

1. Install the lazyhis binary:

brew tap nobbmaestro/homebrew-tap
brew install lazyhis

With Nix

nix build github:nobbmaestro/lazyhis
# or from a local clone
nix build

To integrate into your own flake, add lazyhis as an input and apply the overlay:

# flake.nix
{
  inputs = {
    nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
    lazyhis.url = "github:nobbmaestro/lazyhis";
  };

  outputs = { nixpkgs, lazyhis, ... }: {
    nixosConfigurations.myhost = nixpkgs.lib.nixosSystem {
      system = "x86_64-linux";
      modules = [
        {
          nixpkgs.overlays = [ lazyhis.overlays.default ];
          environment.systemPackages = [ pkgs.lazyhis ];
        }
      ];
    };
  };
}

The overlay works the same way with Home Manager:

{
  nixpkgs.overlays = [ lazyhis.overlays.default ];
  home.packages = [ pkgs.lazyhis ];
}

Build from Source

git clone git@github.com:nobbmaestro/lazyhis.git
cd lazyhis
make install

2. Add the init script to your shell's config file:

Zsh

Add the following to the end of ~/.zshrc:

# ~/.zshrc

eval "$(lazyhis init zsh)"

3. Import existing histfile:

Zsh

lazyhis history import --zsh /path/to/histfile

Feature Roadmap

  • Add export CLI command for exporting to HISTFILE
  • Add generate shell-completions CLI command
  • Add prune CLI command for removing history based on ignore pattern
  • Add dry flag for prune CLI command
  • Add verbosity flag for prune and import CLI commands
  • Copy to clipboard via GUI
  • Customizable GUI theme
  • Customizable command exclusion by patterns
  • Customizable command exclusion by prefix
  • Customizable keybindings
  • Delete history entries via GUI
  • Delete multiple history entries via GUI
  • Edit history entries via GUI
  • Filter history by context via GUI
  • Fuzzy-finder search strategy in GUI
  • Support for inline GUI mode

Customization

Check out the configuration docs.

Alternatives

If lazyhis isn't quite what you're looking for, you might prefer:

About

Simple terminal UI for shell history

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors