{"id":41301059,"url":"https://github.com/dhamidi/leader","last_synced_at":"2026-01-23T04:50:24.533Z","repository":{"id":57574154,"uuid":"143704192","full_name":"dhamidi/leader","owner":"dhamidi","description":"VIM's leader key for your terminal","archived":false,"fork":false,"pushed_at":"2020-03-20T09:53:36.000Z","size":130,"stargazers_count":36,"open_issues_count":1,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-06-20T08:10:01.240Z","etag":null,"topics":["shortcuts","terminal","vim"],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dhamidi.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-08-06T09:11:23.000Z","updated_at":"2024-01-03T14:15:54.000Z","dependencies_parsed_at":"2022-09-26T19:01:45.526Z","dependency_job_id":null,"html_url":"https://github.com/dhamidi/leader","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/dhamidi/leader","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dhamidi%2Fleader","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dhamidi%2Fleader/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dhamidi%2Fleader/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dhamidi%2Fleader/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dhamidi","download_url":"https://codeload.github.com/dhamidi/leader/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dhamidi%2Fleader/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28680623,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-23T04:33:33.518Z","status":"ssl_error","status_checked_at":"2026-01-23T04:33:30.433Z","response_time":59,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["shortcuts","terminal","vim"],"created_at":"2026-01-23T04:50:23.843Z","updated_at":"2026-01-23T04:50:24.528Z","avatar_url":"https://github.com/dhamidi.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.com/dhamidi/leader.svg?branch=master)](https://travis-ci.com/dhamidi/leader)\n\n![](./assets/logo.png)\n\nVIM's leader key for your terminal!  Using leader you can launch predefined commands using a short sequence of key presses instead of having to type out the whole command.\n\nFor example, using Leader you could map pressing `g` followed by `c` to running `git commit`.\n\n[![asciicast](https://asciinema.org/a/j1SIx0G9cQ5q8M8wf3SZeu5OW.png)](https://asciinema.org/a/j1SIx0G9cQ5q8M8wf3SZeu5OW)\n\n# Installation\n\nDownload the `leader` binary from [here](https://github.com/dhamidi/leader/releases) and put it somewhere on your `$PATH`.\n\n## bash and zsh\n\nAdd the following to your `~/.bashrc` or `~/.zshrc`:\n\n```\neval \"$(leader init)\"\n```\n\nThis installs leader and binds it to \u003ckbd\u003e\\\\\u003c/kbd\u003e.\n\n## fish\n\nAdd the following to your `~/.config/fish/config.fish`:\n\n```\nleader init | source\n```\n\nThis installs leader into fish and binds it to \u003ckbd\u003e\\\\\u003c/kbd\u003e.\nAdditionally it binds \u003ckbd\u003eCtrl+V\u003c/kbd\u003e to switch to a new mode in which every key is bound to `self-insert`.\nThis means you can press \u003ckbd\u003eCtrl+V\u003c/kbd\u003e\u003ckbd\u003e\\\\\u003c/kbd\u003e to insert a literal `\\`.\n\n# Configuration\n\nLeader is configured through JSON files in various directories.\n\nTo get started, put the JSON listed below into `~/.leaderrc`.  This example configuration file contains shortcuts useful when developing with Golang:\n\n```\n{\n  \"keys\": {\n    \"g\": {\n      \"name\": \"go\",\n      \"keys\": {\n        \"b\": \"go build .\",\n        \"t\": {\n          \"name\": \"test\",\n          \"loopingKeys\": [\".\"],\n          \"keys\": {\n            \".\": \"go test .\",\n            \"a\": \"go test ./...\"\n          }\n        }\n      }\n    }\n  }\n}\n```\n\nThis produces the following key bindings:\n\n- `g b` is bound to running `go build .`\n- `g t .` is bound to running `go test .`\n- `g t a` is bound to running `go test ./...`\n\nAs this example shows, key maps can be nested to arbitrary depth.\n\nA keymap's `name` is used to as a label to indicate which keymap the user is currently in when running `leader`.\n\nNew bindings can be added and removed through the `bind` subcommand as well:\n\n```\n$ leader bind --global d date\n$ grep '\"d\"' ~/.leaderrc\n  \"d\": \"date\",\n$ leader @d\nSat Aug 25 21:06:04 EEST 2018\n$ leader bind --unbind --global d\n$ leader @d\n$\n```\n\n## Looping keys\n\nIf a key occurs in the list given under a keymap's `loopingKeys` entry, this key can be pressed repeatedly to run the same command again.\n\n## Load order\n\nLeader tries to load a file called `.leaderrc` from your current working directory.  After trying to load that file it checks the parent directory for a `.leaderrc`, then that directory's parent directory etc until it has tried loading `$HOME/.leaderrc`.\n\nThe closer a file is to your working directory, the more important keybindings in that file are.  For example, binding `g b` to `go build .` in `~/.leaderrc` and to `gulp build` in `$HOME/projects/project-using-gulp` will make `leader` prefer running `gulp build` when in your frontend project's directory and `go build` elsewhere.\n\n# Usage\n\n```\nleader                   # run commands in a new shell through an interactive menu\nleader bind KEYS COMMAND # bind KEYS to run COMMAND in the current directory\nleader print             # show interactive menu, but print commands instead of running them\nleader list-keys         # list all key bindings\nleader init              # print shell initialization code for $SHELL\nleader help              # display leader's man page\nleader version           # display the current version of leader\n```\n\n# Key bindings\n\nThe following key bindings are processed by `leader` itself and cannot be remapped:\n\n| Key         | Function                     |\n| ---         | --------                     |\n| `Ctrl+C`    | Exit `leader`                |\n| `Ctrl+B`    | Go back to the previous menu |\n| `Up`        | Go back to the previous menu |\n| `Left`      | Go back to the previous menu |\n| `Backspace` | Go back to the previous menu |\n\n\n# Execution environment\n\nAll commands triggered by leader are run in the context of the current shell.  This means that `cd`, `pushd` and other commands that modify the state of the current shell work without problems in your `.leaderrc`.\n\n# Frequently Asked Questions\n\n\u003cdl\u003e\n  \u003cdt\u003eHow can I bind keys only in a specific project?\u003c/dt\u003e\n  \u003cdd\u003eJust create a \u003ccode\u003e.leaderrc\u003c/code\u003e in your project's root directory.  Leader will load that file after loading \u003ccode\u003e~/.leaderrc\u003c/code\u003e and merge any project specific settings into your configuration from \u003ccode\u003e~/.leaderrc\u003c/code\u003e.\u003c/dd\u003e\n\u003c/dl\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdhamidi%2Fleader","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdhamidi%2Fleader","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdhamidi%2Fleader/lists"}