{"id":14107409,"url":"https://github.com/FedericoBruzzone/tgt","last_synced_at":"2025-08-01T06:32:39.076Z","repository":{"id":222677958,"uuid":"758074212","full_name":"FedericoBruzzone/tgt","owner":"FedericoBruzzone","description":"TUI for Telegram written in Rust 🦀","archived":false,"fork":false,"pushed_at":"2024-05-29T05:48:42.000Z","size":690,"stargazers_count":43,"open_issues_count":1,"forks_count":0,"subscribers_count":7,"default_branch":"main","last_synced_at":"2024-05-29T05:55:44.920Z","etag":null,"topics":["rust","telegram","telegram-tui","tg","tg-cli","tg-client","tgt","tui","tui-rs"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/FedericoBruzzone.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-APACHE","code_of_conduct":"CODE_OF_CONDUCT.md","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":"2024-02-15T15:18:42.000Z","updated_at":"2024-05-29T05:48:46.000Z","dependencies_parsed_at":"2024-02-16T01:27:48.903Z","dependency_job_id":"a68eef72-66a3-400d-aa15-7a67ab34cdd7","html_url":"https://github.com/FedericoBruzzone/tgt","commit_stats":null,"previous_names":["federicobruzzone/tg-ui","federicobruzzone/tg-tui"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FedericoBruzzone%2Ftgt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FedericoBruzzone%2Ftgt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FedericoBruzzone%2Ftgt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FedericoBruzzone%2Ftgt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/FedericoBruzzone","download_url":"https://codeload.github.com/FedericoBruzzone/tgt/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228343221,"owners_count":17905202,"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":["rust","telegram","telegram-tui","tg","tg-cli","tg-client","tgt","tui","tui-rs"],"created_at":"2024-08-14T10:01:03.849Z","updated_at":"2024-12-05T17:31:17.246Z","avatar_url":"https://github.com/FedericoBruzzone.png","language":"Rust","funding_links":[],"categories":["TUI","Rust","Applications","💻 Apps","\u003ca name=\"chat\"\u003e\u003c/a\u003eChat and instant messaging","Table of Contents"],"sub_categories":["Social networks","🤡 Social Media"],"readme":"[crates-io]: https://crates.io/crates/tgt\n[crates-io-shield]: https://img.shields.io/crates/v/tgt\n[github-ci-linux]: https://github.com/FedericoBruzzone/tgt/actions/workflows/ci-linux.yml\n[github-ci-linux-shield]: https://github.com/FedericoBruzzone/tgt/actions/workflows/ci-linux.yml/badge.svg\n[github-ci-windows]: https://github.com/FedericoBruzzone/tgt/actions/workflows/ci-windows.yml\n[github-ci-windows-shield]: https://github.com/FedericoBruzzone/tgt/actions/workflows/ci-windows.yml/badge.svg\n[github-ci-macos]: https://github.com/FedericoBruzzone/tgt/actions/workflows/ci-macos.yml\n[github-ci-macos-shield]: https://github.com/FedericoBruzzone/tgt/actions/workflows/ci-macos.yml/badge.svg\n[github-license-mit]: https://github.com/FedericoBruzzone/tgt/blob/main/LICENSE-MIT\n[github-license-apache]: https://github.com/FedericoBruzzone/tgt/blob/main/LICENSE-APACHE\n[github-license-shield]: https://img.shields.io/github/license/FedericoBruzzone/tgt\n[total-lines]: https://github.com/FedericoBruzzone/tgt\n[total-lines-shield]: https://tokei.rs/b1/github/FedericoBruzzone/tgt?type=Rust,Python\n[creates-io-downloads]: https://crates.io/crates/tgt\n[creates-io-downloads-shield]: https://img.shields.io/crates/d/tgt.svg\n\n⚠️  Note that this is the first release of `tgt`. Please consider to open an issue if you find any bug or if you have any suggestion. ⚠️\n\n\u003cp align=\"center\"\u003e\n    \u003cimg src=\"https://github.com/FedericoBruzzone/tgt/raw/main/imgs/logo.png\" alt=\"logo\" /\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n    \u003cb\u003eA simple TUI for Telegram\u003c/b\u003e\n\u003c/p\u003e\n\n[![Crates.io][crates-io-shield]][crates-io]\n[![GitHub CI Linux][github-ci-linux-shield]][github-ci-linux]\n[![GitHub CI Windows][github-ci-windows-shield]][github-ci-windows]\n[![GitHub CI macOS][github-ci-macos-shield]][github-ci-macos]\n\u003c!-- [![GitHub License][github-license-shield]][github-license-apache] --\u003e\n![license](https://img.shields.io/crates/l/tgt)\n[![Crates.io Downloads][creates-io-downloads-shield]][creates-io-downloads]\n[![][total-lines-shield]][total-lines]\n\n## About\n\n`tgt` is a terminal user interface for Telegram, written in Rust.\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"./imgs/example_movie.gif\" alt=\"animated\" /\u003e\n\u003c/p\u003e\n\n\u003c!-- \u003cp align=\"center\"\u003e --\u003e\n\u003c!--     \u003cimg src=\"https://github.com/FedericoBruzzone/tgt/raw/main/imgs/example.png\" alt=\"example\"/\u003e --\u003e\n\u003c!-- \u003c/p\u003e --\u003e\n\n## Usage\n\n**From crates.io**\n\n```bash\ncargo install tgt\n```\n\n**From source downloading the tdlib**\n\n```bash\ncargo build --release --features download-tdlib\n```\n\nAfter the installation, you can run `tgt` with the following command:\n\n```bash\ntgt --help\n```\n\n**From `flake.nix`**\n\nFirst, create the required TOML configuration files in `~/.tgt/config` using these commands:\n\n```bash\ngit clone https://github.com/FedericoBruzzone/tgt ~/tgt\nmkdir -p ~/.tgt/config\ncp ~/tgt/config/* ~/.tgt/config\n```\n\nAfter setting up the configuration files, you have two installation options:\n\n1. Run directly with `nix run`:\n\n```bash\nnix run github:FedericoBruzzone/tgt\n```\n\n2. Add `tgt` to your system packages:\n\nAdd the following to your `flake.nix`:\n\n```nix\n{\n  inputs = {\n    nixpkgs.url = \"github:NixOS/nixpkgs/nixos-unstable\"\n    tgt.url = \"github:FedericoBruzzone/tgt\";\n    tgt.inputs.nixpkgs.follows = \"nixpkgs\";\n  };\n\n  outputs = { nixpkgs, tgt, ... }: { /* ... */ }\n}\n```\n\nThen add it to your `environment.systemPackages`:\n\n```nix\n{pkgs, tgt, ...}: {\n  environment = {\n    systemPackages = [\n        (tgt.packages.${pkgs.system}.default)\n    ];\n  };\n}\n```\n\nTo use a specific version of the program, override the `src` attribute:\n\n```nix\n{pkgs, tgt, ...}: {\n  environment = {\n    systemPackages = [\n      (tgt.packages.${pkgs.system}.default.overrideAttrs (old: {\n        src = pkgs.fetchFromGitHub {\n          owner = old.src.owner;\n          repo = old.src.repo;\n          rev = \"00000000000000000000000000000000000000\";\n          sha256 = \"sha256-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=\";\n        };\n        cargoHash = \"sha256-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=\";\n      }))\n    ];\n  };\n}\n```\n\n### Configuration\n\nNote that `tgt` is fully customizable. For more information about the **configuration**, please look at [here](https://github.com/FedericoBruzzone/tgt/tree/main/docs/configuration).\n\n**Default keybindings**:\n\n*None state*:\n\n```bash\nesc:               to the \"None\" state\nalt+1 | alt+left:  Focus on the chat list\nalt+2 | alt+right: Focus on the chat\nalt+3 | alt+down:  Focus on the prompt\nalt+h | alt+l:     Resize the chat list\nalt+j | alt+k:     Resize the prompt\nalt+n:             Toggle chat list\nq | ctrl+c:        Quit\n```\n\n*Chat List*\n\n```bash\nup | down:     Move selection\nenter | right: Open the chat\nleft:          Unselect chat\n\nesc:               Return to the \"None\" state\nalt+1 | alt+left:  Focus on the chat list\nalt+2 | alt+right: Focus on the chat\nalt+3 | alt+down:  Focus on the prompt\n```\n\n*Chat*\n\n```bash\nup | down: Scroll the messages\nleft:      Unselect message\ny:         Copy the message\ne:         Edit the message\nr:         Reply to the message\nd:         Delete the message for everyone\nD:         Delete the message for me\n\nesc:               Return to the \"None\" state\nalt+1 | alt+left:  Focus on the chat list\nalt+2 | alt+right: Focus on the chat\nalt+3 | alt+down:  Focus on the prompt\n```\n\n*Prompt*\n\nNote that when the prompt is focused, you can **NOT** use `q` or `ctrl+c` to quit the application, you need to press `esc` to return to the \"None\" state.\n\n```bash\nalt+enter:                        Send the message\n\nleft | right | up | down:         Move the cursor\nctrl+left | ctrl+b:               Move the cursor to the previous word\nctrl+right | ctrl+f:              Move the cursor to the next word\nctrl+alt+left | ctrl+a | home:    Move the cursor to the beginning of the line (also ctrl+left+b | shift+super+left | shift+super+b)\nctrl+alt+right | ctrl+e | end:    Move the cursor to the end of the line (also ctrl+right+f | shift+super+right | shift+super+f)\n\nshift+left:                       Move the cursor left and select the text\nshift+right:                      Move the cursor right and select the text\nshift+up:                         Move the cursor up and select the text\nshift+down:                       Move the cursor down and select the text\nshift+ctrl+left:                  Select the text before the cursor\nshift+ctrl+right:                 Select the text after the cursor\n\nctrl+c:                           Copy the selected text\nctrl+v:                           Paste the copied text\n\nctrl+w | ctrl+backspace | ctrl+h: Delete the word before the cursor\n\nesc:               Return to the \"None\" state\nalt+1 | alt+left:  Focus on the chat list\nalt+2 | alt+right: Focus on the chat\nalt+3 | alt+down:  Focus on the prompt\n```\n\n## Contributing\n\nContributions to this project are welcome! If you have any suggestions, improvements, or bug fixes, feel free to submit a pull request.\nFor more information, do not hesitate to contact us (see the [Contact](#contact) section).\n\n**Build instructions**\n\nThere are three ways to build `tgt`:\n\n1. Using the `download-tdlib` feature of [tdlib-rs](https://github.com/FedericoBruzzone/tdlib-rs) you do not need to set any environment variable. Then you can compile `tgt` using `cargo build --features download-tdlib`.\n2. By default, `tgt` assumes that you have the tdlib built and the `LOCAL_TDLIB_PATH` environment variable set to the path of the `tdlib` directory. You can set the environment variable with the following command: `export LOCAL_TDLIB_PATH=\"/path/to/tdlib\"`. Then you can compile `tgt` using `cargo build` or `cargo build --feature default`.\n3. You can use `pkg-config` to find the path of the library. In this case see the [CONTRIBUTING.md](https://github.com/FedericoBruzzone/tgt/blob/main/CONTRIBUTING.md) file for more information. Then you can compile `tgt` using `cargo build --features pkg-config`.\n\n\nThe [CONTRIBUTING.md](https://github.com/FedericoBruzzone/tgt/blob/main/CONTRIBUTING.md) file contains information for building `tgt` and the steps to configure the `tdlib` in your local environment, starting from the compilation to the configuration of the environment variables.\n\n### Road Map\n\nYou can find the road map of the project [here](https://github.com/FedericoBruzzone/tgt/issues/37) (in the pinned issues).\n\n## Commands\n\nYou can use `just`, `make` or `cargo`,  as build tools.\nIf you want to use `cargo`, please make sure to read the `Justfile` or the `Makefile` to understand the flags used for each command.\nHere are the available commands:\n\n```text\njust COMMAND\nmake COMMAND\n\nCOMMAND:\n  all            # Run fmt, clippy and test\n  build          # Build the project\n  run            # Run the project\n  test           # Run the tests\n  clippy         # Run clippy\n  fmt            # Run rustfmt\n  clean          # Clean the project\n```\n\n## License\n\nThis repository are licensed under either of\n\n* Apache License, Version 2.0 ([LICENSE-APACHE][github-license-apache] or http://www.apache.org/licenses/LICENSE-2.0)\n\n* MIT license ([LICENSE-MIT][github-license-mit] or http://opensource.org/licenses/MIT)\n\nat your option.\n\nPlease review the license file provided in the repository for more information regarding the terms and conditions of the license.\n\n## Contact\n\nIf you have any questions, suggestions, or feedback, do not hesitate to [contact me](https://federicobruzzone.github.io/).\n\nMaintainers:\n  - [FedericoBruzzone](https://github.com/FedericoBruzzone)\n  - [Andreal2000](https://github.com/Andreal2000)\n\n\u003c!-- [docs-rs]: https://docs.rs/tgt --\u003e\n\u003c!-- [docs-rs-shield]: https://docs.rs/tgt/badge.svg --\u003e\n\u003c!-- [![Docs.rs][docs-rs-shield]][docs-rs] --\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FFedericoBruzzone%2Ftgt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FFedericoBruzzone%2Ftgt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FFedericoBruzzone%2Ftgt/lists"}