Llama — a 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. Open vim right from the 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:

/tmp/path && cd "$(cat /tmp/path)" }">
function ll {
  llama "$@" 2> /tmp/path && cd "$(cat /tmp/path)"
}

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

The EDITOR or LLAMA_EDITOR environment variable used for openning files from the llama.

export 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.
painless task queue manager for shell commands with an intuitive cli interface (execute shell commands in distributed cloud-native queue manager).

EXEQ DOCS STILL IN PROGRESS. Execute shell commands in queues via cli or http interface. Features Simple intuitive tiny cli app. Modular queue backend

Dec 14, 2022
A multiple reverse shell sessions/clients manager via terminal written in go

A multiple reverse shell sessions/clients manager via terminal written in go

Nov 9, 2022
A terminal-based download manager written in Go!

goload-manager About A terminal-based download manager written in Go! This project uses grab for downloading and tcell for the terminal interface. Hea

Oct 7, 2021
Stonks is a terminal based stock visualizer and tracker that displays realtime stocks in graph format in a terminal.
Stonks is a terminal based stock visualizer and tracker that displays realtime stocks in graph format in a terminal.

Stonks is a terminal based stock visualizer and tracker. Installation Requirements: golang >= 1.13 Manual Clone the repo Run make && make install Pack

Dec 16, 2022
Clones dependencies from .resolved file of Swift Package Manager.

SPM-dep-cloner Clones dependencies from .resolved file of Swift Package Manager. Useful for setup of new project with dependencies in another repos. H

Nov 29, 2021
A simple command line functionality to convert your Kaspersky Password Manager exported file to CSV format

A simple command line functionality to convert your Kaspersky Password Manager exported file to CSV format

Apr 20, 2022
This is a Go Cli app that receives an string path to a log file, and based on it generates and prints in console an encoded polyline with the locations found in the log file.
This is a Go Cli app that receives an string path to a log file, and based on it generates  and prints in console an encoded polyline with the locations found in the log file.

GEOENCODE GO CLI APP DESCRIPTION This is a Go Cli app that receives an string path to a log file, and based on it generates and prints in console an e

Oct 1, 2021
This command line converts .webarchive file to resources embed .html file

webarchive-to-singlefile This command line converts Safari's .webarchive file to complete .html. Notice Only tested on MacOS. Google Chrome required.

Dec 30, 2022
CLI filters the contents of the csv file according to the filters from the another file.

filtercsv CLI filters the contents of the csv file according to the filters from the another file. Made to process big files by a lots of filters. By

Dec 2, 2021
Go-file-downloader-ftctl - A file downloader cli built using golang. Makes use of cobra for building the cli and go concurrent feature to download files.

ftctl This is a file downloader cli written in Golang which uses the concurrent feature of go to download files. The cli is built using cobra. How to

Jan 2, 2022
:zap: boilerplate template manager that generates files or directories from template repositories
:zap: boilerplate template manager that generates files or directories from template repositories

Boilr Are you doing the same steps over and over again every time you start a new programming project? Boilr is here to help you create projects from

Jan 6, 2023
The slightly more awesome standard unix password manager for teams
The slightly more awesome standard unix password manager for teams

gopass Introduction gopass is a password manager for the command line written in Go. It supports all major operating systems (Linux, MacOS, BSD) as we

Jan 4, 2023
Command Line Alias Manager and Plugin System - Written in Golang
Command Line Alias Manager and Plugin System - Written in Golang

aly - Command Line Alias Manager and Packager Aly offers the simplest way to manage, share, and obtain command line aliases! Warning: This project is

Jun 16, 2022
The Todo List / Task Manager for Geeks in command line
The Todo List / Task Manager for Geeks in command line

The CLI To-Do List / Task Manager for Geeks ??‍?? Developer / DevOps / Sysadmin? A command line hero? ?? Live with the dark terminal? ?? Think in Mark

Dec 15, 2022
Secure, private and feature-rich CLI password manager
Secure, private and feature-rich CLI password manager

Kure Kure is a free and open-source password manager for the command-line. This project aims to offer the most secure and private way of operating wit

Nov 17, 2022
GodSpeed is a robust and intuitive manager for reverse shells.
GodSpeed is a robust and intuitive manager for reverse shells.

GodSpeed is a robust and intuitive manager for reverse shells. It supports tab-completion, verbose listing of connected hosts and easy interaction with selected shells by passing their corresponding ID.

Dec 12, 2022
Teller - the open-source universal secret manager for developers
 Teller - the open-source universal secret manager for developers

A secrets management tool for developers built in Go - never leave your command line for secrets.

Jan 8, 2023
Moldy CLI the best project starter and manager of the world
Moldy CLI the best project starter and manager of the world

You don't know how to start your project ... you want to help other people know your tool or language. Use Moldy! the best helper to start your project

Oct 17, 2022