{"id":17967300,"url":"https://github.com/android-sms-gateway/cli","last_synced_at":"2025-08-16T15:31:58.907Z","repository":{"id":259880375,"uuid":"878195870","full_name":"android-sms-gateway/cli","owner":"android-sms-gateway","description":"A command-line interface for working with SMS Gateway for Android.","archived":false,"fork":false,"pushed_at":"2024-12-06T23:25:39.000Z","size":37,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2024-12-07T00:29:23.179Z","etag":null,"topics":["android-sms","cli-tool","command-line-interface","golang","messaging","mobile-communications","sms-api","sms-gateway","text-messaging"],"latest_commit_sha":null,"homepage":"https://sms-gate.app/integration/cli/","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/android-sms-gateway.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}},"created_at":"2024-10-25T00:02:05.000Z","updated_at":"2024-12-06T23:25:40.000Z","dependencies_parsed_at":"2024-11-23T09:15:35.152Z","dependency_job_id":null,"html_url":"https://github.com/android-sms-gateway/cli","commit_stats":{"total_commits":19,"total_committers":2,"mean_commits":9.5,"dds":"0.10526315789473684","last_synced_commit":"b8577c660563fe23dafa6c51bf5634767ee71e29"},"previous_names":["android-sms-gateway/cli"],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/android-sms-gateway%2Fcli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/android-sms-gateway%2Fcli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/android-sms-gateway%2Fcli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/android-sms-gateway%2Fcli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/android-sms-gateway","download_url":"https://codeload.github.com/android-sms-gateway/cli/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230043147,"owners_count":18163966,"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":["android-sms","cli-tool","command-line-interface","golang","messaging","mobile-communications","sms-api","sms-gateway","text-messaging"],"created_at":"2024-10-29T14:05:27.538Z","updated_at":"2025-08-16T15:31:58.896Z","avatar_url":"https://github.com/android-sms-gateway.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003c!-- Improved compatibility of back to top link: See: https://github.com/othneildrew/Best-README-Template/pull/73 --\u003e\n\u003ca id=\"readme-top\"\u003e\u003c/a\u003e\n\u003c!-- PROJECT SHIELDS --\u003e\n[![Contributors][contributors-shield]][contributors-url]\n[![Forks][forks-shield]][forks-url]\n[![Stargazers][stars-shield]][stars-url]\n[![Issues][issues-shield]][issues-url]\n[![Apache-2.0 License][license-shield]][license-url]\n\n\u003cbr /\u003e\n\n\u003cdiv align=\"center\"\u003e\n  \u003ch3 align=\"center\"\u003eSMS Gateway for Android™ CLI\u003c/h3\u003e\n\n  \u003cp align=\"center\"\u003e\n    A command-line interface for interacting with the SMS Gateway for Android API\n    \u003cbr /\u003e\n    \u003ca href=\"https://docs.sms-gate.app/integration/cli/\"\u003e\u003cstrong\u003eExplore the docs »\u003c/strong\u003e\u003c/a\u003e\n    \u003cbr /\u003e\n    \u003cbr /\u003e\n    \u003ca href=\"https://github.com/android-sms-gateway/cli/issues/new?labels=bug\"\u003eReport Bug\u003c/a\u003e\n    ·\n    \u003ca href=\"https://github.com/android-sms-gateway/cli/issues/new?labels=enhancement\"\u003eRequest Feature\u003c/a\u003e\n  \u003c/p\u003e\n\u003c/div\u003e\n\n\u003c!-- TABLE OF CONTENTS --\u003e\n- [📱 About The Project](#-about-the-project)\n  - [⚙️ Built With](#️-built-with)\n- [💻 Getting Started](#-getting-started)\n  - [Prerequisites](#prerequisites)\n  - [Installation](#installation)\n    - [Option 1: Download from GitHub Releases](#option-1-download-from-github-releases)\n    - [Option 2: Install using Go](#option-2-install-using-go)\n    - [Option 3: Docker](#option-3-docker)\n- [💻 Configuration](#-configuration)\n  - [Available Options](#available-options)\n  - [Output Formats](#output-formats)\n- [💻 Usage](#-usage)\n  - [Commands](#commands)\n  - [Exit codes](#exit-codes)\n  - [Examples](#examples)\n    - [Output formats](#output-formats-1)\n- [👥 Contributing](#-contributing)\n- [©️ License](#️-license)\n- [⚠️ Legal Notice](#️-legal-notice)\n\n\n\u003c!-- ABOUT THE PROJECT --\u003e\n## 📱 About The Project\n\nThere are two CLI tools in this repository: `smsgate` and `smsgate-ca`. The first one is for SMS Gateway for Android itself, and the second one is for the Certificate Authority.\n\nThis CLI provides a robust interface for:\n- Sending and managing SMS messages\n- Configuring webhook integrations\n- Issuing certificates for private deployments\n\n### ⚙️ Built With\n\n- [![Go][Go-shield]][Go-url]\n- [![Goreleaser][Goreleaser-shield]][Goreleaser-url]\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#readme-top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n\u003c!-- GETTING STARTED --\u003e\n## 💻 Getting Started\n\n### Prerequisites\n\n- Go 1.23+ (for building from source)\n- Docker (optional, for containerized execution)\n\n### Installation\n\n#### Option 1: Download from GitHub Releases\n\n1. Go to the [Releases page](https://github.com/android-sms-gateway/cli/releases/latest) of this repository.\n2. Download the appropriate binary for your operating system and architecture.\n3. Extract the archive to a directory of your choice.\n4. Move the binary to a directory in your system's PATH.\n\n#### Option 2: Install using Go\n\n```bash\ngo install github.com/android-sms-gateway/cli/cmd/smsgate@latest\n```\n\nThis will download, compile, and install the latest version of the CLI tool. Make sure your Go bin directory is in your system's PATH.\n\n#### Option 3: Docker\n\n```bash\ndocker run -it --rm --env-file .env ghcr.io/android-sms-gateway/cli \\\n  send --phone '+12025550123' 'Hello, Dr. Turk!'\n```\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#readme-top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n## 💻 Configuration\n\nThe CLI can be configured using environment variables or command-line flags. You can also use a `.env` file in the working directory to set these variables.\n\n### Available Options\n\n| Option             | Env Var        | Description      | Default value                          |\n| ------------------ | -------------- | ---------------- | -------------------------------------- |\n| `--endpoint`, `-e` | `ASG_ENDPOINT` | The endpoint URL | `https://api.sms-gate.app/3rdparty/v1` |\n| `--username`, `-u` | `ASG_USERNAME` | Your username    | **required**                           |\n| `--password`, `-p` | `ASG_PASSWORD` | Your password    | **required**                           |\n| `--format`, `-f`   | n/a            | Output format    | `text`                                 |\n\n### Output Formats\n\nThe CLI supports three output formats:\n\n1. `text`: Human-readable text output (default)\n2. `json`: Pretty printed JSON-formatted output\n3. `raw`: One-line JSON-formatted output\n\nPlease note that when the exit code is not `0`, the error description is printed to stderr without any formatting.\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#readme-top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n## 💻 Usage\n\n```bash\nsmsgate [global options] command [command options] [arguments...]\n```\n\n### Commands\n\nThe CLI offers two main groups of commands:\n\n- **Messages**: Commands for sending messages and checking their status.\n- **Webhooks**: Commands for managing webhooks, including creating, updating, and deleting them.\n\nFor a complete list of available commands, you can:\n- Run `smsgate help` or `smsgate --help` in your terminal.\n- Visit the official documentation at [docs.sms-gate.app](https://docs.sms-gate.app/integration/cli/#commands).\n\n### Exit codes\n\nThe CLI uses exit codes to indicate the outcome of operations:\n\n- `0`: success\n- `1`: invalid options or arguments\n- `2`: server request error\n- `3`: output formatting error\n\n### Examples\n\nFor security reasons, it is recommended to pass credentials using environment variables or a `.env` file.\n\n```bash\n# Send a message\nsmsgate send --phones '+12025550123' 'Hello, Dr. Turk!'\n\n# Send a message to multiple numbers\nsmsgate send --phones '+12025550123' --phones '+12025550124' 'Hello, doctors!'\n# or\nsmsgate send --phones '+12025550123,+12025550124' 'Hello, doctors!'\n\n# Get the status of a sent message\nsmsgate status zXDYfTmTVf3iMd16zzdBj\n```\n\nCredentials can also be passed via CLI options:\n\n```bash\nsmsgate send -u \u003cusername\u003e -p \u003cpassword\u003e --phones '+12025550123' 'Hello, Dr. Turk!'\n```\n\n#### Output formats\n\n**Text**\n\n```text\nID: zXDYfTmTVf3iMd16zzdBj\nState: Pending\nIsHashed: false\nIsEncrypted: false\nRecipients:\n        +12025550123    Pending\n        +12025550124    Pending\n```\n\n**JSON**\n\n```json\n{\n  \"id\": \"zXDYfTmTVf3iMd16zzdBj\",\n  \"state\": \"Pending\",\n  \"isHashed\": false,\n  \"isEncrypted\": false,\n  \"recipients\": [\n    {\n      \"phoneNumber\": \"+12025550123\",\n      \"state\": \"Pending\"\n    },\n    {\n      \"phoneNumber\": \"+12025550124\",\n      \"state\": \"Pending\"\n    }\n  ],\n  \"states\": {}\n}\n```\n\n**Raw**\n\n```json\n{\"id\":\"zXDYfTmTVf3iMd16zzdBj\",\"state\":\"Pending\",\"isHashed\":false,\"isEncrypted\":false,\"recipients\":[{\"phoneNumber\":\"+12025550123\",\"state\":\"Pending\"},{\"phoneNumber\":\"+12025550124\",\"state\":\"Pending\"}],\"states\":{}}\n```\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#readme-top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n## 👥 Contributing\n\nContributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are **greatly appreciated**.\n\nIf you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag \"enhancement\".\nDon't forget to give the project a star! Thanks again!\n\n1. Fork the Project\n2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`)\n3. Commit your Changes (`git commit -m 'Add some AmazingFeature'`)\n4. Push to the Branch (`git push origin feature/AmazingFeature`)\n5. Open a Pull Request\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#readme-top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n## ©️ License\n\nDistributed under the Apache-2.0 license. See [LICENSE](LICENSE) for more information.\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#readme-top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n## ⚠️ Legal Notice\n\nAndroid is a trademark of Google LLC.\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#readme-top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n\u003c!-- MARKDOWN LINKS \u0026 IMAGES --\u003e\n\u003c!-- https://www.markdownguide.org/basic-syntax/#reference-style-links --\u003e\n[contributors-shield]: https://img.shields.io/github/contributors/android-sms-gateway/cli?style=for-the-badge\n[contributors-url]: https://github.com/android-sms-gateway/cli/graphs/contributors\n[forks-shield]: https://img.shields.io/github/forks/android-sms-gateway/cli?style=for-the-badge\n[forks-url]: https://github.com/android-sms-gateway/cli/network/members\n[stars-shield]: https://img.shields.io/github/stars/android-sms-gateway/cli?style=for-the-badge\n[stars-url]: https://github.com/android-sms-gateway/cli/stargazers\n[issues-shield]: https://img.shields.io/github/issues/android-sms-gateway/cli?style=for-the-badge\n[issues-url]: https://github.com/android-sms-gateway/cli/issues\n[license-shield]: https://img.shields.io/github/license/android-sms-gateway/cli?style=for-the-badge\n[license-url]: https://github.com/android-sms-gateway/cli/blob/main/LICENSE\n[Go-shield]: https://img.shields.io/badge/Go-00ADD8?style=for-the-badge\u0026logo=go\u0026logoColor=white\n[Go-url]: https://go.dev\n[Goreleaser-shield]: https://img.shields.io/badge/Goreleaser-FF007A?style=for-the-badge\u0026logo=goreleaser\u0026logoColor=white\n[Goreleaser-url]: https://goreleaser.com\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandroid-sms-gateway%2Fcli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandroid-sms-gateway%2Fcli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandroid-sms-gateway%2Fcli/lists"}