Terminal file manager

🦙 llama


Llama Screenshot

Llama — a terminal file manager.

Why another file manager? I wanted something simple and minimalistic, something to help me with faster navigation in the filesystem. A cd & ls replacement. So I build "llama". It allows to quickly navigate with fuzzy searching, cd integration is quite simple. Opens vim right from llama. That's it. Simple and dumb as a llama.

Install

go get github.com/antonmedv/llama

Or download prebuild binaries.

Put the next function into ~/.bashrc:

function ll {
  llama "$@" 2> /tmp/path
  if [[ -d `cat /tmp/path` ]]; then
    cd `cat /tmp/path`
  fi
}

Use ll to navigate the filesystem. Note: we need a such helper as the child process can't modify the working directory of the parent process.

Usage

Key binding Description
Arrows Move cursor
Enter Enter directory
Backspace Exit directory
[A-Z] Fuzzy search
Esc Exit with cd
Ctrl+C Exit with noop

Use LLAMA_EDITOR environment variable to specify program for opening files.

export LLAMA_EDITOR=vim

License

MIT

Owner
Anton Medvedev
SRE at Google
Anton Medvedev
Comments
  • Feature add - Context Menu

    Feature add - Context Menu

    Adds a spacebar powered context menu, with the following options:
    select - Focuses on a file for move and copy operations copy - copies the selected file to the currently browsed directory move - moves the selected file to the currently browsed directory delete - runs "rm -rf" on the currently focused file/directory settings - directly opens ~/.llamarc

    This is facilitated by the addition of a bool to the model, "contextMenu". Based on the value of this new bool, it selects for different actions for select keys (Up, down, enter, spacebar).

    At this time, the options are scrolled through, but only one is displayed at a time.

    Context Menu screenshot attached. ContextMenu

  • Added ability to select editor inside llama

    Added ability to select editor inside llama

    Adding an additional hotkey (Ctrl+e) to spawn and de-spawn a text input window (that does not interfere with current fuzzy searching setup) that allows the user to temporarily assign the editor that is used without having to change the env variable and respawn llama.

    Thoughts?

  • Refresh in combination with o

    Refresh in combination with o

    llama might need a refresh after launching applications like the o text editor.

    Steps to reproduce:

    • Use alacritty.
    • Install o: go install github.com/xyproto/o@latest
    • Set EDITOR:export EDITOR=o
    • Launch llama and open a text file.
    • Quit o with ctrl-q.
    • Move arrows up and down.
    • Observe that some of the text in llama is gone.

    Thanks for creating llama, it was quick to install and fun to use. :+1:

  • Update README.md PowerShell Script

    Update README.md PowerShell Script

    Context:

    • Per #30, the README.md script provided for Windows/PowerShell users fails to navigate to the selected directory.
      • The issue appears to be related to an upstream dependency.
    • Onboarding users should be able to copy/paste the provided script and have it work as expected.

    Changes (Functional):

    • None.

    Additional Notes & Tech Debt:


  • Vim mode

    Vim mode

    This update enables Vim keybindings when LLAMA_VIM_KEYBINDINGS=true is set.

    Vim mode uses hjkl for navigation by default. Search-to-match can be activated with / and deactivated with esc. When search-to-match is active esc to quit is disabled and an indicator appears in the view.

    This PR is based on https://github.com/antonmedv/llama/pull/8, however I'm implementing this separately because of the addition of the keymap (from Bubbles), which I believe simplifies the code.

    Closes #2.

  • Add vim key bindings hjkl

    Add vim key bindings hjkl

    Adds support for hjkl. Closes #2.

    Fuzzy search mode is activated with / and deactivated with Esc. Changing directories also deactivates it.

    For now, this is a breaking change. Making it configurable with export LLAMA_VIM_KEYBINDINGS=true seems to require multiple switch case statements, which is quite messy imo. Unless there is a better way?

    Note: The git diff seems to have gone wonky after nesting the switch statement within an else.

  • Update Bubble Tea to v0.23.0 and Lip Gloss to v0.6.0

    Update Bubble Tea to v0.23.0 and Lip Gloss to v0.6.0

    This also means we can remove the manual color profile detection as Lip Gloss will now properly detect the color profile over stderr per https://github.com/charmbracelet/bubbletea/issues/172.

  • Add Home, End, PageUp and PageDown navigation keybindings

    Add Home, End, PageUp and PageDown navigation keybindings

    Add some more navigation options:

    Home - Goes to start of list End - Goes to the end of list PageUp - Goes to top of current column PageDown - Goes to bottom of current column

    The bindings mimic Shift+Left, Shift+Right, Shift+Up, Shift+Down.

    Closes #45.

  • Enable arrows keys in Vim mode

    Enable arrows keys in Vim mode

    This adds arrow key navigation to Vim mode so that you can also use the arrow keys to navigate. As a bonus, you can also use the arrow keys when search mode is active.

  • panic: read /dev/stdin: resource temporarily unavailable

    panic: read /dev/stdin: resource temporarily unavailable

    Hey there.

    On OSX 11.4 (Intel), I get the following error after navigating to a file, editing it with Neovim, and exiting Neovim:

    panic: read /dev/stdin: resource temporarily unavailable
    
    goroutine 1 [running]:
    main.main()
    	/Users/anton/dev/llama/main.go:66 +0x277
    
  • Terminal Picture Viewer

    Terminal Picture Viewer

    Wanted to know your thoughts on the addition of functionality to "print" a picture to the terminal. Got it working with a modified version of https://github.com/ichinaski/pxl, and appears to work in the terminals I've tested it in.

    On one hand, I've been getting actual use out of it (remote viewing of scraped webpages/assets and remote rapid forensics), but on the other understand it could be seen as feature creep. I have a working version on a seperate branch on my fork. In its current implementation it does add another key ("q" for quit).

  • Add keybindings help

    Add keybindings help

    Add help for basic keybindings. Using the bubbletea help API.

    Note: This could be heavily influenced by a configuration file as in #56 by @TheReptar. So until further progress there, this is a draft.

  • ImageMagick is not invoked correctly for .JPG files in home directory

    ImageMagick is not invoked correctly for .JPG files in home directory

    llama (1.0.1-4-g0fad6ce) does not invoke ImageMagick on Lubuntu (21.10) when imagemagick (8:6.9.11.60+dfsg-1ubuntu1) is already installed.

    Error received:

    No identify available
    Install ImageMagick to browse images
    
  • Add Configuration

    Add Configuration

    Resolves (partially) #45 Resolves (partially) #51

    Context:

    • There are a couple open issues that request alternative mappings to existing actions.
      • #45
      • #51
    • Users will likely continue to request alternative mappings well into the future to accommodate preference or accessibility needs.
    • It's neither feasible nor desirable to manually add every possible alternative mapping to the codebase.
    • Some users may not like the new or additional mappings, or may wish to disable certain functionality altogether.

    Changes (Functional):

    • Users can configure mappings for any keyXYZ action using a json configuration file.
      • By default this configuration file will be searched for at ~/.config/llama/config.json, but this may be overridden using the LLAMA_CONFIG environment variable.
      • Any of the properties contained in the charmbracelet/bubbles key.Binding struct may be overridden.
    • Example configuration file:
      {
        "bindings": [
          // {
          //   action   : string
          //   keys     : string[]
          //   disabled : boolean
          //   help     : { key : string, desc: string }
          // }
          {
            "action": "keyQuit",
            "keys": [ "q", "tab" ],  // Bind keyQuit to activate with 'q' or 'tab' instead of `esc`
          },
          {
            "action": "keyDelete",
            "disabled": true         // Disable the keyDelete action
          }
        ]
      }
      

    Code Changes:

    • New file in main package: configuration.go
      • Resolves LLAMA_CONFIG environment variable or default configuration path and reads the configuration file.
      • Maps action strings to key.Binding struct references, and overrides the binding's properties with any values found in the configuration file.
    • Add configuration processing as the first step during application launch.

    Additional Notes & Tech Debt:

    • As new actions are added in main.go, those actions should be added to the map in configuration.go to ensure user's can configure their key bindings.

  • Better serach

    Better serach

    1. Search input is temporary and you can't select next match with some hotkey
      1. you can't refine search because it dissapears
    2. It would be great to add option to filter out the fuzzy search results as one types.
