{"id":17343663,"url":"https://github.com/gma/tmux-fuzzy-launcher","last_synced_at":"2026-04-19T13:32:16.690Z","repository":{"id":66252158,"uuid":"405765146","full_name":"gma/tmux-fuzzy-launcher","owner":"gma","description":"Open your projects in tmux (plus editor of choice)","archived":false,"fork":false,"pushed_at":"2026-03-05T18:36:36.000Z","size":449,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-03-05T21:47:34.981Z","etag":null,"topics":["bash","bash-script","fzf","git","launcher","shell","tmux","tmuxinator","utility","vim"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gma.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-09-12T22:15:15.000Z","updated_at":"2026-03-05T18:36:40.000Z","dependencies_parsed_at":null,"dependency_job_id":"eacc57cd-25b5-4bcd-a256-4cd0c4530ec4","html_url":"https://github.com/gma/tmux-fuzzy-launcher","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/gma/tmux-fuzzy-launcher","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gma%2Ftmux-fuzzy-launcher","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gma%2Ftmux-fuzzy-launcher/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gma%2Ftmux-fuzzy-launcher/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gma%2Ftmux-fuzzy-launcher/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gma","download_url":"https://codeload.github.com/gma/tmux-fuzzy-launcher/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gma%2Ftmux-fuzzy-launcher/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32009119,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-18T20:23:30.271Z","status":"online","status_checked_at":"2026-04-19T02:00:07.110Z","response_time":55,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["bash","bash-script","fzf","git","launcher","shell","tmux","tmuxinator","utility","vim"],"created_at":"2024-10-15T16:09:56.816Z","updated_at":"2026-04-19T13:32:16.670Z","avatar_url":"https://github.com/gma.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"tmux-fuzzy-launcher\n===================\n\nDo you like to edit code in a terminal, in [tmux]?\n\nIf so, this is for you.\n\nWhile watching one of [ThePrimeagen's videos], I saw him do something rather neat. He used [fzf] to search through his local repositories, hitting return to launch Vim in a tmux session. Genius!\n\nPrime's implementation is embedded in his bash config, so I wrote my own version from scratch, and extended it a bit.\n\nHere's a quick demo:\n\n![demo asciicast](./demo/tm.gif)\n\nInstall\n-------\n\nTo run `tm` you need `tmux` and `fzf` installed. If you don't already have it, go do that now (`apt install fzf` or `brew install fzf`, or whatever works for you).\n\n`tm` is just a single shell script, so all you need to do is make sure it's exectuable and copied to somewhere in your `PATH`.\n\n```sh\ngit clone https://github.com/gma/tm.git\ncd tm\n./install.sh       # creates symlink in ~/.local/bin, if it exists\n```\n\nAlternatively, once you've checked it out:\n\n```sh\nsudo ./install.sh  # creates symlink in /usr/local/bin\n```\n\nIn future you can update to the latest version with `git pull`.\n\nIf you don't fancy any of that git stuff, this manual approach will do it:\n\n```sh\ncurl -O https://raw.githubusercontent.com/gma/tmux-fuzzy-launcher/main/tm\nchmod +x tm\nmv tm ~/.local/bin/  # or to wherever you like\n```\n\nUsage\n-----\n\nSet the `TM_ROOT` environment variable to the name of the folder where you keep your code.\n\nThe default path is `~/Code`, but mine lives in `~/Projects`. So I've added this line to my `.bashrc` file:\n\n```sh\nexport TM_ROOT=~/Projects\n```\n\nNow run `tm` in your terminal. You'll be able to choose from any of the directories within `$TM_ROOT` that contain a `.git` folder.\n\nCustomisation\n-------------\n\nIf the default behaviour doesn't work for how your repos are layed out, you can tweak it with the following environment variables. Define them in your shell's config. In Bash, you'd do it by setting the variable in your `~/.bashrc` file. Like this:\n\n```sh\nexport TM_EDITOR=nano\n```\n\n### TM_ROOT\n\nDefault: `~/Code`\n\nThe directory where you checkout your Git repositories.\n\n### TM_DEPTH\n\nDefault: 3\n\n`tm` runs `find` in order to find directories that live beneath your `$TM_ROOT` directory. By default any directory that contains a `.git` folder will be considered a project that you might want to open, so `tm` runs a command like this to discover them:\n\n```sh\nfind $TM_ROOT -type d -name .git\n```\n\nIf you've got thousands of directories beneath `$TM_ROOT`, this could take a while. So we use the `-maxdepth` option to tell `find` not to look so deep in your directory structure.\n\nIf your directory structure is totally flat (with all repos living directly inside `$TM_ROOT`) you could set `TM_DEPTH` to 1. If you've got some nesting, you might want to increase it.\n\nMost people will be able to leave this as is. Decrease it if you've got lots of big projects in a flat directory structure and `tm` isn't loading up as fast as you'd like (on my vintage laptop, it's essentially instant).\n\n### TM_FILTER\n\nDefault: `cat`\n\nThere might be times when you want to prevent `tm` from listing some of the repositories on your machine. Perhaps you do live coding online, or at talks, and have some repositories that you don't want to show on screen. You could just avoid running `tm`, but once these tools get into your muscle memory... yeah, good luck with that.\n\nImagine you kept all your repositories in `~/Code`, and stored all the sensitive code in `~/Code/clients`. You can prevent `tm` from listing any repositories within `clients` by setting `TM_FILTER` to `grep` them out. But if you do that, how do you launch all that client work?\n\nLet's hide the client projects by default, and make a separate command for opening client work:\n\n```sh\nalias tm=\"TM_FILTER='grep -v clients/' tm\"\nalias tmc=\"TM_FILTER='grep clients/' command tm\"\n```\n\nNote the use of `command tm` in the second alias; `command` will call the `tm` script directly, rather than calling the `tm` alias (those two grep commands would combine to filter *everything* out).\n\n### TM_PROJECT_CONTAINS\n\nDefault: `.git`\n\nWhat if you don't use Git? `tm` won't be able to find any `.git` directories inside your projects. Use `TM_PROJECT_CONTAINS` to change the name of the directory that it's looking for. \n\nIf you want to identify projects by searching for a file instead of a subdirectory, also set `TM_CRITERIA`.\n\n### TM_CRITERIA\n\nDefault: `-type d -name $TM_PROJECT_CONTAINS`\n\nUse `TM_CRITERIA` if you need to teach `tm` a new way of identifying your projects. The string that you set this variable to will be used to build up a `find` command, so they need to be legal options from `find(1)`.\n\nIf you only wanted to search through projects that contain a `README`, you could add this to your `~/.bashrc`:\n\n```sh\nexport TM_PROJECT_CONTAINS=README\nexport TM_CRITERIA=\"-type f -name $TM_PROJECT_CONTAINS\"\n```\n\n`fzf` will now be passed a list of paths to the directories that contain a `README` file.\n\n### TM_EDITOR\n\nDefault: `$EDITOR` (or `vi` if `EDITOR` not set)\n\nThis is the command that will be run inside new tmux sessions.\n\n[tmux]: https://github.com/tmux/tmux/wiki\n[fzf]: https://github.com/junegunn/fzf\n[ThePrimeagen's videos]: https://www.youtube.com/channel/UC8ENHE5xdFSwx71u3fDH5Xw\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgma%2Ftmux-fuzzy-launcher","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgma%2Ftmux-fuzzy-launcher","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgma%2Ftmux-fuzzy-launcher/lists"}