{"id":15634542,"url":"https://github.com/robvanderleek/mudslide","last_synced_at":"2025-04-04T10:03:56.030Z","repository":{"id":65561876,"uuid":"573604444","full_name":"robvanderleek/mudslide","owner":"robvanderleek","description":"Send WhatsApp messages from the command-line 📯","archived":false,"fork":false,"pushed_at":"2025-03-27T03:04:05.000Z","size":1219,"stargazers_count":196,"open_issues_count":9,"forks_count":19,"subscribers_count":9,"default_branch":"main","last_synced_at":"2025-03-28T09:02:16.209Z","etag":null,"topics":["command-line","nodejs","typescript","whatsapp"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/robvanderleek.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},"funding":{"github":"robvanderleek"}},"created_at":"2022-12-02T21:52:33.000Z","updated_at":"2025-03-23T13:53:50.000Z","dependencies_parsed_at":"2024-01-09T11:03:16.506Z","dependency_job_id":"539c96d3-462d-4db6-85fc-589a172ee1e2","html_url":"https://github.com/robvanderleek/mudslide","commit_stats":{"total_commits":190,"total_committers":6,"mean_commits":"31.666666666666668","dds":0.5105263157894737,"last_synced_commit":"0578b72a585bfe2476a44895e6d41e6c97ee9a00"},"previous_names":[],"tags_count":103,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robvanderleek%2Fmudslide","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robvanderleek%2Fmudslide/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robvanderleek%2Fmudslide/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robvanderleek%2Fmudslide/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/robvanderleek","download_url":"https://codeload.github.com/robvanderleek/mudslide/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247149489,"owners_count":20891954,"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":["command-line","nodejs","typescript","whatsapp"],"created_at":"2024-10-03T10:53:56.476Z","updated_at":"2025-04-04T10:03:55.999Z","avatar_url":"https://github.com/robvanderleek.png","language":"TypeScript","funding_links":["https://github.com/sponsors/robvanderleek"],"categories":[],"sub_categories":[],"readme":"# Mudslide\n\n\u003e [!IMPORTANT] \n\u003e The maintainers of this software cannot be held liable for misuse of this\n\u003e application, as stated in the [ISC\n\u003e license](https://github.com/robvanderleek/mudslide/blob/main/LICENSE). The\n\u003e maintainers of Mudslide do not in any way condone the use of this application\n\u003e in practices that violate the Terms of Service of WhatsApp. The maintainers\n\u003e of this application call upon the personal responsibility of its users to use\n\u003e this application in a fair way, as it is intended to be used.\n\n\u003e [!WARNING] \n\u003e DO NOT USE THIS TOOL FOR IMPORTANT THINGS. This tool can stop working without\n\u003e notice since it depends on libraries that could be removed any time from\n\u003e GitHub/NPM. \n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://github.com/robvanderleek/mudslide/blob/main/assets/mudslide-logo-180x180.png?raw=true\"/\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cem\u003eSend WhatsApp messages from the command-line 📯\u003c/em\u003e\n\u003c/p\u003e\n\n\u003cdiv align=\"center\"\u003e\n\n[![main](https://github.com/robvanderleek/mudslide/actions/workflows/main.yml/badge.svg)](https://github.com/robvanderleek/mudslide/actions/workflows/main.yml)\n[![CodeLimit](https://github.com/robvanderleek/mudslide/blob/_codelimit_reports/main/badge.svg)](https://github.com/robvanderleek/mudslide/blob/_codelimit_reports/main/codelimit.md)\n[![npm version](https://badge.fury.io/js/mudslide.svg)](https://badge.fury.io/js/mudslide)\n[![DockerHub image pulls](https://img.shields.io/docker/pulls/robvanderleek/mudslide)](https://hub.docker.com/repository/docker/robvanderleek/mudslide)\n[![Dependabot](https://badgen.net/badge/Dependabot/enabled/green?icon=dependabot)](https://dependabot.com/)\n\n\u003c/div\u003e\n\nFor an introduction please read this [Medium\npost](https://levelup.gitconnected.com/how-to-send-whatsapp-messages-from-the-command-line-d1afd8b55de5).\n\nThis project is based on [Baileys](https://github.com/WhiskeySockets/Baileys),\na full-featured WhatsApp Web+Multi-Device API library (in case you're wondering\nabout the name, a Mudslide is a Baileys cocktail).\n\nKeep in mind that the working of Mudslide depends on the Baileys library and\nsince that is not an official supported library by WhatsApp it could stop\nworking without notice.\n\n* [Installation](#installation)\n* [Usage](#usage)\n* [Configuration](#configuration)\n* [Troubleshooting](#troubleshooting)\n* [FAQ](#faq)\n* [Development](#development)\n* [Feedback, suggestions and bug reports](#feedback-suggestions-and-bug-reports)\n* [Contributing](#contributing)\n* [License](#license)\n\n# Installation\n\nUsing `npx`, installation is not necessary. You can run Mudslide on a system\nwith NodeJS 16 or higher from the command-line as follows:\n\n```shell\nnpx mudslide@latest -V\n```\n\nthis should display the version number of the latest release.\n\nUsing `npm` Mudslide can be installed globally as follows:\n\n```shell\nnpm install -g mudslide\n```\n\n## Platform binaries\n\nBinaries for different platforms (Linux, Windows) are available on the [latest\nrelease page](https://github.com/robvanderleek/mudslide/releases/latest).\n\n## Docker\n\nMudslide can also run inside a Docker container:\n\n```shell\ndocker run robvanderleek/mudslide\n```\n\nSince Mudslide keeps authentication state on disk you need to mount a state\ndirectory outside the container, for example:\n\n```shell\ndocker run -v $HOME/.local/share/mudslide:/usr/src/app/cache -it robvanderleek/mudslide login\n```\n\nor:\n\n```shell\ndocker run -v $HOME/.local/share/mudslide:/usr/src/app/cache robvanderleek/mudslide me\n```\n\n### Build image \n\nYou can build the Docker image using the supplied `Dockerfile`:\n\n```shell\ndocker build -t mudslide .\n```\n\nTest if the build was successful:\n\n```shell\ndocker run -it mudslide\n```\n\n## Docker Compose\n\nIf you chose to use `docker-compose` instead of `docker` you can build the\nDocker image using the supplied `assets/docker-compose.yml` file (which in turn\ndepends on the supplied `Dockerfile`): \n\n```shell\ncd assets/\ndocker-compose build\n```\n\nTest if the build was successful:\n\n```shell\ndocker-compose run mudslide\n```\n\nSince Mudslide keeps authentication state on disk you need to mount a state\ndirectory outside the container, for example in `~/.local/share/mudslide`:\n\nSee respective lines in `docker-compose.yml`\n```yaml\n    volumes:\n        - ~/.local/share/mudslide:/usr/src/app/cache\n```\n\n# Usage\n\nAvailable commands and options can be listed with `--help` flag:\n\n```shell\nnpx mudslide@latest --help\n```\n\nfor most command it's necessary that you've authorized Mudslide to interact\nwith the WhatsApp API on your behalf. This can be done by logging in as\ndescribed below.\n\n## Login\n\nTo login you need to authorize Mudslide from another device that has WhatsApp\ninstalled and scan the QR code printed in the terminal:\n\n```shell\nnpx mudslide@latest login\n█▀▀▀▀▀█ ▀▀   ▀  █ █▀▀▀▀▀█\n█ ███ █ █▄ █▀▀▀▀  █ ███ █\n█ ▀▀▀ █ ▀█▀▀▄▀█▀▀ █ ▀▀▀ █\n▀▀▀▀▀▀▀ ▀▄▀▄▀▄█▄▀ ▀▀▀▀▀▀▀\n▀███▄ ▀▄▀▄   ▀▀ █▀ ▄▀▀▀▄▀\n█▄▄▄▄ ▀ ▄  ▄▄▄█▄ ▄█▀ ▄▄\n▀▄ ▄▀ ▀ ▄█▄█ ▄ ▄ ██▄█ ▀▀█\n▄▀▄██▀▀██▄▀ █▄▀▄▄█▀▄█ ▀▀▄\n    ▀▀▀ ███▀▄▄  █▀▀▀█▀█▀█\n█▀▀▀▀▀█   ▀▀█  ▄█ ▀ █ ▀██\n█ ███ █ ▄▄█▀██▄▄▀██▀██▄▄▄\n█ ▀▀▀ █ █▀▀▀▀▀ ▀▀█▀ █ █▀\n▀▀▀▀▀▀▀ ▀▀▀ ▀ ▀  ▀ ▀▀▀▀▀▀\n```\n\nIn the WhatsApp mobile app go to \"Settings \u003e Connected Devices \u003e Connect\nDevice\" and scan the QR code. Wait until the status is \"active\", then you can\nexit Mudslide.\n\n## Logout\n\nLogging out removes credentials from your local environment but will not\ndisconnect Mudslide from your WhatsApp account, you can disconnect Mudslide\nusing the WhatsApp app.\n\n```shell\nnpx mudslide@latest logout\n```\n\n## Different types of recipients\n\nMuslide supports three types of recipients for sending messages/images/files/etc.:\n\n1. An international phone number (e.g.: `3161234567890`)\n2. The authenticated user: `me`\n3. A so-called WhatsApp ID, for example a group ID: `123456789-987654321@g.us`\n\n## Sending a message to yourself or a phone number\n\nUsing the recipient `me` you can send yourself a test message:\n\n```shell\nnpx mudslide@latest send me 'hello world'\n```\n\nTo send a message to a phone number:\n\n```shell\nnpx mudslide@latest send 3161234567890 'hello world'\n```\n\nTo send a message to a group you are particpating in you need the group ID (see\nthe `mudslide groups` command). Send a message to a group as follows:\n\n```shell\nnpx mudslide@latest send 123456789-987654321@g.us 'hello world'\n```\n\nUse `\\n` to send a message with a newline, for example:\n\n```shell\nnpx mudslide@latest send me 'hello\\nworld'\n```\n\n## Sending an image file\n\nImage files (PNG, JPG, GIF) can be sent to individuals or groups:\n\n```shell\nnpx mudslide@latest send-image me image.png\n```\n\n```shell\nnpx mudslide@latest send-image 123456789-987654321@g.us image.jpg\n```\n\n\u003e **Note**\n\u003e In case there is a space in the path or the file name, enclose the entire\n\u003e path and file name in quotes (\")\n\n### Image captions\n\nUse the `--caption` option to add a caption to the image:\n\n```shell\nnpx mudslide@latest send-image --caption 'Your text here' me image.png\n```\n\n## Sending other files\n\nSingle files can be sent to individuals or groups:\n\n```shell\nnpx mudslide@latest send-file me test.json\n```\n\n```shell\nnpx mudslide@latest send-file 123456789-987654321@g.us document.pdf\n```\n\n\u003e **Note**\n\u003e In case there is a space in the path or the file name, enclose the entire\n\u003e path and file name in quotes (\")\n\n### File types\n\nBy default, files will be sent as \"documents\" and show as a download link in the chat.\nThe `--type` option can be used for audio and video files that show as a playable message in the chat:\n\n```shell\nnpx mudslide@latest send-file --type audio 123456789-987654321@g.us music.mp3\n```\n\n## Sending a location\n\nGeographic locations can be sent to individuals or groups using latitude and\nlongitude coordinates. For example, to position yourself at the Eiffel Tower:\n\n```shell\nnpx mudslide@latest send-location me 48.858222 2.2945\n```\n\nOr to send your location at the Sydney Opera House to a group:\n\n```shell\nnpx mudslide@latest send-location 123456789-987654321@g.us -33.857058 151.214897\n```\n\n## Sending a poll\n\nPolls can be sent to individuals or groups, and allow participants to select 1\nor more items.\n\nFor example, to send a poll for the summer holiday destination, allowing\nparticipants to select 2 items, use:\n\n```shell\nnpx mudslide@latest send-poll 123456789-987654321@g.us 'Summer holiday destination' --item 'France' --item 'Spain' --item 'Italy' --item 'Switzerland' --selectable 2\n```\n\nOr to send a quick poll to check who's going training on Friday:\n\n```shell\nnpx mudslide@latest send-poll 123456789-987654321@g.us 'Training on Friday' --item 'Yeeeess!' --item 'Nope' --item 'Maybe...'\n```\n\n## List your groups\n\nTo list all the groups you are participating in:\n\n```shell\nnpx mudslide@latest groups\n```\n\nthis will show a list of group IDs and subjects.\n\n## Add/remove group participants\n\nParticipants can be added/removed from existing groups as follows:\n\n```shell\nnpx mudslide@latest add-to-group 123456789-987654321@g.us 3161234567890\n```\n\n```shell\nnpx mudslide@latest remove-from-group 123456789-987654321@g.us 3161234567890\n```\n\n## List group participants\n\nGroup participants can be listed as follows:\n\n```shell\nnpx mudslide@latest list-group 123456789-987654321@g.us \n```\n\n## Show current user details\n\nTo get the WhatsApp ID of the logged in user:\n\n```shell\nnpx mudslide@latest me\n```\n\n# Configuration\n\nBy default WhatsApp credentials are cached in a folder located in the user's\nhome directory. This folder is `.local/share/mudslide'` on Linux \u0026 macOS and\n`AppData\\Local\\mudslide\\Data` on Windows.\n\nA different location for the cache folder can be configured via the environment\nvariable `MUDSLIDE_CACHE_FOLDER` or the `-c`/`--cache` options.\n\n## Running behind a proxy server\n\nWhen the global option `--proxy` is used, Mudslide will use the environment variables `HTTP_PROXY` and `HTTPS_PROXY` to\nproxy all requests. For example:\n\n```shell\nexport HTTP_PROXY=http://USER:PASS@proxy.server.com:80\nexport HTTPS_PROXY=http://USER:PASS@proxy.server.com:80\nnpx mudslide@latest --proxy login\n```\n\n# Troubleshooting\n\nIn case Mudslide does not give any output or does not behave as expected, try\nremoving the local cache folder (see [Configuration section](#configuration)),\nthen disconnect the client using your mobile WhatsApp app, and login again.\n\nTo see what goes on in more detail, the verbosity of Mudslide can be incrased\nwith the global option `-v`. Use `-vvv` for the greatest level of detail:\n\n```shell\nnpx mudslide@latest -vvv me\n```\n\n# FAQ\n\n## How can I read messages?\n\nMudslide is for sending messages *only*. If you want to read messages (e.g.\nwhen building a chat bot), have a look at the [Baileys\nlibrary](https://github.com/WhiskeySockets/Baileys). \n\n# Development\n\n## Setting up your environment\n\n1. Clone the repository:\n\n    ```shell\n    git clone git@github.com:robvanderleek/mudslide.git\n    ```\n\n    ```shell\n    cd mudslide\n    ```\n\n2. Install dependencies:\n\n    ```shell\n    yarn install\n    ```\n\n3. Run Mudslide:\n\n    ```shell\n    yarn start\n    ```\n\n## Running unit-tests\n\nTo run the unit-tests:\n\n```shell\nyarn test\n```\n\n# Feedback, suggestions and bug reports\n\nPlease create an issue here: https://github.com/robvanderleek/mudslide/issues\n\nIf you like this software, please star :star: it.\n\n## Star history\n\n[![Star History Chart](https://api.star-history.com/svg?repos=robvanderleek/mudslide\u0026type=Date)](https://star-history.com/#robvanderleek/mudslide\u0026Date)\n\n# Contributing\n\nIf you have suggestions for how Mudslide could be improved, or want to report a\nbug, [open an issue](https://github.com/robvanderleek/mudslide/issues)! All and\nany contributions are appreciated.\n\n# License\n\n[ISC](LICENSE) © 2022 Rob van der Leek \u003crobvanderleek@gmail.com\u003e\n(https://twitter.com/robvanderleek)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobvanderleek%2Fmudslide","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frobvanderleek%2Fmudslide","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobvanderleek%2Fmudslide/lists"}