{"id":13586634,"url":"https://github.com/isamert/scli","last_synced_at":"2025-04-04T23:09:09.755Z","repository":{"id":40495522,"uuid":"166571011","full_name":"isamert/scli","owner":"isamert","description":"a simple terminal user interface for signal messenger (using signal-cli)","archived":false,"fork":false,"pushed_at":"2024-03-08T10:47:18.000Z","size":795,"stargazers_count":425,"open_issues_count":25,"forks_count":39,"subscribers_count":12,"default_branch":"master","last_synced_at":"2024-05-16T09:35:53.523Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/isamert.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"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,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-01-19T16:58:41.000Z","updated_at":"2024-06-03T19:19:34.236Z","dependencies_parsed_at":"2024-03-09T06:34:17.958Z","dependency_job_id":null,"html_url":"https://github.com/isamert/scli","commit_stats":null,"previous_names":[],"tags_count":21,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/isamert%2Fscli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/isamert%2Fscli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/isamert%2Fscli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/isamert%2Fscli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/isamert","download_url":"https://codeload.github.com/isamert/scli/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247261612,"owners_count":20910108,"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":[],"created_at":"2024-08-01T15:05:41.965Z","updated_at":"2025-04-04T23:09:09.735Z","avatar_url":"https://github.com/isamert.png","language":"Python","funding_links":[],"categories":["Python","Social","\u003ca name=\"chat\"\u003e\u003c/a\u003eChat and instant messaging"],"sub_categories":[],"readme":"# scli\n`scli` is a simple terminal user interface for [Signal](https://signal.org). It uses [signal-cli](https://github.com/AsamK/signal-cli) and [urwid](http://urwid.org/).\n\n## Features\n\n- Vim-like navigation (`j`, `k`, `g`, `G`, etc), command entry with `:`.\n- Optional emacs-like `readline` bindings for input.\n- External `$EDITOR` support.\n\n### Limitations\n\n- Not yet supported by [signal-cli](https://github.com/AsamK/signal-cli/issues):\n\t- Quoting a message ([#875](https://github.com/AsamK/signal-cli/issues/875))\n\t- Adding @-mentions in sent messages ([#875](https://github.com/AsamK/signal-cli/issues/875))\n\t- Voice calls ([#80](https://github.com/AsamK/signal-cli/issues/80))\n\n- *Sending* read receipts for received messages.\n- \"View once\" and \"expiring\" messages.\n- See also: open [issues](https://github.com/isamert/scli/issues).\n\n## Installation\n### Automatic\nThe following methods are supported by community and may be outdated.\n\n[![Packaging status](https://repology.org/badge/vertical-allrepos/scli-signal-cli.svg)](https://repology.org/project/scli-signal-cli/versions)\n\n- [Debian / Ubuntu](https://gitlab.com/packaging/scli/)\n\n### Manual\n\nClone the repo\n\n```\ngit clone https://github.com/isamert/scli\n```\n\nor download a [release](https://github.com/isamert/scli/releases).\n\n#### Dependencies\n\n- [`signal-cli`](https://github.com/AsamK/signal-cli) `\u003e=v0.11.0`.\n\n\tDownload and unpack a [release](https://github.com/AsamK/signal-cli/releases), and place the `signal-cli` executable somewhere on the `$PATH`.\n\n\tOr compile from source: see [install](https://github.com/AsamK/signal-cli#Installation) section of `signal-cli` readme for instructions.\n\n- [`urwid`](https://github.com/urwid/urwid)\n\n\tAvailble on PyPI:\n\n\t```\n\tpip install urwid\n\t```\n\n\tand in some distributions' package managers, see repology [(1)](https://repology.org/project/urwid/versions), [(2)](https://repology.org/project/python:urwid/versions).\n\n- [`urwid_readline`](https://github.com/rr-/urwid_readline/) (optional)\n\n\tFor GNU readline-like keybinds on the input line (emacs-like only).\n\n\t```\n\tpip install urwid-readline\n\t```\n\n\tAlso in a few [package managers](https://repology.org/project/python:urwid-readline/versions).\n\n- [DBus](https://www.freedesktop.org/wiki/Software/dbus/)\n\n\tPre-installed on most linux distributions and BSDs with desktop environments. On macOS, the `dbus` package is available from homebrew, see [signal-cli's wiki](https://github.com/AsamK/signal-cli/wiki/DBus-service#user-content-dbus-on-macos). See also the wiki's [troubleshooting](https://github.com/AsamK/signal-cli/wiki/DBus-service#user-content-troubleshooting) section.\n\n- [Python](https://www.python.org/downloads/) `\u003e=3.7`\n\n\n### Registering or linking your device\n\nBefore running `scli`, `signal-cli` needs to be registered with the signal servers. You can either register a [new device](https://github.com/AsamK/signal-cli/wiki/Quickstart#user-content-set-up-an-account), or [link](https://github.com/AsamK/signal-cli/wiki/Linking-other-devices-(Provisioning)) `signal-cli` with an already registered device (e.g. your phone).\n\nLinking can be done interactively with `scli link`, see the [next section](#linking-with-scli-link).\n\nFor more information, see: `signal-cli` [usage](https://github.com/AsamK/signal-cli#Usage), [man page](https://github.com/AsamK/signal-cli/blob/master/man/signal-cli.1.adoc), and [wiki](https://github.com/AsamK/signal-cli/wiki).\n\n#### Linking with `scli link`\n\nLinking with an existing account can be done interactively with\n\n```\nscli link [--name DEVICE_NAME]\n```\n\nand following instructions on the screen. The `DEVICE_NAME` is optional, `scli` is used by default.\n\nThis requires [pyqrcode](https://github.com/mnooner256/pyqrcode) package (available on [PyPI](https://pypi.org/project/PyQRCode/) and other [repositories](https://repology.org/project/python:pyqrcode/versions))\n\n#### Verifying setup\n\nAfter registering or linking, verify that the following commands work:\n\n```\nsignal-cli -u USERNAME receive\n```\n\nand\n\n```\nsignal-cli -u USERNAME daemon\n```\n\nwhere `USERNAME` is the phone number you have used (starting with the \"+\" sign followed by the country calling code). Stop the latter process (`Ctrl+C`) after verifying that it starts successfully and does not throw any errors.\n\nNow you can run\n\n```\nscli\n```\n\n(if you have put it on your system's `$PATH`; alternatively, specify the full `/path/to/executable/scli`).\n\n\n## Usage\n\n### Key bindings\nFor the full list of key bindings, press `?` in scli.\n\n- `F1` opens the help window.\n- `Tab` / `Shift+Tab` cycle through focusable UI elements.\n- `j`/`k` (or `↓`/`↑`) move the cursor down/up in a conversation and the contacts list.\n- `g` focuses first contact/message.\n- `G` focuses last contact/message.\n- `Alt+J` / `Alt+K` (and `Alt+↓` / `Alt+↑`) open next / previous conversation.\n- `enter` on a message opens attachment or URL if there is one; moves the focus to the quoted message, if it exists.\n- `y` on a message puts it into system clipboard. (needs `xclip` or `wl-clipboard`; see `--clipboard-put-command` [option](#configuration)).\n- `e` or `R` on a message opens an emoji picker and sends it as a reaction. Sending an 'empty' reaction removes the previously set reaction.\n- `d` deletes the message locally (from the current device's history).\n- `D` remote-deletes the message (for everyone in the conversation).\n- `i` shows a message info pop-up with the message's details.\n- `Alt+Enter` in the input window inserts a newline.\n- `Esc` closes opened dialogs, clears search filters, removes notifications from the status line.\n\nIf [`urwid_readline`](https://github.com/rr-/urwid_readline/) module is installed, all of its keybindings are available in the input widgets.\n\n\n#### Modifying key bindings\nKey bindings can be re-mapped with a `--key-bind` option. For example:\n\n\tscli --key-bind show_message_info:s --key-bind reaction_emoji_picker:e,R,!,'ctrl r'\n\nThe syntax is\n\n\t--key-bind ACTION:KEY[,KEY[,…]]\n\nwhere `ACTION` is one of the action names (press `?` in `scli` to show the full list of action names and their default key bindings), and `KEY` is the name of a key or key combo in urwid's syntax (see the table in [Keyboard input](https://urwid.org/manual/userinput.html#keyboard-input) section of urwid manual). Keys for several actions can be re-assigned by passing multiple `--key-bind` arguments to `scli`. Multiple keys can be assigned to a single action by separating `KEY`s with commas.\n\n\n### Commands\nCommands are entered by typing `:` followed by a command name and arguments. For example:\n\n```\n:attach ~/photo.jpg Here is a picture\n:read /etc/crontab\n```\n\nSome of the available commands are listed below; to see the full list, use `:help commands` in scli.\n\n- `:help [keys|commands]` shows help. Unambiguous abbreviations of its argument is also allowed, e.g. `:help comm`, `:help c`, etc. When no argument provided, the general help window is shown.\n- `:attach FILE_PATH [MESSAGE]` or `:a …` sends `MESSAGE` with `FILE_PATH` as an attachment.\n- `:edit [MESSAGE | FILE_PATH]` or `:e […]` opens in external `$EDITOR` the contents of file `FILE_PATH` or the text `MESSAGE`. If `MESSAGE` and `FILE_PATH` are absent, opens an empty temporary file. See also: `--editor-command` [config option](#configuration).\n- `:read FILE | !COMMAND` sends the contents of `FILE` or the output of `COMMAND`.\n\nCommand names are case insensitive, i.e. `:edit` and `:eDiT` do the same thing.\n\n\n#### Modifying contacts\nModifying contacts from `scli` is possible if the account has been _registered_ with `signal-cli` as a \"primary device\" (rather than [_linked_](#registering-or-linking-your-device) with the phone app).\n\n- `:addContact NUMBER [NAME]` adds a new contact to the contact list. Added contacts' names are local (not synced with signal servers).\n- `:renameContact [ID] NEW_NAME` renames contact `ID` to `NEW_NAME`. `ID` can be either contact's phone number or contact's or group's name. If `ID` is not given, the contact from the currently opened conversation is used. Individual contacts' renames are local (not synced with the signal servers).\n\n### Searching\nFiltering messages in a conversation is done by typing `/` followed by the search string. Pressing `enter` (or `l`) on a message when the search is on removes the filter (i.e. shows all the messages in a conversation) while keeping the focus on the message. Pressing `Esc` clears the search. Searching through contacts is analogous.\n\n### Configuration\nConfiguration options can be passed to `scli` as command-line arguments or added to the configuration file in `~/.config/sclirc`. Run `scli --help` to show all available options.\n\n#### Configuration file\nEmpty lines and lines starting with `#` are ignored. Config lines have the format `OPTION = VALUE`, where `OPTION`s are the long forms of command-line arguments, with the leading `--` omitted (e.g. `enable-notifications`). `VALUE`s for the optional arguments (a.k.a. \"flags\" or \"switches\") like `--enable-notifications` can be any of: `true`, `t`, `yes`, `y` (case insensitive, i.e. with any capitalization).\n\n#### Example\n\n```sh\nscli --enable-notifications -w 80\n```\n\nConfiguration file equivalent of the above command is:\n\n```ini\nenable-notifications = true\nwrap-at = 80\n### Short option forms (w = 80) are not valid in config file.\n```\n\n#### History\n\nConversations history can be enabled with `--save-history` or `-s` flag. The file will be saved in plain text (to `~/.local/share/scli/history` by default). See the [Security](#data-storage) section regarding an encrypted storage.\n\n#### Colors\n\nMessages' text can be colorized using the `--color` option:\n\n- `--color` (no additional value)\n   Use contacts' colors from the primary signal device.\n\n- `--color=high`\n\t Same as above, but use 256 colors instead of the terminal's standard 8. Colors look closer to those on official clients, but not necessarily legible on all terminals' color schemes.\n\n- `--color='{\"\u003csignal_color\u003e\": \"\u003curwid_color\u003e\", ..., \"\u003cphone_number\u003e\": \"\u003curwid_color\u003e\", ...}'`\n   Override colors for particular contacts or redefine signal-assigned colors; use signal-assigned colors for the rest, as above. If any of the `\u003curwid_color\u003e`s is specified as a 256-color, the \"high-color mode\" will be turned on (like `--color=high`).\n\n- `--color='[\"\u003curwid_color_sent\u003e\", \"\u003curwid_color_recv\u003e\"]'`\n   Use one color for sent messages and another for received messages (from any contact).\n\nThe list of available `\u003csignal_color\u003e` names is in the [source code](https://github.com/isamert/scli/blob/9a5a49d/scli#L2925-L2939) (first column).\nAn `\u003curwid_color\u003e` is one of urwid's [16 standard foreground colors](https://urwid.readthedocs.io/en/latest/manual/displayattributes.html#standard-foreground-colors) (`dark green`, `yellow`, `default`, etc), or [256 foreground colors](https://urwid.readthedocs.io/en/latest/manual/displayattributes.html#color-foreground-and-background-colors) (`#f8d`, `h123`, etc).\nTo see the available colors rendered in your terminal, run [palette_test.py](https://github.com/urwid/urwid/blob/master/examples/palette_test.py) from urwid's examples.\nThe single quotes in `--color='...'` above are just shell-escaping, and not needed in `sclirc`.\n\n## Security\nThis is an independent project not audited or endorsed by the [Signal foundation](https://signal.org/). That is also true of [signal-cli](https://github.com/AsamK/signal-cli), which scli uses as a backend.\n\n### Data storage\nScli stores its history (if enabled with `--save-history`) in plain text. Likewise, signal-cli stores its data (received attachments, contacts info, encryption keys) unencrypted. To secure this data at rest, it is recommended to use full-disk encryption or dedicated tools like [fscrypt](https://github.com/google/fscrypt).\n\nTo protect the data from potentially malicious programs running in user-space, one can run scli and signal-cli under a separate user.\n\nFor more detailed discussions, see: [[1]](https://github.com/AsamK/signal-cli/discussions/884), [[2]](https://github.com/isamert/scli/pull/169).\n\n## Similar projects\n- A list of [TUI clients](https://github.com/AsamK/signal-cli/wiki#user-content-terminal--tui-clients) on signal-cli wiki.\n- [Another list](https://github.com/exquo/signal-soft/wiki/Software-list#user-content-tui--terminal-clients) of TUI clients.\n\n## Screenshots\n![scli](screenshots/1.png?raw=true)\n![scli](screenshots/2.png?raw=true)\n![scli](screenshots/3.png?raw=true)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fisamert%2Fscli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fisamert%2Fscli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fisamert%2Fscli/lists"}