A simple download file manager that sorts your files into your desired folders, This was meant to be a small project and nothing big.

GoDFM Simply go to the tags and download the .exe file (or compile it yourself by running go build). Add it to your environment paths by going to sett

Aug 9, 2022
Go Version Manager

gvm By Josh Bussdieker (jbuss, jaja, jbussdieker) while working at Moovweb Currently lovingly maintained by Benjamin Knigge Pull requests and other an

Jan 2, 2023
A simple and powerful SSH keys manager
A simple and powerful SSH keys manager

SKM is a simple and powerful SSH Keys Manager. It helps you to manage your multiple SSH keys easily! Features Create, List, Delete your SSH key(s) Man

Dec 17, 2022
Go version manager. Super simple tool to install and manage Go versions. Install go without root. Gobrew doesn't require shell rehash.

gobrew Go version manager Install or update With curl $ curl -sLk https://git.io/gobrew | sh - or with go $ go get -u github.com/kevincobain2000/gobre

Jan 5, 2023
Kubernetes Lazy User Manager

klum - Kubernetes Lazy User Manager klum does the following basic tasks: Create/Delete/Modify users Easily manage roles associated with users Issues k

Dec 6, 2022
network-node-manager is a kubernetes controller that controls the network configuration of a node to resolve network issues of kubernetes.
network-node-manager is a kubernetes controller that controls the network configuration of a node to resolve network issues of kubernetes.

