{"id":15093377,"url":"https://github.com/d99kris/nchat","last_synced_at":"2025-05-15T01:09:31.563Z","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":"2025-05-15T01:09:26.554Z","avatar_url":"https://github.com/d99kris.png","language":"C++","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 terminal-based chat client for Linux and macOS with support for\nTelegram and WhatsApp.\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\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-d       delete/leave current chat\n    Alt-e       external editor compose\n    Alt-n       search contacts\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-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 Sonoma 14.5\n- Ubuntu 22.04 LTS\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**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. Exit setup\n    Select protocol (3): 1\n    Enter phone number (ex. +6511111111): +6511111111\n    Enter authentication code: xxxxx\n    Succesfully set up profile Telegram_+6511111111\n\nIf unsure of what phone number to enter, open the Telegram app on the phone\nand press the menu button and use the number displayed there (omitting spaces,\nso for the below screenshot the 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.\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 Telegram 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    attachment_prefetch=1\n    attachment_send_type=1\n    cache_enabled=1\n    coredump_enabled=0\n    downloads_dir=\n    emoji_list_all=0\n    link_send_preview=1\n    logdump_enabled=0\n    proxy_host=\n    proxy_pass=\n    proxy_port=\n    proxy_user=\n    timestamp_iso=0\n\n### attachment_send_type\n\nSpecifies whether to detect file type (audio, video, image, document) and send\nattachments as those types, instead of sending all attachments as document\ntype (which typically leaves original file content intact).\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### 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### 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~/.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    call_command=\n    chat_picker_sorted_alphabetically=0\n    confirm_deletion=1\n    desktop_notify_active=0\n    desktop_notify_command=\n    desktop_notify_inactive=0\n    downloadable_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_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    online_status_share=1\n    online_status_dynamic=1\n    phone_number_indicator=\n    proxy_indicator=🔒\n    read_indicator=✓\n    reactions_enabled=1\n    spell_check_command=\n    status_broadcast=1\n    syncing_indicator=⇄\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    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### 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_deletion\n\nSpecifies whether to prompt the user for confirmation when deleting a message\nor a chat.\n\n### desktop_notify_active\n\nSpecifies whether new message shall trigger desktop notification when nchat\nterminal 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_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### 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_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### 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### 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### syncing_indicator\n\nSpecifies text to suffix attachment filenames in message view for downloads\nin progress.\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### 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    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_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    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    send_msg=KEY_CTRLX\n    spell=\\33\\44\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_CTRLP\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    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------\nExample color config files are provided in `$(dirname $(which nchat))/../share/nchat/themes`\nand can be used by copying to `~/.config/nchat/`.\n\n### Default Theme\n\n    cp $(dirname $(which nchat))/../share/nchat/themes/default/* ~/.config/nchat/\n\n![screenshot nchat](/doc/screenshot-nchat.png)\n\n### Basic Color Theme\n\n    cp $(dirname $(which nchat))/../share/nchat/themes/basic-color/* ~/.config/nchat/\n\n![screenshot nchat](/doc/screenshot-nchat-basic-color.png)\n\n### Dracula Theme\n\n    cp $(dirname $(which nchat))/../share/nchat/themes/dracula/* ~/.config/nchat/\n\n![screenshot nchat](/doc/screenshot-nchat-dracula.png)\n\n### iTerm2-Color-Schemes Themes\n\n[iTerm2 Color Schemes](https://github.com/mbadolato/iTerm2-Color-Schemes) can\nbe used to generate themes for nchat. The following themes generated using\niTerm2 Color Schemes are available in `$(dirname $(which nchat))/../share/nchat/themes`:\n\n- Catppuccin Mocha:\n  `cp $(dirname $(which nchat))/../share/nchat/themes/catppuccin-mocha/* ~/.config/nchat/`\n- Espresso:\n  `cp $(dirname $(which nchat))/../share/nchat/themes/espresso/* ~/.config/nchat/`\n- Gruvbox Dark:\n  `cp $(dirname $(which nchat))/../share/nchat/themes/gruvbox-dark/* ~/.config/nchat/`\n- Solarized Dark Higher Contrast:\n  `cp $(dirname $(which nchat))/../share/nchat/themes/solarized-dark-higher-contrast/* ~/.config/nchat/`\n- Tokyo Night:\n  `cp $(dirname $(which nchat))/../share/nchat/themes/tokyo-night/* ~/.config/nchat/`\n- Tomorrow Night:\n  `cp $(dirname $(which nchat))/../share/nchat/themes/tomorrow-night/* ~/.config/nchat/`\n- Zenbones Dark:\n  `cp $(dirname $(which nchat))/../share/nchat/themes/zenbones-dark/* ~/.config/nchat/`\n- Zenburned:\n  `cp $(dirname $(which nchat))/../share/nchat/themes/zenburned/* ~/.config/nchat/`\n\nTo generate additional nchat themes and install for use with `nchat`, refer to\n[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\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\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 - [MIT License](/ext/apathy/LICENSE)\n\n- [cereal](https://github.com/USCiLab/cereal) -\n  Copyright 2013 Randolph Voorhies, Shane Grant - [BSD-3 License](/ext/cereal/LICENSE)\n\n- [clip](https://github.com/dacap/clip) -\n  Copyright 2015 David Capello - [MIT License](/ext/clip/LICENSE.txt)\n\n- [sqlite_modern_cpp](https://github.com/SqliteModernCpp/sqlite_modern_cpp) -\n  Copyright 2017 aminroosta - [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) and\n[whatsmeow](https://github.com/tulir/whatsmeow) libraries 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\nCode Formatting\n---------------\nUncrustify is used to maintain consistent source code formatting, example:\n\n    ./make.sh src\n\n\nProject Scope\n=============\n\nLimitations\n-----------\nThere are no plans to support the following features:\n- Facebook Messenger\n- Signal\n- Telegram secret chats\n- Voice / video calls\n\nAdditionally, WhatsApp is only supported on macOS and glibc-based Linux\nsystems. 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 clients, but rather a light-weight client providing\nessential functionality suitable for the terminal. However, feel free to\nsubmit 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), and if it's useful and low effort it can probably be added.\n\n\nLicense\n=======\nnchat is distributed under the MIT license. See LICENSE file.\n\n\nContributions\n=============\nPlease refer to [Contributing Guidelines](/doc/CONTRIBUTING.md) and\n[Design Notes](/doc/DESIGN.md).\n\n\nKeywords\n========\ncommand line, console-based, linux, macos, chat client, ncurses, telegram,\nterminal-based.\n","funding_links":[],"categories":["C++","Table of Contents","\u003ca name=\"chat\"\u003e\u003c/a\u003eChat and instant messaging"],"sub_categories":[],"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"}