{"id":13451239,"url":"https://github.com/RasmusLindroth/tut","last_synced_at":"2025-03-23T18:32:00.369Z","repository":{"id":38414866,"uuid":"248043596","full_name":"RasmusLindroth/tut","owner":"RasmusLindroth","description":"TUI for Mastodon with vim inspired keys","archived":false,"fork":false,"pushed_at":"2023-12-18T22:52:28.000Z","size":1123,"stargazers_count":469,"open_issues_count":48,"forks_count":30,"subscribers_count":14,"default_branch":"master","last_synced_at":"2025-03-22T01:03:42.544Z","etag":null,"topics":["mastodon","mastodon-app","mastodon-client","terminal-based","tui"],"latest_commit_sha":null,"homepage":"https://tut.anv.nu","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/RasmusLindroth.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null},"funding":{"github":"RasmusLindroth"}},"created_at":"2020-03-17T18:24:58.000Z","updated_at":"2025-03-21T22:42:26.000Z","dependencies_parsed_at":"2023-02-14T20:15:59.627Z","dependency_job_id":"2748b57b-bfc6-4a23-b34f-ece0c4971bee","html_url":"https://github.com/RasmusLindroth/tut","commit_stats":{"total_commits":174,"total_committers":10,"mean_commits":17.4,"dds":"0.10919540229885061","last_synced_commit":"33d7cd8cbf5f8048b49bf218a3c7aed2ab3d6346"},"previous_names":[],"tags_count":81,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RasmusLindroth%2Ftut","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RasmusLindroth%2Ftut/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RasmusLindroth%2Ftut/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RasmusLindroth%2Ftut/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RasmusLindroth","download_url":"https://codeload.github.com/RasmusLindroth/tut/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244961508,"owners_count":20538982,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["mastodon","mastodon-app","mastodon-client","terminal-based","tui"],"created_at":"2024-07-31T07:00:50.392Z","updated_at":"2025-03-23T18:32:00.328Z","avatar_url":"https://github.com/RasmusLindroth.png","language":"Go","funding_links":["https://github.com/sponsors/RasmusLindroth"],"categories":["Go","Social","Social media","Clients","\u003ca name=\"chat\"\u003e\u003c/a\u003eChat and instant messaging","Table of Contents"],"sub_categories":["Mastodon","CLI"],"readme":"# Tut - a Mastodon TUI\n[![Release](https://badgen.net/github/release/RasmusLindroth/tut)](https://github.com/RasmusLindroth/tut/releases)\n[![web](https://badgen.net/badge/web/tut.anv.nu/f92672)](https://tut.anv.nu)\n[![tut](https://badgen.net/badge/AUR/tut/08c)](https://aur.archlinux.org/packages/tut)\n[![tut-bin](https://badgen.net/badge/AUR/tut-bin/08c)](https://aur.archlinux.org/packages/tut-bin)\n[![@tut](https://badgen.net/mastodon/follow/tut@fosstodon.org)](https://fosstodon.org/@tut)\n\nA TUI for Mastodon with vim inspired keys. The program has most of the \nfeatures you can find in the web client. \n\nPress `C` to create a new toot and `N` to focus on your notifications.\n\nYou can also enable [mouse support](#mouse-support).\n\nYou can find Linux binaries under [releases](https://github.com/RasmusLindroth/tut/releases).\n\n![Preview](./images/preview.png \"Preview\")\n![Preview 2](./images/preview2.png \"Preview 2\")\n\n\n## Table of contents\n* [Currently supported commands](#currently-supported-commands)\n* [Configuration](#configuration)\n* [Install instructions](#install-instructions)\n  * [Binary releases](#binary-releases)\n  * [Arch and Manjaro](#arch-and-manjaro)\n  * [Alpine Linux](#alpine-linux)\n  * [Debian](#debian)\n  * [FreeBSD](#freebsd)\n  * [OpenBSD](#openbsd)\n  * [NetBSD](#netbsd-and-others) and others\n  * [Homebrew (macOS)](#homebrew-macos)\n  * [openSUSE](#opensuse)\n* [Build it yourself](#build-it-yourself)\n* [Flags and commands](#flags-and-commands)\n* [Templates](#templates)\n* [Mouse support](#mouse-support)\n* [Password manager for secrets](#password-manager-for-secrets)\n* [Thanks to](#thanks-to)\n\n## Currently supported commands\n* `:quit` = Exit tut\n* `:q` = Shorter form of former command\n* `:timeline home|local|federated|direct|notifications|mentions|favorited|special-all|special-boosts|special-replies` = Open selected timeline\n* `:tl h|l|f|d|n|m|fav|sa|sb|sr` = Shorter form of former command\n* `:blocking` = Lists users that you have blocked\n* `:boosts` = Lists users that have boosted the toot\n* `:bookmarks` = List all your bookmarks\n* `:clear-notifications` = Remove all of your notifications\n* `:clear-temp` = Remove all of your media files that have been downloaded. Only needed if you have set delete-temp-files to false under [media] in your config.\n* `:close-pane` = Closes the current pane, including all the timelines in said pane\n* `:compose` = Compose a new toot\n* `:edit` = Edit one of your toots\n* `:favorited` = Lists toots  you\u0026#39;ve favorited\n* `:favorites` = Lists users that favorited the toot\n* `:follow-tag \u003ctag\u003e` = Follow a hashtag named \u0026lt;tag\u0026gt;\n* `:followers` = List of people the account are following. It only works on profiles\n* `:following` = List of people follwing the account. It only works on profiles\n* `:help` = Show help for how to use tut\n* `:h` = Shorter form of former command\n* `:history` = Show edits of a toot\n* `:lists` = Show a list of your lists\n* `:list-placement top|right|bottom|left` = Place the list in choosen placement\n* `:list-split row|column` = Split the timelines by row or column\n* `:login` = Login to one more account\n* `:move-pane left|right|up|down|home|end` = Moves the pane in choosen direction\n* `:mp l|r|u|d|h|e` = Shorter form of former command\n* `:muting` = Lists users that you\u0026#39;ve muted\n* `:newer` = Force load newer toots in current timeline\n* `:next-acct` = Go to the next account if you\u0026#39;re logged in to multiple\n* `:preferences` = Update your profile and some other settings\n* `:prev-acct` = Go to the prev account if you\u0026#39;re logged in to multiple\n* `:profile` = Go to your profile\n* `:proportions [int] [int]` = Sets the proportions of the panes and the content. The first integer is your panes and the other for content, e.g. :proportions 1 3\n* `:refetch` = Refetches the current item that you\u0026#39;re viewing. Can be used to update poll results.\n* `:saved` = Alias for bookmarks\n* `:stick-to-top` = Toggle the stick-to-top setting that always shows the latest toot in all timelines\n* `:tag \u003ctag\u003e` = Shows toots tagged with \u0026lt;tag\u0026gt;, e.g. :tag linux. You can input multiple tags if you want to show them in the same timeline\n* `:tags` = List of tags that you\u0026#39;re following\n* `:unfollow-tag \u003ctag\u003e` = Unfollow the hashtag named \u0026lt;tag\u0026gt;, e.g. :unfollow-tag tut\n* `:user \u003cusername\u003e` = Search for users named \u0026lt;username\u0026gt;, e.g. :user rasmus. To narrow a search include the instance like this :user rasmus@mastodon.acc.sunet.se\n* `:pane \u003cint\u003e` = Switch pane by index (zero indexed) e.g. :pane 0 for the left/top pane\n\nKeys without description in tut\n* `c` = Compose a new toot\n* `j` or `Down arrow` = Navigate down in feed list or toot\n* `k` or `Up arrow` = Navigate up in feed list or toot\n* `h` or `Left arrow` = Cycle back in open timelines\n* `l` or `Right arrow` = Cycle forward in open timelines\n* `g` or `Home` = Go to top in feed list or toot\n* `G` or `End` = Go to bottom in feed list or toot\n* `?` = View help\n* `q` = Go back or quit\n* `Esc` = Go back\n\nExplanation of the non obvious keys when viewing a toot\n* `v` = view. In this mode you can scroll throught the text of the toot if it doesn\u0026#39;t fit the screen\n* `o` = open. Gives you a list of all URLs in the toot. Opens them in your default browser, if it\u0026#39;s an user or tag they will be opened in tut\n* `m` = media. Opens the media with xdg-open\n\n## Configuration\nTut is configurable, so you can change things like the colors, the default timeline, \nwhat image viewer to use and some more. Check out the configuration file to see \nall the options.\n\nYou find it in `XDG_CONFIG_HOME/tut/config.toml` on Linux which usually equals to `~/.config/tut/config.toml`.\nIf you don't run Linux it will use the path of [os#UserConfigDir](https://github.com/golang/go/blob/7dc9fcb13de7bb20b11f6a526865545cc9142c2c/src/os/file.go#L455-L461).\nBut if you move the tut folder to `XDG_CONFIG_HOME/tut/` and have set the environment variable `XDG_CONFIG_HOME`\nit will look there instead of the standard place.\n\nYou can find an updated configuration file in this repo named `config.example.toml`.\nIf there are any new configurations options you can copy them frome that file.\nIf you prefer a website you can read about all the options on [tut.anv.nu](https://tut.anv.nu/config) and\nif man pages are your thing use `tut(5)`.\n\n## Install instructions\n### Binary releases\nHead over to https://github.com/RasmusLindroth/tut/releases\n\n### Arch and Manjaro\n\nYou can find it in the Arch User Repository (AUR). I'm the maintainer there.\n\nhttps://aur.archlinux.org/packages/tut/\nhttps://aur.archlinux.org/packages/tut-bin/\n\nYou can also use `tut-mastodon`. Currently `aur/tut` collides with a package \nnamed `tut` if you're running Manjaro ARM. So if you face the same problem you \ncan use this package instead. I suggest you add an alias for tut-mastodon to\ntut in the config for your shell. Usually `.bashrc` or `.zshrc`.\n\n`alias tut='tut-mastodon'`\n\nhttps://aur.archlinux.org/packages/tut-mastodon/\n\n### Alpine Linux\n\n`tut` package is available in the community repository.\n\nhttps://pkgs.alpinelinux.org/package/edge/community/x86_64/tut\n\n### Debian\n\nhttp://packages.azlux.fr/\n\n### FreeBSD\n\nhttps://www.freshports.org/net-im/tut \n\n### OpenBSD\n\nhttps://openports.pl/path/net/tut\n\nThe `tut` is available since OpenBSD 7.3.  It can be installed with:\n\n\tpkg_add tut\n\n### NetBSD (and others)\n\nAvailable as [net/tut](https://pkgsrc.se/net/tut) in\n[pkgsrc](https://pkgsrc.org), NetBSD's portable package manager.\nAlso for Linux, macOS, Illumos, etc. Install from the tree or with\npkgin:\n\n```\npkgin install tut\n```\n\n### Homebrew (macOS)\n\nAvailable as a Homebrew Formulae over [here](https://formulae.brew.sh/formula/tut).\nInstall it like this:\n\n```\nbrew update\nbrew install tut\n```\n\n### openSUSE\n\n`tut` package is shipped as part of openSUSE Tumbleweed and openSUSE Leap 15.5+. It can be installed via:\n\n`sudo zypper in tut`\n\n[suntorytimed](https://build.opensuse.org/users/suntorytimed) is the maintainer of the package.\n\n## Build it yourself\nIf you don't use the binary that you find under releases\nyou will need Go. Use a newer one that supports modules.\n\n```bash\n# Fetches and installs tut. Usally /home/user/go/bin\ngo install github.com/RasmusLindroth/tut@latest\n\n# You can also clone the repo if you like\n# First clone this repository\ngit clone https://github.com/RasmusLindroth/tut.git\n\n# Go to that folder\ncd tut\n\n# Build or install\n\n# Install (usually /home/user/go/bin)\ngo install\n\n# Build (same directory i.e. ./ )\ngo build\n```\n\nIf you choose to install and want to be able to just run `tut` \nyou will have to add `go/bin` to your `$PATH`.\n\n## Flags and commands\n```\nCommands:\n    example-config - creates the default configuration file in the current directory and names it ./config.example.toml\n\nFlags:\n\t-h  --help             prints this message\n\t-v  --version          prints the version\n\t-n  --new-user         add one more user to tut\n\t-c  --config \u003cpath\u003e    load config.toml from \u003cpath\u003e\n\t-d --config-dir \u003cpath\u003e load all config from \u003cpath\u003e\n\t-u  --user \u003cname\u003e      login directly to user named \u003cname\u003e\n      If you want to login to multiple accounts separate them with a space and use quotation marks. E.g. -u \"acc_one acc_two\"\n      If two users are named the same. Use full name like tut@fosstodon.org\n```\n\nIf you don't want to set `--config` or `--config-dir` everytime you can set\nthe environment variables `TUT_CONF` and `TUT_CONF_DIR` instead.\n\n## Templates\nYou can customise how toots and user profiles are displayed with a\nGo [text/template](https://pkg.go.dev/text/template).\n\nYou'll have to place a file named `toot.tmpl` and/or `user.tmpl`\nin `XDG_CONFIG_HOME/tut/` which usually equals to `~/.config/tut/`.\n\nYou can copy [./config/toot.tmpl](./config/toot.tmpl) and [./config/user.tmpl](./config/user.tmpl)\nfrom this repo manually or with `curl` or `wget`.\n\n```bash\ncd ~/.config/tut\n\n# using curl\ncurl -o toot.tmpl https://raw.githubusercontent.com/RasmusLindroth/tut/master/config/toot.tmpl\n\ncurl -o user.tmpl https://raw.githubusercontent.com/RasmusLindroth/tut/master/config/user.tmpl\n\n# using wget\nwget https://raw.githubusercontent.com/RasmusLindroth/tut/master/config/toot.tmpl\n\nwget https://raw.githubusercontent.com/RasmusLindroth/tut/master/config/user.tmpl\n```\n\nThe data available for you in `toot.tmpl` is two structs. The first one is the `Toot`-struct, you can see all fields in [./ui/item_status.go](./ui/item_status.go). The second one is the `Style`-struct. You can find the fields for style in [./config/config.go](./config/config.go).\n\nYou acces them with `.Toot` and `.Style` in your template file.\n\nThe data available in `user.tmpl` is almost the same. You still have the\n`Style` but instead of `Toot` you have a struct named `User`. You can see\nall fields in [./ui/item_user.go](./ui/item_user.go).\n\n## Mouse support\nTo enable mouse support you'll have to set `mouse-support=true` under `[general]`\nin your [config](#configuration).\n\n## Password manager for secrets\nIf you run `pass`, `gopass` or  something similar you can protect your secrets.\nYou'll have to manually update your `accounts.toml`. It should be located at \n`~/.config/tut/accounts.toml`. Currently you can only hide `ClientID`, `ClientSecret` and `AccessToken`. The command **must** be prefixed with `!CMD!`. Here's an example \nof what the file can look like.\n\n```bash\n[[Accounts]]\nName = 'tut'\nServer = 'https://fosstodon.org'\nClientID = '!CMD!gopass show -o -f misc/tut-id'\nClientSecret = '!CMD!gopass show -o -f misc/tut-secret'\nAccessToken = '!CMD!gopass show -o -f misc/tut-token'\n```\n\n## Thanks to\n* [mattn/go-mastodon](https://github.com/mattn/go-mastodon) - Mastodon API\n* [rivo/tview](https://github.com/rivo/tview) - making the TUI\n* [gdamore/tcell](https://github.com/gdamore/tcell) - used by tview under the hood\n* [microcosm-cc/bluemonday](https://github.com/microcosm-cc/bluemonday) - used to remove HTML-tags\n* [atotto/clipboard](https://github.com/atotto/clipboard) - yanking to clipboard\n* [gen2brain/beeep](https://github.com/gen2brain/beeep) - notifications\n* [gobwas/glob](https://github.com/gobwas/glob) - glob in patterns\n* [pelletier/go-toml](https://github.com/pelletier/go-toml) - toml parser\n* [go-ini/ini](https://github.com/go-ini/ini) - ini parser\n* [icza/gox](https://github.com/icza/gox) - diff between two `time.Time`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FRasmusLindroth%2Ftut","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FRasmusLindroth%2Ftut","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FRasmusLindroth%2Ftut/lists"}