Network Node Manager network-node-manager is a kubernetes controller that controls the network configuration of a node to resolve network issues of ku

Dec 18, 2022
The smart virtual machines manager. A modern CLI for Vagrant Boxes.
The smart virtual machines manager.  A modern CLI for Vagrant Boxes.

The smart virtual machines manager Table of Contents: What is Vermin Install Vermin Usage Contributors TODO What is Vermin Vermin is a smart, simple a

Dec 22, 2022
Grafana Dashboard Manager

Grafana dash-n-grab Grafana Dash-n-Grab (GDG) -- Dashboard/DataSource Manager. The purpose of this project is to provide an easy to use CLI to interac

Dec 31, 2022
operator to install cluster manager and klusterlet.

registration-operator Minimum cluster registration and work Community, discussion, contribution, and support Check the CONTRIBUTING Doc for how to con

Dec 14, 2022
The Scylla Manager.

Scylla Manager Welcome to Scylla Manager repository! Scylla Manager user docs can be found here. Scylla Manager consists of tree components: a server

Jan 4, 2023
This manager helps handle the life cycle of your eBPF programs

eBPF Manager This repository implements a manager on top of Cilium's eBPF library. This declarative manager simplifies attaching and detaching eBPF pr

Dec 1, 2022
GO ABI for AWS Secrets-Manager

secrets-manager-cli GO ABI for AWS Secrets-Manager SDK Setup AWS Documentation Download (Source) go get github.com/aws/aws-sdk-go-v2/aws go get github

Nov 16, 2021
Composer is a simple process manager for dev environments.

Composer Composer is a simple service manager for dev environments. How to build/install it? To build composer under ./bin, run: make build To build

May 12, 2022
This repo contains example on how to consume secrets from Google Secret Manager from GKE

GKE Secret Manager. Environment setup This repo contains examples of how to consume secrets from Google Secret Manager (GSM) from Google Kubernetes En

Dec 5, 2022
Machine controller manager provider local

Out of tree (controller-based) implementation for local as a new provider. The local out-of-tree provider implements the interface defined at MCM OOT driver.

Feb 20, 2022
A package manager written in Go which uses the LFS Symlink method.

pacsym A package manager powered by symlinks. How to use The package manager assumes that all software installed is installed with /usr/pkg/<packagena

Dec 11, 2021
Terraform provider for BlueCat Address Manager

Terraform Provider for BlueCat Address Manager A Terraform provider for BlueCat Address Manager. Curently the provider is able to work with IPv4 Addre

Nov 9, 2022
Kubernetes resource manager.

Halyard Halyard is in an experimentation phase where I will will be learning a lot and changing my opinion (and APIs) very often. Halyard is a deploym

Dec 13, 2021
A cross-language distributed transaction manager
A cross-language distributed transaction manager

English Docs 跨语言分布式事务管理器 DTM是一款golang开发的分布式事务管理器,解决了跨数据库、跨服务、跨语言栈更新数据的一致性问题。 他优雅

Dec 31, 2022