{"id":15093377,"url":"https://github.com/d99kris/nchat","last_synced_at":"2026-05-16T06:21:17.951Z","repository":{"id":39861831,"uuid":"171477951","full_name":"d99kris/nchat","owner":"d99kris","description":"Terminal-based Telegram / WhatsApp client for Linux and macOS","archived":false,"fork":false,"pushed_at":"2025-05-10T06:15:34.000Z","size":20819,"stargazers_count":957,"open_issues_count":15,"forks_count":60,"subscribers_count":12,"default_branch":"master","last_synced_at":"2025-05-10T07:26:27.485Z","etag":null,"topics":["console","linux","macos","ncurses","telegram","telegram-client","terminal-based","tui","whatsapp","whatsapp-client"],"latest_commit_sha":null,"homepage":"","language":"C++","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/d99kris.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"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,"zenodo":null}},"created_at":"2019-02-19T13:24:47.000Z","updated_at":"2025-05-10T06:15:38.000Z","dependencies_parsed_at":"2024-06-04T12:30:33.954Z","dependency_job_id":"d8e4f444-1aaf-4c6d-8d3f-cb00664025a7","html_url":"https://github.com/d99kris/nchat","commit_stats":{"total_commits":539,"total_committers":10,"mean_commits":53.9,"dds":0.02226345083487946,"last_synced_commit":"325ece1790b83a00a610b94aa10794238e38ba74"},"previous_names":[],"tags_count":30,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/d99kris%2Fnchat","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/d99kris%2Fnchat/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/d99kris%2Fnchat/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/d99kris%2Fnchat/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/d99kris","download_url":"https://codeload.github.com/d99kris/nchat/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254254043,"owners_count":22039792,"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":["console","linux","macos","ncurses","telegram","telegram-client","terminal-based","tui","whatsapp","whatsapp-client"],"created_at":"2024-09-25T11:22:03.900Z","updated_at":"2026-05-16T06:21:17.943Z","avatar_url":"https://github.com/d99kris.png","language":"C++","funding_links":[],"categories":["C++","\u003ca name=\"chat\"\u003e\u003c/a\u003eChat and instant messaging","Table of Contents"],"sub_categories":[],"readme":"nchat\n=====\n\n| **Linux** | **Mac** |\n|-----------|---------|\n| [![Linux](https://github.com/d99kris/nchat/workflows/Linux/badge.svg)](https://github.com/d99kris/nchat/actions?query=workflow%3ALinux) | [![macOS](https://github.com/d99kris/nchat/workflows/macOS/badge.svg)](https://github.com/d99kris/nchat/actions?query=workflow%3AmacOS) |\n\nnchat is a multi-protocol terminal-based messaging client for Linux and macOS with support for\nTelegram, WhatsApp and Signal.\n\n![screenshot nchat](/doc/screenshot-nchat.png)\n\nFeatures\n--------\n- Customizable color schemes and key bindings\n- Jump to unread chat\n- Message history cache with support for text export\n- Message read receipt\n- Receive / send markdown formatted messages\n- Reply / delete / edit / forward / send messages\n- List dialogs for selecting chats, contacts, emojis, files\n- Show user status (online, away, typing)\n- Toggle to view textized emojis vs. graphical\n- View / save media files (documents, photos, videos)\n- Send and display reactions\n\n\nOptional Features\n-----------------\nSignal support is disabled by default and requires enabling a\n[feature flag](/doc/SIGNAL.md).\n\n\nUsage\n=====\nUsage:\n\n    nchat [OPTION]\n\nCommand-line Options:\n\n    -d, --confdir \u003cDIR\u003e    use a different directory than ~/.config/nchat\n    -e, --verbose          enable verbose logging\n    -ee, --extra-verbose   enable extra verbose logging\n    -h, --help             display this help and exit\n    -k, --keydump          key code dump mode\n    -m, --devmode          developer mode\n    -r, --remove           remove chat protocol account\n    -s, --setup            set up chat protocol account\n    -v, --version          output version information and exit\n    -x, --export \u003cDIR\u003e     export message cache to specified dir\n\nInteractive Commands:\n\n    PageDn      history next page\n    PageUp      history previous page\n    Tab         next chat\n    Sh-Tab      previous chat\n    Ctrl-f      jump to unread chat\n    Ctrl-g      toggle show help bar\n    Ctrl-l      toggle show contact list\n    Ctrl-n      goto chat\n    Ctrl-p      toggle show top bar\n    Ctrl-q      quit\n    Ctrl-s      insert emoji\n    Ctrl-t      send file\n    Ctrl-x      send message\n    Ctrl-y      toggle show emojis\n    KeyUp       select message\n    Alt-@       insert mention\n    Alt-a       archive current chat\n    Alt-d       delete/leave current chat\n    Alt-e       external editor compose\n    Alt-i       auto-compose reply\n    Alt-n       search contacts\n    Alt-p       pin/unpin current chat\n    Alt-t       external telephone call\n    Alt-/       find in chat\n    Alt-?       find next in chat\n    Alt-$       external spell check\n    Alt-,       decrease contact list width\n    Alt-.       increase contact list width\n\nInteractive Commands for Selected Message:\n\n    Ctrl-d      delete selected message\n    Ctrl-r      download attached file\n    Ctrl-v      open/view attached file\n    Ctrl-w      open link\n    Ctrl-x      send reply to selected message\n    Ctrl-z      edit selected message\n    Alt-c       copy selected message to clipboard\n    Alt-q       jump to quoted/replied message\n    Alt-r       forward selected message\n    Alt-s       add/remove reaction on selected message\n    Alt-w       external message viewer\n\nInteractive Commands for Text Input:\n\n    Ctrl-a      move cursor to start of line\n    Ctrl-c      clear input buffer\n    Ctrl-e      move cursor to end of line\n    Ctrl-k      delete from cursor to end of line\n    Ctrl-u      delete from cursor to start of line\n    Alt-Left    move cursor backward one word\n    Alt-Right   move cursor forward one word\n    Alt-Backsp  delete previous word\n    Alt-Delete  delete next word\n    Alt-Tab     insert tab (four spaces)\n    Alt-c       copy input buffer to clipboard (if no message selected)\n    Alt-v       paste into input buffer from clipboard\n    Alt-x       cut input buffer to clipboard\n\n\nSupported Platforms\n===================\nnchat is developed and tested on Linux and macOS. Current version has been\ntested on:\n\n- macOS Sequoia 15.5\n- Ubuntu 24.04 LTS\n\n\nInstall using Package Manager\n=============================\n\nmacOS\n-----\n**Build / Install Stable Release using Brew**\n\n    brew tap d99kris/nchat\n    brew install nchat\n\nOptionally one can disable protocols using `--without-whatsapp` and\n`--without-telegram`, for example:\n\n    brew install nchat --without-telegram\n\n\nArch Linux\n----------\n**Build / Install Latest Git**\n\n    yay -S nchat-git\n\n**Build / Install Stable Release**\n\n    yay -S nchat\n\nBuild from Source\n=================\nnchat consists of a large code-base (mainly the Telegram library tdlib), so be\nprepared for a relatively long first build time.\n\n**Get Source**\n\n    git clone https://github.com/d99kris/nchat \u0026\u0026 cd nchat\n\nUsing make.sh script\n--------------------\nIf using macOS, Alpine, Arch, Fedora, Gentoo, Raspbian, Ubuntu or Void, one\ncan use the `make.sh` script provided.\n\n**Dependencies**\n\n    ./make.sh deps\n\n**Build / Install**\n\n    ./make.sh build \u0026\u0026 ./make.sh install\n\nManually\n--------\n**Dependencies**\n\nmacOS\n\n    brew install gperf cmake openssl ncurses ccache readline help2man sqlite libmagic go\n\nArch\n\n    sudo pacman -S ccache cmake file go gperf help2man ncurses openssl readline sqlite zlib base-devel\n\nDebian-based (Ubuntu, Raspbian, etc)\n\n    sudo apt install ccache cmake build-essential gperf help2man libreadline-dev libssl-dev libncurses-dev libncursesw5-dev ncurses-doc zlib1g-dev libsqlite3-dev libmagic-dev golang\n\nFedora\n\n    sudo dnf install git cmake clang golang ccache file-devel file-libs gperf readline-devel openssl-devel ncurses-devel sqlite-devel zlib-devel\n\nGentoo\n\n    sudo emerge -n dev-util/cmake dev-util/ccache dev-util/gperf sys-apps/help2man sys-libs/readline dev-libs/openssl sys-libs/ncurses sys-libs/zlib dev-db/sqlite sys-apps/file dev-lang/go\n\nVoid\n\n    sudo xbps-install base-devel go ccache cmake gperf help2man libmagick-devel readline-devel sqlite-devel file-devel openssl-devel\n\n**Extra Dependencies**\n\nFor Wayland-based systems install `wl-clipboard` to enable clipboard\nfunctionality.\n\nTo support pasting images directly from clipboard `libpng-dev` is needed. On\nX11 systems `libxcb1-dev` and `libx11-dev` are needed as well.\n\n**Build**\n\n    mkdir -p build \u0026\u0026 cd build \u0026\u0026 cmake .. \u0026\u0026 make -s\n\n**Install**\n\n    sudo make install\n\nAdvanced Build Options\n----------------------\nBy default nchat requires ~3.5GB RAM to build using G++ and ~1.5GB RAM with\nclang++, but it is possible to reduce the memory needed,\nsee [Building on Low Memory Systems](/doc/LOWMEMORY.md).\n\nAll nchat features are enabled by default, but it's possible to control\ninclusion of some features using cmake flags, see [Feature Flags](/doc/FLAGS.md).\n\n\nGetting Started\n===============\nIn order to configure / setup an account one needs to run nchat in setup mode:\n\n    nchat --setup\n\nThe setup mode prompts for phone number, which shall be entered with country\ncode. Example:\n\n    $ nchat --setup\n    Protocols:\n    0. Dummy\n    1. Telegram\n    2. WhatsAppMd\n    3. Signal\n    4. Exit setup\n    Select protocol (3): 1\n    Enter phone number (ex. +6511111111): +6511111111\n\n    Open Telegram on your phone, go to Settings -\u003e Devices\n    and click Link Desktop Device and scan the QR code.\n    ...\n    Succesfully set up profile Telegram_+6511111111\n\nBy default, nchat uses QR code authentication. The QR code should be scanned\nusing the official app on the primary device. To use authentication code\ninstead, set the `USE_PAIRING_CODE` environment variable (see FAQ below).\n\nIf unsure of what phone number to enter, open the official app on the phone\nand look for the phone number under Settings or Profile section, and use\nthe number displayed there (omitting spaces, so for the below screenshot\nthe number to enter is `+6511111111`).\n\n![screenshot telegram phone](/doc/screenshot-phone.png)\n\nOnce the setup process is completed, the main UI of nchat will be loaded.\n\nIn order to set up multiple protocols/profiles, exit nchat and perform the\nsetup step again. To remove a protocol account, use `nchat --remove`.\n\n\nTroubleshooting\n===============\nRefer to [Debugging](/doc/DEBUGGING.md) for details.\n\n\nTelegram Group\n==============\nA Telegram group [https://t.me/nchatusers](https://t.me/nchatusers) is\navailable for users to discuss nchat usage and related topics.\n\n\nSecurity\n========\nUser data is stored locally in `~/.config/nchat`. Default file permissions\nonly allow user access, but anyone who can gain access to a user's private\nfiles can also access the user's personal nchat data. To protect against\nthe most simple attack vectors it may be suitable to use disk encryption and\nto ensure `~/.config/nchat` is not backed up unencrypted.\n\n\nConfiguration\n=============\nThe following configuration files (listed with current default values) can be\nused to configure nchat.\n\n~/.config/nchat/app.conf\n------------------------\nThis configuration file holds general application settings. Default content:\n\n    assert_abort=0\n    attachment_prefetch=1\n    attachment_send_type=1\n    cache_enabled=1\n    cache_read_only=0\n    clipboard_copy_command=\n    clipboard_has_image_command=\n    clipboard_paste_command=\n    clipboard_paste_image_command=\n    coredump_enabled=0\n    downloads_dir=\n    emoji_list_all=0\n    link_send_preview=1\n    logdump_enabled=0\n    mentions_quoted=1\n    message_delete=1\n    proxy_host=\n    proxy_pass=\n    proxy_port=\n    proxy_user=\n    timestamp_iso=0\n    use_pairing_code=0\n    use_qr_terminal=0\n    version_used=\n\n### assert_abort\n\nSpecifies whether to abort execution (crash) if assertions fail. Primarily\nintended for debugging.\n\n### attachment_send_type\n\nSpecifies how attachments are sent:\n\n    0 = send all attachments as document type (typically preserves file content)\n    1 = detect file type (audio, video, image, document) and send as that type \u003c- default\n    2 = like 1, but when sending just a file (no text or quote), webp files are\n        sent as stickers and mp4/m4v files as borderless auto-playing \"GIFs\"\n\n### attachment_prefetch\n\nSpecifies level of attachment prefetching:\n\n    0 = no prefetch (download upon open/save)\n    1 = selected (download upon message selection) \u003c- default\n    2 = all (download when message is received)\n\n### cache_enabled\n\nSpecifies whether to enable cache functionality.\n\n### cache_read_only\n\nSpecifies whether to access cache read-only. Primarily intended for debugging.\n\n### clipboard_*_command\n\nSpecifies custom clipboard commands to be used instead of system clipboard.\nRefer to [Clipboard](/doc/CLIPBOARD.md) for details.\n\n### coredump_enabled\n\nSpecifies whether to enable core dumps on application crash.\n\n### downloads_dir\n\nSpecifies a custom downloads directory path to save attachments to. If not\nspecified, the default dir is `~/Downloads` if exists, otherwise `~`.\n\n### emoji_list_all\n\nSpecifies whether the emoji dialog should list all emojis, it is otherwise\nrestricted to listing emojis that renders properly in common terminals.\n\n### link_send_preview\n\nSpecifies whether to enable preview for links in messages sent (Telegram only).\n\n### logdump_enabled\n\nSpecifies whether to dump warning and error log messages to stdout upon exit.\n\n### mentions_quoted\n\nSpecifies whether to use bracket quoting for display-name mentions with spaces.\n\n### message_delete\n\nSpecifies handling of message deletion by other users (WhatsApp and Signal):\n\n    1 = erase message \u003c- default\n    2 = replace message text with `[This message was deleted]`\n    3 = prefix message text with `[This message was deleted]`\n\nMessages deleted by oneself are always erased locally regardless of this\nsetting. Deleting messages already marked deleted erases them locally.\n\n### proxy_\n\nSOCKS5 proxy server details. To enable proxy usage the parameters `host` and\n`port` are required, while `user` and `pass` are optional (depending on the\nSOCKS server). Note: In order to use a proxy while setting up nchat the first\ntime, it is recommended to first run nchat without arguments (`nchat`) for its\nconfig dir to be created, and then edit proxy settings in\n`~/.config/nchat/app.conf` as needed, before running `nchat -s` to setup an\naccount.\n\n### timestamp_iso\n\nSpecifies whether to use ISO-style timestamps (`YYYY-MM-DD HH:MM`) in the UI\nand at export of chat history. By default nchat uses a dynamic \"human-friendly\"\nformat:\n\n- `HH:MM` for timestamps on same date as today, e.g. `19:00`\n- `DAY HH:MM` for timestamps in the last week, e.g. `Mon 19:00`\n- `DD MMM HH:MM` for timestamps in the current year, e.g. `14 Nov 19:00`\n- `DD MMM YYYY HH:MM` for timestamps in non-current year, e.g. `14 Nov 2022 19:00`\n- `DD MMM YYYY HH:MM` for timestamps during export, e.g. `14 Nov 2022 19:00`\n\n### use_pairing_code\n\nStores the environment variable flag `USE_PAIRING_CODE` if set during setup.\nIt specifies whether to use pairing code / authentication code instead of\nQR code (Telegram/WhatsApp).\n\n### use_qr_terminal\n\nStores the environment variable flag `USE_QR_TERMINAL` if set during setup.\nIt specifies whether to display QR code in the terminal, disabling detection\nof GUI capability for displaying images.\n\n### version_used\n\nFor internal use only. Stores version used for last successful execution. May\nbe used for debugging startup crash / hang regressions.\n\n~/.config/nchat/ui.conf\n-----------------------\nThis configuration file holds general user interface settings. Default content:\n\n    attachment_indicator=📎\n    attachment_open_command=\n    away_status_indication=0\n    auto_compose_command=\n    auto_compose_enabled=0\n    auto_compose_history_count=25\n    auto_select_chat_timeout_sec=1\n    call_command=\n    chat_picker_sorted_alphabetically=0\n    confirm_archiving=1\n    confirm_deletion=1\n    confirm_send_pasted_image=1\n    desktop_notify_active_current=0\n    desktop_notify_active_noncurrent=1\n    desktop_notify_command=\n    desktop_notify_connectivity=1\n    desktop_notify_enabled=0\n    desktop_notify_inactive=1\n    downloadable_indicator=+\n    edited_indicator=✎\n    emoji_enabled=1\n    entry_height=4\n    failed_indicator=✗\n    file_picker_command=\n    file_picker_persist_dir=1\n    help_enabled=1\n    home_fetch_all=0\n    linefeed_on_enter=1\n    link_open_command=\n    list_enabled=1\n    list_width=14\n    listdialog_show_filter=1\n    mark_read_any_chat=0\n    mark_read_on_view=1\n    mark_read_when_inactive=0\n    message_edit_command=\n    message_open_command=\n    muted_indicate_unread=1\n    muted_notify_unread=0\n    muted_position_by_timestamp=1\n    notify_every_unread=1\n    online_status_share=1\n    online_status_dynamic=1\n    phone_number_indicator=\n    pinned_indicator=⚲\n    proxy_indicator=🔒\n    read_indicator=✓\n    reactions_enabled=1\n    spell_check_command=\n    status_broadcast=1\n    status_enabled=1\n    syncing_indicator=⇄\n    tab_size=4\n    terminal_bell_active=0\n    terminal_bell_inactive=1\n    terminal_title=\n    top_enabled=1\n    top_show_version=0\n    transfer_send_caption=1\n    typing_status_share=1\n    undo_clear_input=1\n    unread_indicator=*\n\n### attachment_indicator\n\nSpecifies text to prefix attachment filenames in message view.\n\n### attachment_open_command\n\nSpecifies a custom command to use for opening/viewing attachments. The\ncommand shall include `%1` which will be replaced by the filename\nto open. If not specified, the following default commands are used:\n\nLinux: `xdg-open \u003e/dev/null 2\u003e\u00261 '%1' \u0026`\n\nmacOS: `open '%1' \u0026`\n\nNote: Omit the trailing `\u0026` for commands taking over the terminal, for\nexample `w3m -o confirm_qq=false '%1'` and `see '%1'`.\n\n### away_status_indication\n\nSpecifies whether to indicate away status in the top bar while sharing away\nstatus with other users. I.e. the status will read `Away` instead of `Online`\nwhen the terminal is inactive (assuming `online_status_share=1` and\n`online_status_dynamic=1`).\n\n\n### auto_compose_command\n\nSpecifies a custom command to use to auto-compose message reply. The\ncommand shall include `%1` which will be replaced by the path of a temporary\ntext file with message history. If not specified, the following default\ncommand is used:\n\n    (prefix)/libexec/nchat/compose -c '%1'\n\nRefer to [Auto-Compose](/doc/AUTOCOMPOSE.md) for details.\n\n### auto_compose_enabled\n\nSpecifies whether to enable using auto-compose. The reason for not enabling\nit by default is that the `compose` tool may use third-party services (if API\nkey is set up in the shell environment) that can incur costs.\n\n### auto_compose_history_count\n\nSpecifies the maximum number of chat messages up to latest (or current\nselected) to pass to the auto-compose tool.\n\n### auto_select_chat_timeout_sec\n\nSpecifies a timeout after receiving previous history sync message (with\ntimestamp before the application went online) for automatically setting\ncurrent chat. If disabled (value 0) current chat will only be set upon\nany user input, or receiving a message with timestamp after application\nwent online (connected to server).\n\n### call_command\n\nSpecifies a custom command to use for starting a call using an external\ntool. The command shall include `%1` which will be replaced by the phone\nnumber of the contact. If not specified, the following default commands\nare used:\n\nLinux: `xdg-open \u003e/dev/null 2\u003e\u00261 'tel://%1' \u0026`\n\nmacOS: `open 'tel://%1' \u0026`\n\n### chat_picker_sorted_alphabetically\n\nSpecifies whether the chat selection dialog (used when forwarding message)\nshould be sorted alphabetically. If not, its order follows the main chat\nlist order.\n\n### confirm_archiving\n\nSpecifies whether to prompt the user for confirmation when archiving a chat.\n\n### confirm_deletion\n\nSpecifies whether to prompt the user for confirmation when deleting a message\nor a chat.\n\n### confirm_send_pasted_image\n\nSpecifies whether to prompt the user for confirmation when pasting an image\nto a chat.\n\n### desktop_notify_active_current\n\nSpecifies whether new message in current chat shall trigger desktop\nnotification when nchat terminal window is active.\n\n### desktop_notify_active_noncurrent\n\nSpecifies whether new message in non-current chat shall trigger desktop\nnotification when nchat terminal window is active.\n\n### desktop_notify_command\n\nSpecifies a custom command to use for desktop notifications. The command may\ninclude `%1` (will be replaced by `sender name` or `group name - sender name`)\nand `%2` (will be replaced by `message text`) enclosed in single quotes (to\nprevent shell injection). Default command used, if not specified:\n\nLinux: `notify-send 'nchat' '%1: %2'`\n\nmacOS: `osascript -e 'display notification \"%1: %2\" with title \"nchat\"'`\n\n### desktop_notify_connectivity\n\nSpecifies whether change of connectivity status (going offline or back online)\nshall trigger desktop notification.\n\n### desktop_notify_enabled\n\nSpecifies whether desktop notifications are permitted. Simply enabling this\nparameter will not display notifications, unless other `desktop_notify_*`\nparameters are enabled.\n\n### desktop_notify_inactive\n\nSpecifies whether new message shall trigger desktop notification when nchat\nterminal window is inactive.\n\n### downloadable_indicator\n\nSpecifies text to suffix attachment filenames in message view for attachments\nnot yet downloaded. This is only shown for `attachment_prefetch` \u003c 2.\n\n### edited_indicator\n\nSpecifies text to suffix message header in message view for messages that have\nbeen edited.\n\n### emoji_enabled\n\nSpecifies whether to display emojis. Controlled by Ctrl-y in run-time.\n\n### entry_height\n\nSpecifies height of text entry area.\n\n### failed_indicator\n\nSpecifies text to suffix attachment filenames in message view for failed\ndownloads.\n\n### file_picker_command\n\nSpecifies a command to use for file selection, in place of the internal file\nselection dialog used when sending files. The command shall include `%1` (a\ntemporary file path) which the command should write its result to. Examples:\n\nnnn: `nnn -p '%1'`\n\nranger: `ranger --choosefiles='%1'`\n\n### file_picker_persist_dir\n\nSpecifies whether the file selection dialog shall persist the directory of\nlast selected file.\n\n### help_enabled\n\nSpecifies whether to display help bar. Controlled by Ctrl-g in run-time.\n\n### home_fetch_all\n\nSpecifies whether `home` button shall repeatedly fetch all chat history.\n\n### linefeed_on_enter\n\nSpecifies if enter key press should be read as linefeed (LF `\\12`).\nOtherwise read as carriage return (CR `\\15`). This setting is only\nrelevant if `key.conf` uses numerical key value for enter (LF `\\12`,\nCR `\\15`). The key name `KEY_RETURN` always maps to the one in use.\n\n### link_open_command\n\nSpecifies a custom command to use for opening/viewing links. The\ncommand shall include `%1` which will be replaced by the url\nto open. If not specified, the following default commands are used:\n\nLinux: `xdg-open \u003e/dev/null 2\u003e\u00261 '%1' \u0026`\n\nmacOS: `open '%1' \u0026`\n\nNote: Omit the trailing `\u0026` for commands taking over the terminal, for\nexample `w3m -o confirm_qq=false '%1'` and `see '%1'`.\n\n### list_enabled\n\nSpecifies whether to display chat list. Controlled by Ctrl-l in run-time.\n\n### list_width\n\nSpecifies width of chat list.\n\n### listdialog_show_filter\n\nSpecifies whether list dialogs should display the search filter input by user.\n\n### mark_read_any_chat\n\nSpecifies whether nchat may mark messages as read before current chat has\nbeen set (either through user activity or time elapsed since last old sync\nmessage was received).\n\n### mark_read_on_view\n\nSpecifies whether nchat should send message read receipts upon viewing. If\nfalse nchat will only mark the messages read upon `next_page` (page down),\n`end` (end) or upon sending a message/file in the chat.\n\n### mark_read_when_inactive\n\nControls whether nchat marks messages in the current chat as read while the\nterminal is inactive.\n\n### message_edit_command\n\nSpecifies a custom command to use for external editor compose. If not\nspecified, nchat will use `EDITOR` environment variable if set, or\notherwise use `nano`.\n\n### message_open_command\n\nSpecifies a custom command to use for opening/viewing message text part. If\nnot specified, nchat will use `PAGER` environment variable if set, or\notherwise use `less`.\n\n### muted_indicate_unread\n\nSpecifies whether chat list should indicate unread status `*` for muted chats.\nThis also determines whether the such chats are included in jump to unread.\n\n### muted_notify_unread\n\nSpecifies whether to notify (terminal bell) new unread messages in muted chats.\n\n### muted_position_by_timestamp\n\nSpecifies whether chat list position of muted chats should reflect the time of\ntheir last received/sent message. Otherwise muted chats are listed last.\n\n### notify_every_unread\n\nSpecifies whether to notify upon receiving more messages in an unread chat.\n\n### online_status_share\n\nShare online status with other users.\nNote: Disabling this stops updates on other users online/typing status for\nWhatsApp.\n\n### online_status_dynamic\n\nDynamically update online status based on terminal active state.\nNote: Enabling this stops updates on other users online/typing status for\nWhatsApp when the terminal is not active.\n\n### phone_number_indicator\n\nSpecifies status bar text to indicate phone number of the current chat is\navailable. This field may contain `%1` which will be replaced with the actual\nphone number of the contact. Other examples: `🎧`\n\n### pinned_indicator\n\nSpecifies text to suffix message header in message view for messages that have\nbeen pinned.\n\n### proxy_indicator\n\nSpecifies top bar text to indicate proxy is enabled.\n\n### read_indicator\n\nSpecifies text to indicate a message has been read by the receiver.\n\n### reactions_enabled\n\nSpecifies whether to display reactions.\n\n### spell_check_command\n\nSpecifies a custom command to use for spell checking composed messages. If not\nspecified, nchat checks if `aspell` or `ispell` is available on the system (in\nthat order), and uses the first found.\n\n### status_broadcast\n\nSpecifies (WhatsApp) Status Updates chat level of visibility:\n\n    0 = hidden\n    1 = visible and muted  \u003c- default\n    2 = visible\n\n### status_enabled\n\nSpecifies whether to display status bar.\n\n### syncing_indicator\n\nSpecifies text to suffix attachment filenames in message view for downloads\nin progress.\n\n### tab_size\n\nSpecifies number of spaces to insert when user inputs a tab character.\n\n### terminal_bell_active\n\nSpecifies whether new message shall trigger terminal bell when nchat terminal\nwindow is active.\n\n### terminal_bell_inactive\n\nSpecifies whether new message shall trigger terminal bell when nchat terminal\nwindow is inactive.\n\n### terminal_title\n\nSpecifies custom terminal title, ex: `terminal_title=nchat - telegram`.\n\n### top_enabled\n\nSpecifies whether to display top bar. Controlled by Ctrl-p in run-time.\n\n### top_show_version\n\nSpecifies whether to display nchat version in top bar.\n\n### transfer_send_caption\n\nSpecifies if entered text should be sent as caption when transferring a file.\n\n### typing_status_share\n\nSpecifies whether to share typing status with other user(s) in the\nconversation.\n\n### undo_clear_input\n\nSpecifies whether undoing clearing of input buffer (by pressing ctrl-c again)\nis enabled.\n\n### unread_indicator\n\nSpecifies the character to suffix chats with unread messages in the chat list.\n\n~/.config/nchat/key.conf\n------------------------\nThis configuration file holds user interface key bindings. Default content:\n\n    archive_chat=\\33\\141\n    auto_compose=\\33\\151\n    backspace=KEY_BACKSPACE\n    backspace_alt=KEY_ALT_BACKSPACE\n    backward_kill_word=\\33\\177\n    backward_word=\n    begin_line=KEY_CTRLA\n    cancel=KEY_CTRLC\n    clear=KEY_CTRLC\n    copy=\\33\\143\n    cut=\\33\\170\n    decrease_list_width=\\33\\54\n    delete=KEY_DC\n    delete_chat=\\33\\144\n    delete_line_after_cursor=KEY_CTRLK\n    delete_line_before_cursor=KEY_CTRLU\n    delete_msg=KEY_CTRLD\n    down=KEY_DOWN\n    edit_msg=KEY_CTRLZ\n    end=KEY_END\n    end_line=KEY_CTRLE\n    ext_call=\\33\\164\n    ext_edit=\\33\\145\n    find=\\33\\57\n    find_next=\\33\\77\n    forward_msg=\\33\\162\n    forward_word=\n    goto_chat=KEY_CTRLN\n    home=KEY_HOME\n    increase_list_width=\\33\\56\n    jump_pinned=KEY_CTRLP\n    jump_quoted=\\33\\161\n    kill_word=\n    left=KEY_LEFT\n    linebreak=KEY_RETURN\n    next_chat=KEY_TAB\n    next_page=KEY_NPAGE\n    ok=KEY_RETURN\n    open=KEY_CTRLV\n    open_link=KEY_CTRLW\n    open_msg=\\33\\167\n    other_commands_help=KEY_CTRLO\n    paste=\\33\\166\n    pin=\\33\\160\n    prev_chat=KEY_BTAB\n    prev_page=KEY_PPAGE\n    quit=KEY_CTRLQ\n    react=\\33\\163\n    right=KEY_RIGHT\n    save=KEY_CTRLR\n    select_contact=\\33\\156\n    select_emoji=KEY_CTRLS\n    select_mention=\\33\\62\n    send_msg=KEY_CTRLX\n    spell=\\33\\44\n    tab=\\33\\11\n    terminal_focus_in=KEY_FOCUS_IN\n    terminal_focus_out=KEY_FOCUS_OUT\n    terminal_resize=KEY_RESIZE\n    toggle_emoji=KEY_CTRLY\n    toggle_help=KEY_CTRLG\n    toggle_list=KEY_CTRLL\n    toggle_top=KEY_NONE\n    transfer=KEY_CTRLT\n    unread_chat=KEY_CTRLF\n    up=KEY_UP\n\nThe key bindings may be specified in the following formats:\n- Ncurses macro (ex: `KEY_CTRLK`)\n- Hex key code (ex: `0x22e`)\n- Octal key code sequence (ex: `\\033\\177`)\n- Plain-text single-char ASCII (ex: `r`)\n- Disable key binding (`KEY_NONE`)\n\nTo determine the key code sequence for a key, one can run nchat in key code\ndump mode `nchat -k` which will output the octal code, and ncurses macro name\n(if present).\n\n~/.config/nchat/color.conf\n--------------------------\nThis configuration file holds user interface color settings. Default content:\n\n    default_color_bg=\n    default_color_fg=\n    dialog_attr=\n    dialog_attr_selected=reverse\n    dialog_color_bg=\n    dialog_color_fg=\n    entry_attr=\n    entry_color_bg=\n    entry_color_fg=\n    help_attr=reverse\n    help_color_bg=black\n    help_color_fg=white\n    history_name_attr=bold\n    history_name_attr_selected=reverse\n    history_name_recv_color_bg=\n    history_name_recv_color_fg=\n    history_name_recv_group_color_bg=\n    history_name_recv_group_color_fg=\n    history_name_sent_color_bg=\n    history_name_sent_color_fg=gray\n    history_text_attachment_color_bg=\n    history_text_attachment_color_fg=gray\n    history_text_attr=\n    history_text_attr_selected=reverse\n    history_text_quoted_color_bg=\n    history_text_quoted_color_fg=gray\n    history_text_reaction_color_bg=\n    history_text_reaction_color_fg=gray\n    history_text_recv_color_bg=\n    history_text_recv_color_fg=\n    history_text_recv_group_color_bg=\n    history_text_recv_group_color_fg=\n    history_text_sent_color_bg=\n    history_text_sent_color_fg=gray\n    list_attr=\n    list_attr_selected=reverse\n    list_color_bg=\n    list_color_fg=\n    list_color_unread_bg=\n    list_color_unread_fg=\n    listborder_attr=\n    listborder_color_bg=\n    listborder_color_fg=\n    status_attr=reverse\n    status_color_bg=\n    status_color_fg=\n    top_attr=reverse\n    top_color_bg=\n    top_color_fg=\n\nSupported text attributes `_attr` (defaults to `normal` if not specified):\n\n    normal\n    underline\n    reverse\n    bold\n    italic\n\nSupported text background `_bg` and foreground `_fg` colors:\n\n    black\n    red\n    green\n    yellow\n    blue\n    magenta\n    cyan\n    white\n    gray\n    bright_black (same as gray)\n    bright_red\n    bright_green\n    bright_yellow\n    bright_blue\n    bright_magenta\n    bright_cyan\n    bright_white\n\nCustom colors may be specified using hex RGB code, for example `0xff8937`.\n\nThe `history_name_recv_group_color` and `history_text_recv_group_color`\nparameters also supports the special value `usercolor`. When set, nchat will\ndetermine which color to use for a user, based on a hash of their user id\nused to pick a color from the list in `~/.config/nchat/usercolor.conf`.\n\nThemes\n------\nColor themes are available in the source package under the `themes` directory\nand can be used by copying to `~/.config/nchat/`.\n\nAvailable themes:\n\n    ayu-dark\n    basic-color\n    catppuccin-mocha\n    default\n    dracula\n    espresso\n    gruvbox-dark\n    gruvbox-dark-hard\n    solarized-dark-higher-contrast\n    tokyo-night\n    tomorrow-night\n    zenbones-dark\n    zenburned\n\nSee the [Themes wiki-page](https://github.com/d99kris/nchat/wiki/Themes) for\nexample screenshots.\n\n### Installing theme from source\n\nWith a source code copy, simply copy the theme files to the config directory\n(while nchat is not running). Example installing `dracula` theme:\n\n    cp themes/dracula/* ~/.config/nchat/\n\n### Installing theme from web\n\nOne can fetch current `master` copy of a theme from the github repository and\ndownload to the config directory (while nchat is not running). Example\ninstalling `dracula` theme:\n\n    THEME=\"dracula\" ; curl -L \"https://raw.githubusercontent.com/d99kris/nchat/refs/heads/master/themes/${THEME}/{color.conf,usercolor.conf}\" -o ~/.config/nchat/#1\n\n### Generating theme from iTerm2-Color-Schemes\n\nTo generate nchat themes based on\n[iTerm2 Color Schemes](https://github.com/mbadolato/iTerm2-Color-Schemes)\nrefer to [Generating nchat themes from iTerm2 Color Schemes](/themes/templates/iterm2-color-schemes/README.md).\n\nGeneral\n-------\nDeleting a configuration entry line (while nchat is not running) and starting\nnchat will populate the configuration file with the default entry.\n\n\nProtocol-Specific Configuration\n===============================\n\nThe following configuration files (listed with current default values) can be\nused to configure nchat.\n\n~/.config/nchat/profiles/Telegram_+nnnnn/telegram.conf\n------------------------------------------------------\nThis configuration file holds protocol-specific settings for Telegram. Default\ncontent:\n\n    local_key=\n    markdown_enabled=1\n    markdown_version=1\n    profile_display_name=\n\n### local_key\n\nFor internal use by nchat only.\n\n### markdown_enabled\n\nSpecifies whether to enable Markdown \u003c-\u003e text conversion for text messages\n(default enabled).\n\n### markdown_version\n\nSpecifies which Telegram Markdown version to use (default 1).\n\n### profile_display_name\n\nSpecifies an optional short/display name in the status bar when using nchat\nwith multiple profiles. The default profile name is `Telegram` or\n`Telegram_+nnnnn` (when more than one Telegram profile is set up) if this\nsetting is not specified.\n\n~/.config/nchat/profiles/WhatsAppMd_+nnnnn/whatsappmd.conf\n----------------------------------------------------------\nThis configuration file holds protocol-specific settings for WhatsApp. Default\ncontent:\n\n    profile_display_name=\n\n### profile_display_name\n\nSpecifies an optional short/display name in the status bar when using nchat\nwith multiple profiles. The default profile name is `WhatsAppMd` or\n`WhatsAppMd_+nnnnn` (when more than one WhatsAppMd profile is set up) if this\nsetting is not specified.\n\n~/.config/nchat/profiles/Signal_+nnnnn/signal.conf\n----------------------------------------------------------\nThis configuration file holds protocol-specific settings for Signal. Default\ncontent:\n\n    profile_display_name=\n\n### profile_display_name\n\nSpecifies an optional short/display name in the status bar when using nchat\nwith multiple profiles. The default profile name is `Signal` or\n`Signal_+nnnnn` (when more than one Signal profile is set up) if this\nsetting is not specified.\n\n\nFAQ\n===\n\n### 1. Alt/Opt-keyboard shortcuts are not working?\n\nFor Linux please ensure the terminal is configured with\n[meta to send escape](https://askubuntu.com/questions/442644/how-to-make-xterm-to-send-the-alt-key-to-emacs-as-meta).\nFor macOS Terminal ensure that the Terminal profile keyboard setting\n\"Use Option as Meta key\" is enabled.\n\nIf issues are still encountered, please use `nchat -k` (keydump mode) to\ndetermine the key codes and modify `~/.config/nchat/key.conf` accordingly.\n\n### 2. Send messages with Enter key?\n\nTo simply send on Enter key press and skip message compose with linebreaks,\none can just set `send_msg=KEY_RETURN` in `~/.config/nchat/key.conf`.\n\nTo also be able to compose messages with linebreaks using Alt/Opt-Enter, edit\n`~/.config/nchat/ui.conf` and set `linefeed_on_enter=0`. And in\n`~/.config/nchat/key.conf` set `linebreak=\\33\\15`.\n\n### 3. Custom colors are not shown when running nchat in tmux?\n\nPlease try to run nchat with a TERM supporting custom colors, e.g:\n\n    TERM=xterm-256color nchat\n\n### 4. Sent messages are not visible?\n\nFor terminals with eight colors (or more) the default color theme displays\nsent messages in gray (shaded). Some terminals may wrongly report supporting\nmore colors than two, or the terminal may be set up with gray mapped to black.\nIn this case sent / own messages may appear invisible. To avoid nchat using\ngray one can edit `~/.config/nchat/color.conf` and remove occurances of `gray`.\n\n### 5. How to use Telegram and WhatsApp concurrently or switch between them?\n\nThe **recommended** method is to set up nchat with one config directory per\nprotocol/phone number, and run each instance in separate terminal windows/tabs.\nTo simplify such usage one can set up aliases, for example:\n\n    alias telegram='nchat -d ~/.config/nchat-telegram'\n    alias whatsapp='nchat -d ~/.config/nchat-whatsapp'\n\nThen use regular setup for them (separately), for example:\n\n    telegram -s\n    whatsapp -s\n\nThe **alternative** method is to set up multiple protocol accounts in a single\nnchat config directory. For each protocol/phone nubmer, run setup mode and exit\nafter initial sync:\n\n    nchat -s\n\n### 6. How to set up Telegram / WhatsApp without scanning a QR code?\n\nBy default setting up a Telegram or WhatsApp account will display a QR code\nto be scanned using the mobile application on the primary device. As an\nalternative one can set an environment flag to use authentication code\n(Telegram) or pairing code (WhatsApp) instead:\n\n    USE_PAIRING_CODE=1 nchat -s\n\n### 7. No QR code is shown when setting up Telegram / WhatsApp / Signal?\n\nBy default nchat will attempt to detect if the system is capable of viewing\nimages using a GUI image viewer, and if detected (indicated by \"has gui\" in\nthe log) it displays the QR code using default image viewer. If that for some\nreason fails, one can use pairing code (see above), or force nchat to display\nthe QR code in the terminal:\n\n    USE_QR_TERMINAL=1 nchat -s\n\n### 8. Build fails with `c++: fatal error: Killed signal terminated program cc1plus`?\n\nThis often means that OOM killer has terminated the compilation due to the\nsystem running out of free RAM.\n\nIf the system has **less than 4 GB RAM**, please refer to\n[Building on Low Memory Systems](/doc/LOWMEMORY.md).\n\nIf the system has **4 GB RAM or more**, the problem can occur if parallelism\nis set too high, which is likely to be encountered when installing from the\nArch Linux AUR package. A workaround for the AUR package is to manually\nrestrict max number of parallel jobs to `available RAM in GB` divided by 4.\nFor example a system with 8 GB would then need to use max 8 / 4 = 2 jobs:\n\n    CMAKE_BUILD_PARALLEL_LEVEL=2 yay -S nchat\n\nAlternatively one can [Build from Source](#build-from-source) using the\n`make.sh` script, which sets parallel job count based on the system\ncapabilities.\n\n### 9. Terminal transparency is not working?\n\nIf on Linux, try removing any custom default background set up, i.e. set\n`default_color_bg=` in `~/.config/nchat/color.conf`.\n\n\nProject Scope\n=============\n\nLimitations\n-----------\nThere are no plans to support the following features:\n- Telegram secret chats\n- Voice / video calls\n\nAdditionally, WhatsApp and Signal are only supported on macOS and glibc-based\nLinux systems. Thus, it is not supported on musl-based operating systems, such\nas Alpine Linux. See [issue #204](https://github.com/d99kris/nchat/issues/204)\nfor technical details on this limitation.\n\nRoadmap\n-------\nThere is currently no concrete roadmap for further feature development of\nnchat. It is not intended to be a full-featured client on par with official\nTelegram / WhatsApp / Signal clients, but rather a light-weight client\nproviding essential functionality suitable for the terminal. However, feel\nfree to submit feature requests if there's something missing, or help upvote\n[existing feature requests](https://github.com/d99kris/nchat/discussions/categories/ideas?discussions_q=is%3Aopen+category%3AIdeas),\nif it's useful and low effort it will be considered.\n\n\nContributions\n=============\nPlease refer to [Contributing Guidelines](/doc/CONTRIBUTING.md) and\n[Design Notes](/doc/DESIGN.md).\n\n\nAlternatives\n============\nTerminal-based Telegram clients:\n\n- [tg](https://github.com/paul-nameless/tg)\n- [tgt](https://github.com/FedericoBruzzone/tgt)\n\nTerminal-based WhatsApp clients:\n\n- [whatscli](https://github.com/normen/whatscli)\n\nTerminal-based Signal clients:\n\n- [gurk-rs](https://github.com/boxdot/gurk-rs)\n\n\nTechnical Details\n=================\n\nCustom API Id / Hash\n--------------------\nnchat uses its own Telegram API id and hash by default. To use custom id/hash,\nobtained from [https://my.telegram.org/](https://my.telegram.org/) one may set\nenvironment variables `TG_APIID` and `TG_APIHASH` when setting up a new Telegram\naccount. Example (below values must be changed to valid api id/hash):\n\n    TG_APIID=\"123456\" TG_APIHASH=\"aaeaeab342aaa23423\" nchat -s\n\nThird-party Libraries\n---------------------\nnchat is primarily implemented in C++ with some parts in Go. Its source tree\nincludes the source code of the following third-party libraries:\n\n- [apathy](https://github.com/dlecocq/apathy) -\n  Copyright 2013 Dan Lecocq -\n  [MIT License](/ext/apathy/LICENSE)\n\n- [cereal](https://github.com/USCiLab/cereal) -\n  Copyright 2013 Randolph Voorhies, Shane Grant -\n  [BSD-3 License](/ext/cereal/LICENSE)\n\n- [clip](https://github.com/dacap/clip) -\n  Copyright 2015 David Capello -\n  [MIT License](/ext/clip/LICENSE.txt)\n\n- [QR-Code-generator](https://github.com/nayuki/QR-Code-generator) -\n  Copyright 2022 Project Nayuki -\n  [MIT License](/ext/QR-Code-generator/Readme.markdown)\n\n- [mautrix-signal](https://github.com/mautrix/signal) -\n  Copyright 2020 Tulir Asokan -\n  [AGPL License](/lib/sgchat/go/ext/signal/LICENSE)\n\n- [stb](https://github.com/nothings/stb) -\n  Copyright 2017 Sean Barrett -\n  [MIT License](/ext/stb/LICENSE)\n\n- [sqlite_modern_cpp](https://github.com/SqliteModernCpp/sqlite_modern_cpp) -\n  Copyright 2017 aminroosta -\n  [MIT License](/ext/sqlite_modern_cpp/License.txt)\n\n- [tdlib](https://github.com/tdlib/td) -\n  Copyright 2014 Aliaksei Levin, Arseny Smirnov -\n  [Boost License](/lib/tgchat/ext/td/LICENSE_1_0.txt)\n\n- [whatsmeow](https://github.com/tulir/whatsmeow) -\n  Copyright 2022 Tulir Asokan -\n  [MPL License](/lib/wmchat/go/ext/whatsmeow/LICENSE)\n\nThe [tdlib](https://github.com/tdlib/td),\n[whatsmeow](https://github.com/tulir/whatsmeow) and\n[signal](https://github.com/mautrix/signal)\nlibraries are actively\ndeveloped and need to be updated and integrated into nchat on a regular\nbasis by nchat maintainer(s). To facilitate this there are scripts available\nto update to latest (or a specific) version of these libraries. Example usages:\n\n    ./utils/tdlib-update 8517026\n\n    ./utils/whatsmeow-update 7aedaa1\n\n    ./utils/signal-update 93da772\n\nCode Formatting\n---------------\nUncrustify is used to maintain consistent source code formatting, example:\n\n    ./make.sh src\n\n\nLicense\n=======\nnchat is distributed under the MIT license. See LICENSE file.\n\n\nKeywords\n========\ncommand line, console-based, linux, macos, chat client, ncurses, telegram,\nterminal-based.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fd99kris%2Fnchat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fd99kris%2Fnchat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fd99kris%2Fnchat/lists"}