Skip to content

[integration] update CLI docs for new options #128

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 12, 2025

Conversation

capcom6
Copy link
Member

@capcom6 capcom6 commented Aug 8, 2025

Summary by CodeRabbit

  • Documentation
    • Reorganized and expanded CLI docs for clarity and completeness.
    • Added platform-specific install instructions (Linux x86_64, macOS Apple Silicon, Windows), Go install notes, Docker usage, and Releases guidance.
    • Introduced an Environment Variables section with a .env example and a full command-line options table with renamed/added flags.
    • Split and clarified Message vs Webhook commands, enhanced usage examples, output format semantics, exit code mappings, and added a See Also section.

Copy link

cloudflare-workers-and-pages bot commented Aug 8, 2025

Deploying docs with  Cloudflare Pages  Cloudflare Pages

Latest commit: 969813f
Status: ✅  Deploy successful!
Preview URL: https://eee3360f.docs-7wm.pages.dev
Branch Preview URL: https://integration-add-new-cli-opti.docs-7wm.pages.dev

View logs

@coderabbitai coderabbitai bot changed the title @coderabbitai Revise and expand SMS Gateway CLI documentation with improved instructions Aug 8, 2025
Copy link

coderabbitai bot commented Aug 8, 2025

Walkthrough

Rewrote and expanded the CLI documentation (docs/integration/cli.md): added platform-specific installs, Go and Docker install options, reorganized configuration and command sections (messages vs webhooks), added a Command-line Options table, extended examples, and documented exit codes. No code changes.

Changes

Cohort / File(s) Change Summary
CLI documentation (single file)
docs/integration/cli.md
Reorganized and expanded CLI docs: added platform-specific installation (Linux x86_64, macOS Apple Silicon, Windows), Go and Docker install instructions, relocated Developers note and GitHub Releases pointer; added Environment Variables and .env example; replaced options overview with a Command-line Options table (renamed/added flags such as --device-id, --phones, --sim-number, --delivery-report, --data, --data-port, --skip-phone-validation, --device-active-within); clarified output formats and defaults; split Commands into Message Commands and Webhook Commands with new/renamed options and notes on endpoint accessibility, security, auditing, and deletion irreversibility; expanded usage examples (device-specific sends, data messages, message/webhook management, alternative credential passing, Docker usage); documented explicit exit-code mappings and a nonzero-error warning; added See Also links. Documentation-only change.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch integration/add-new-cli-options

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (3)
docs/integration/cli.md (3)

62-68: Missing env-var for --format option
The table introduces the --format flag but leaves the “Env Var” column blank. If an environment variable (e.g., ASG_FORMAT) exists, add it for completeness; otherwise explicitly state “–”.


109-113: --data-port default collides with registered IANA service
Port 53739 is assigned to the wboxnet service. Consider switching to an unassigned/high (> 49152) port in examples to avoid confusion.


50-56: markdownlint MD046 warnings for fenced blocks
markdownlint-cli2 flags these fenced blocks inside lists/admonitions. If the fenced style with titles is intentional, suppress MD046 for docs/integration/** in your .markdownlint.json; otherwise convert to indented blocks.

Also applies to: 208-212, 215-224, 240-243

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 538b584 and 39a75c8.

📒 Files selected for processing (1)
  • docs/integration/cli.md (11 hunks)
🧰 Additional context used
🪛 markdownlint-cli2 (0.17.2)
docs/integration/cli.md

52-52: Code block style
Expected: indented; Actual: fenced

(MD046, code-block-style)


208-208: Code block style
Expected: indented; Actual: fenced

(MD046, code-block-style)


215-215: Code block style
Expected: indented; Actual: fenced

(MD046, code-block-style)


240-240: Code block style
Expected: indented; Actual: fenced

(MD046, code-block-style)

🔇 Additional comments (1)
docs/integration/cli.md (1)

100-107: Verify default for --deliveryReport
The table shows --deliveryReport defaulting to true. Most gateways disable delivery reports by default due to extra carrier load. Double-check that the CLI really enables it by default and update the doc if not.

@capcom6 capcom6 force-pushed the integration/add-new-cli-options branch from 39a75c8 to 9972825 Compare August 8, 2025 23:33
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🔭 Outside diff range comments (2)
docs/integration/cli.md (2)

62-68: Resolve short-flag collision: -p used for both password and phone

Global options define -p as password, while send options also advertise -p for phone(s). This is confusing and may break depending on where flags are placed.

  • Prefer reserving -p for password only.
  • For phone(s), use a different short flag (e.g., -n for number, -t for to), or drop the short alias.

Suggested table change for send options:

-| `--phone`, `--phones`, `-p` | Specifies the recipient's phone number(s). This option can be used multiple times or accepts comma-separated values. Numbers must be in E.164 format. | **required**  | `+19162255887`          |
+| `--phone`, `--phones`       | Specifies the recipient's phone number(s). This option can be used multiple times or accepts comma-separated values. Numbers must be in E.164 format. | **required**  | `+12025550123`          |

Also update examples to avoid suggesting -p for phones.

Also applies to: 99-104


184-205: Replace sample phone numbers with reserved examples to avoid PII

Use reserved “202-555” examples in E.164 to ensure no real users are implicated.

-smsgate send --phone '+19162255887' 'Hello, Dr. Turk!'
-smsgate send --phone '+19162255887' --phone '+19162255888' 'Hello, doctors!'
-smsgate send --phones '+19162255887,+19162255888' 'Hello, doctors!'
-smsgate send --deviceId 'DwWLuSmLbXvwzF8mbmTE8' --phones '+19162255887' 'Hello from specific device!'
-smsgate send --data --data-port 12345 --phones '+19162255887' 'aGVsbG8gd29ybGQ='
+smsgate send --phone '+12025550123' 'Hello, Dr. Turk!'
+smsgate send --phone '+12025550123' --phone '+12025550124' 'Hello, doctors!'
+smsgate send --phones '+12025550123,+12025550124' 'Hello, doctors!'
+smsgate send --deviceId 'DwWLuSmLbXvwzF8mbmTE8' --phones '+12025550123' 'Hello from specific device!'
+smsgate send --data --data-port 12345 --phones '+12025550123' 'aGVsbG8gd29ybGQ='
🧹 Nitpick comments (6)
docs/integration/cli.md (6)

99-113: Verify and standardize flag naming style

Flags mix camelCase (--deviceId, --skipPhoneValidation, --deviceActiveWithin) and kebab-case (--data-port). Confirm actual CLI names and standardize in docs for consistency.

  • If possible, prefer kebab-case for all long flags: --device-id, --skip-phone-validation, --device-active-within, --data-port, etc.
  • If the CLI already supports both, document one canonical style.

Would you like me to scan the CLI repo and generate a mapping table to reconcile documented vs implemented flags?


52-56: Address markdownlint MD046 (code-block-style) warnings

Static analysis flagged fenced blocks where “indented” is expected. Either switch to indented code blocks in those contexts or disable MD046 locally around the fenced blocks.

Option A: Disable MD046 locally around specific blocks:

<!-- markdownlint-disable MD046 -->
```bash
# your block

Option B: Convert to indented code blocks (4 spaces) where compatible. Verify site rendering after changes.

Please confirm your markdownlint config preference; I can patch the doc accordingly.


Also applies to: 208-212, 215-224, 240-243

---

`69-76`: **Clarify “raw” vs “json” output format wording**

“raw - unformatted JSON” can be read as “not JSON.” Suggest clarifying as compact vs pretty-printed.



```diff
-- `json` - formatted JSON output
-- `raw` - unformatted JSON for machine consumption
+- `json` - pretty-printed JSON (human-friendly)
+- `raw` - compact JSON (no pretty printing), ideal for machine consumption

236-243: Add Windows-friendly Docker example for line continuation

Backslashes won’t work in PowerShell. Provide a one-line variant or use PowerShell continuation.

Example alternatives:

  • Single line:
docker run -it --rm --env-file .env ghcr.io/android-sms-gateway/cli send --phone '+12025550123' 'Hello, Dr. Turk!'
  • PowerShell continuation:
docker run -it --rm --env-file .env ghcr.io/android-sms-gateway/cli `
  send --phone '+12025550123' 'Hello, Dr. Turk!'

128-130: Cross-reference how to obtain the Message ID

Since status requires the ID from send, add a short note/example showing how to capture it in each output format (text/json/raw).

Example:

  • text: “ID: ”
  • json: jq -r '.id'
  • raw: jq -r '.id' (same field)

146-152: Consider listing supported webhook events or linking to the reference

Improves discoverability and prevents trial-and-error.

Add a link to the events section of the API reference or a short list of common events (e.g., sms:received, sms:sent, delivery:report), if available.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 39a75c8 and 9972825.

📒 Files selected for processing (1)
  • docs/integration/cli.md (11 hunks)
🧰 Additional context used
🪛 markdownlint-cli2 (0.17.2)
docs/integration/cli.md

52-52: Code block style
Expected: indented; Actual: fenced

(MD046, code-block-style)


208-208: Code block style
Expected: indented; Actual: fenced

(MD046, code-block-style)


215-215: Code block style
Expected: indented; Actual: fenced

(MD046, code-block-style)


240-240: Code block style
Expected: indented; Actual: fenced

(MD046, code-block-style)

🔇 Additional comments (2)
docs/integration/cli.md (2)

23-27: Confirm Go toolchain version requirement

Docs state “Go 1.23+”. Please verify this matches the module’s go directive and CI matrix; otherwise specify the actual minimum supported version.

I can parse go.mod in the CLI repo and suggest the exact minimum version if helpful.


266-267: Referenced API document and MkDocs plugins verified

  • docs/integration/api.md exists and matches the ./api.md link.
  • mkdocs.yml includes pymdownx.tabbed, pymdownx.superfences, admonition, and pymdownx.details in its extensions/plugins.

No further changes needed here.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🔭 Outside diff range comments (2)
docs/integration/cli.md (2)

192-212: Unify flag names in examples: use --phones and --device-id

Examples currently mix --phone, --phones, and --deviceId. Align with the options table (--phones, --device-id) to avoid confusion.

-# Send a message
-smsgate send --phone '+19162255887' 'Hello, Dr. Turk!'
+# Send a message
+smsgate send --phones '+19162255887' 'Hello, Dr. Turk!'
 
 # Send a message to multiple numbers
-smsgate send --phone '+19162255887' --phone '+19162255888' 'Hello, doctors!'
-# or
-smsgate send --phones '+19162255887,+19162255888' 'Hello, doctors!'
+smsgate send --phones '+19162255887,+19162255888' 'Hello, doctors!'
 
 # Send a message with a specific device
-smsgate send --deviceId 'DwWLuSmLbXvwzF8mbmTE8' --phones '+19162255887' 'Hello from specific device!'
+smsgate send --device-id 'DwWLuSmLbXvwzF8mbmTE8' --phones '+19162255887' 'Hello from specific device!'
 
 # Send a data message
 smsgate send --data --data-port 12345 --phones '+19162255887' 'aGVsbG8gd29ybGQ='

If the CLI supports --phone as an alias, call it out explicitly in the options table.


234-242: Align credentials example and flag name

Use --phones to match the options table.

 # Pass credentials by options
 smsgate send -u <username> -p <password> \
-    --phone '+19162255887' 'Hello, Dr. Turk!'
+    --phones '+19162255887' 'Hello, Dr. Turk!'
♻️ Duplicate comments (1)
docs/integration/cli.md (1)

41-44: Harden Windows install: create directory and add to PATH

Create the target directory and optionally add it to PATH. Also annotate that Admin PowerShell may be required.

-```powershell
-Invoke-WebRequest https://github.com/android-sms-gateway/cli/releases/latest/download/smsgate_Windows_x86_64.zip -OutFile smsgate.zip
-Expand-Archive smsgate.zip
-```
+```powershell
+# Run PowerShell as Administrator
+$dest = Join-Path $env:ProgramFiles 'SMSGATE'
+New-Item -ItemType Directory -Force -Path $dest | Out-Null
+
+Invoke-WebRequest https://github.com/android-sms-gateway/cli/releases/latest/download/smsgate_Windows_x86_64.zip -OutFile "$env:TEMP\smsgate.zip"
+Expand-Archive "$env:TEMP\smsgate.zip" -DestinationPath $dest -Force
+
+# Optionally add to PATH for current user (new shells only)
+if (-not ($env:Path -split ';' | Where-Object { $_ -eq $dest })) {
+  setx PATH "$($env:Path);$dest"
+}
+```
🧹 Nitpick comments (7)
docs/integration/cli.md (7)

31-38: Verify Go version requirement and PATH note

  • Stating “Go 1.23+” may be overly strict. go install <module>@version has been supported since Go 1.17. Please verify the minimum version actually required by this CLI.
  • PATH instruction is good; consider showing a one-liner for common shells.
-**Requirements**:
+**Requirements**:
 
-- Go 1.23+ installed
+- Go 1.17+ installed (verify exact minimum for this CLI)
 - `$GOPATH/bin` in your system PATH

Optionally add:

# Add to PATH (bash/zsh)
echo 'export PATH="$PATH:$(go env GOPATH)/bin"' >> ~/.bashrc  # or ~/.zshrc

122-123: Enhance base64 tip with a concrete example

 !!! tip
-    For sending data messages, ensure the content is properly base64 encoded.
+    For sending data messages, ensure the content is properly base64 encoded.
+    Example: `echo -n 'hello world' | base64` → `aGVsbG8gd29ybGQ=`

216-220: Satisfy markdownlint MD046 for this code block

Static analysis flagged MD046 (code-block-style) here. Either convert to indented style or adjust markdownlint config to allow fenced blocks consistently. To satisfy the rule locally:

-```bash
-# Get the status of a sent message
-smsgate status zXDYfTmTVf3iMd16zzdBj
-```
+    # Get the status of a sent message
+    smsgate status zXDYfTmTVf3iMd16zzdBj

Alternatively, set MD046: code_block_style = fenced in the repo config for consistent use of fenced blocks.


223-232: Satisfy markdownlint MD046 and add a JSON audit tip

  • Address MD046 by using indented blocks or updating the lint rule.
  • Provide a JSON example to help auditing.
-```bash
-# Register a webhook for received messages
-smsgate webhooks register --event 'sms:received' 'https://example.com/webhook'
-
-# List all registered webhooks
-smsgate webhooks list
-
-# Delete a webhook
-smsgate webhooks delete 'webhook-id'
-```
+    # Register a webhook for received messages
+    smsgate webhooks register --event 'sms:received' 'https://example.com/webhook'
+
+    # List all registered webhooks
+    smsgate webhooks list
+    # or as JSON for auditing
+    smsgate webhooks list --format json | jq .
+
+    # Delete a webhook
+    smsgate webhooks delete 'webhook-id'

248-251: Satisfy markdownlint MD046 and align Docker example flags

  • Address MD046 or update lint rule as elsewhere.
  • Use --phones to match the options table.
-```bash
-docker run -it --rm --env-file .env ghcr.io/android-sms-gateway/cli \
-    send --phone '+19162255887' 'Hello, Dr. Turk!'
-```
+    docker run -it --rm --env-file .env ghcr.io/android-sms-gateway/cli \
+        send --phones '+19162255887' 'Hello, Dr. Turk!'

Optionally add -v "$PWD":/work -w /work if using local files (like .env) outside the current directory context.


60-64: Use dotenv language hint and add a security reminder

Label the code block as dotenv for better highlighting and add a tip to avoid committing secrets.

-```bash title=".env Example"
+```dotenv title=".env Example"
 ASG_ENDPOINT="https://api.sms-gate.app/3rdparty/v1"
 ASG_USERNAME="your_username"
 ASG_PASSWORD="your_password"

+!!! warning "Secrets"

  • Never commit .env files to version control. Use secrets management in CI.

---

`11-15`: **Optional: add checksum verification for downloads**

Add a SHA256 checksum verification step to improve supply-chain safety.



```diff
     curl -LO https://github.com/android-sms-gateway/cli/releases/latest/download/smsgate_Linux_x86_64.tar.gz
+    curl -LO https://github.com/android-sms-gateway/cli/releases/latest/download/smsgate_Linux_x86_64.tar.gz.sha256
+    sha256sum -c smsgate_Linux_x86_64.tar.gz.sha256
     tar -xzf smsgate_Linux_x86_64.tar.gz

Mirror similar steps for macOS and Windows (use Get-FileHash on PowerShell).

Also applies to: 19-22, 41-43

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 9972825 and a333024.

📒 Files selected for processing (1)
  • docs/integration/cli.md (11 hunks)
🧰 Additional context used
🪛 markdownlint-cli2 (0.17.2)
docs/integration/cli.md

60-60: Code block style
Expected: indented; Actual: fenced

(MD046, code-block-style)


216-216: Code block style
Expected: indented; Actual: fenced

(MD046, code-block-style)


223-223: Code block style
Expected: indented; Actual: fenced

(MD046, code-block-style)


248-248: Code block style
Expected: indented; Actual: fenced

(MD046, code-block-style)

🔇 Additional comments (3)
docs/integration/cli.md (3)

270-276: Verify API reference link path

Please confirm that ./api.md is correct relative to this page. If the API docs live under docs/integration/api.md or a different route, update the link accordingly.


81-84: Confirm defaults and ranges are accurate

  • Validate the default for --delivery-report (true vs false).
  • Ensure --data-port range and default (53739) match the CLI’s actual behavior.

If helpful, I can look up the CLI’s published help/README to confirm these specifics. Would you like me to fetch that?

Also applies to: 107-121


107-121: Fix CLI flag naming typo and verify defaults

  • Update the conflict note to use the kebab-case flag name:
    -| `--ttl`  … **Conflicts with `--validUntil`.** … 
    +| `--ttl`  … **Conflicts with `--valid-until`.** … 
  • Double-check that the documented defaults match the actual CLI:
    --delivery-report
    --data
    --data-port
    Run:
    smsgate send --help
    and adjust the table if any defaults differ.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

♻️ Duplicate comments (3)
docs/integration/cli.md (3)

9-16: Add Linux (arm64) install path

Provide an explicit Linux arm64 tab with the correct asset and chmod step, similar to x86_64.

Proposed addition (insert after the Linux x86_64 block):

+=== ":penguin: Linux (arm64)"
+
+    ```bash
+    curl -LO https://github.com/android-sms-gateway/cli/releases/latest/download/smsgate_Linux_arm64.tar.gz
+    tar -xzf smsgate_Linux_arm64.tar.gz
+    chmod +x smsgate
+    sudo mv smsgate /usr/local/bin/smsgate
+    ```

Optional verification (checks for underscore/hyphen variants):

#!/bin/bash
set -e
for arch in arm64; do
  for sep in "_" "-"; do
    url="https://github.com/android-sms-gateway/cli/releases/latest/download/smsgate${sep}Linux${sep}${arch}.tar.gz"
    code=$(curl -s -o /dev/null -w "%{http_code}" -L "$url")
    echo "$url -> HTTP $code"
  done
done

18-25: Split macOS into Apple Silicon and Intel + add Gatekeeper tip

Add a macOS (Intel) tab and include a Gatekeeper quarantine note. Also consider noting PATH differences on Apple Silicon (/opt/homebrew/bin).

Proposed additions (insert after the Apple Silicon block):

+=== ":apple: macOS (Intel)"
+
+    ```bash
+    curl -LO https://github.com/android-sms-gateway/cli/releases/latest/download/smsgate_Darwin_x86_64.tar.gz
+    tar -xzf smsgate_Darwin_x86_64.tar.gz
+    chmod +x smsgate
+    sudo mv smsgate /usr/local/bin/smsgate
+    ```
+
+!!! tip "macOS Gatekeeper"
+    If the binary is quarantined, run:
+    ```
+    xattr -d com.apple.quarantine /usr/local/bin/smsgate
+    ```
+
+_Optional_: On Apple Silicon, ensure `/usr/local/bin` is on PATH or use `/opt/homebrew/bin`.

41-46: Harden Windows install: ensure destination, expand into it, optional PATH, and unblocking

Current steps leave the binary in the working directory without PATH guidance. Create the directory, expand into it, and optionally add to PATH. Include Unblock-File to clear MOTW.

-```powershell
-Invoke-WebRequest https://github.com/android-sms-gateway/cli/releases/latest/download/smsgate_Windows_x86_64.zip -OutFile smsgate.zip
-Expand-Archive smsgate.zip
-```
+```powershell
+# Run PowerShell as Administrator
+$dest = Join-Path $env:ProgramFiles 'SMSGATE'
+New-Item -ItemType Directory -Force -Path $dest | Out-Null
+Invoke-WebRequest https://github.com/android-sms-gateway/cli/releases/latest/download/smsgate_Windows_x86_64.zip -OutFile smsgate.zip
+Expand-Archive -Force smsgate.zip -DestinationPath $dest
+Unblock-File -Path (Join-Path $dest 'smsgate.exe') 2>$null
+
+# Optionally add to PATH for current user (new shells only)
+if (-not ($env:Path -split ';' | Where-Object { $_ -eq $dest })) {
+  setx PATH "$($env:Path);$dest" | Out-Null
+}
+Write-Host "Installed to $dest. Open a new terminal to use 'smsgate'."
+```
🧹 Nitpick comments (1)
docs/integration/cli.md (1)

62-62: markdownlint MD046 violations: code-block style

The linter expects indented code blocks but these are fenced. Either:

  • Update markdownlint config to allow fenced blocks, or
  • Convert these blocks to indented style for consistency.

Recommended config (preferred to keep Material features like titles):

{
  "MD046": { "style": "fenced" }
}

If you must switch styles, note that indented blocks won’t support code block titles like title=".env Example".

Also applies to: 201-201, 219-219, 226-226, 241-241, 251-251

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a333024 and b5e6ff8.

📒 Files selected for processing (1)
  • docs/integration/cli.md (9 hunks)
🧰 Additional context used
🪛 markdownlint-cli2 (0.17.2)
docs/integration/cli.md

62-62: Code block style
Expected: indented; Actual: fenced

(MD046, code-block-style)


201-201: Code block style
Expected: indented; Actual: fenced

(MD046, code-block-style)


219-219: Code block style
Expected: indented; Actual: fenced

(MD046, code-block-style)


226-226: Code block style
Expected: indented; Actual: fenced

(MD046, code-block-style)


241-241: Code block style
Expected: indented; Actual: fenced

(MD046, code-block-style)


251-251: Code block style
Expected: indented; Actual: fenced

(MD046, code-block-style)

🔇 Additional comments (1)
docs/integration/cli.md (1)

109-123: Double-check defaults/semantics for boolean and numeric options

Please verify that documented defaults match the CLI behavior, especially:

  • --delivery-report defaulting to true
  • --data defaulting to false
  • --data-port default 53739
  • --device-active-within default 0

If any differ, update the table to avoid user confusion.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

♻️ Duplicate comments (3)
docs/integration/cli.md (3)

9-16: Add Linux arm64 install tab and verify asset names

Great Linux x86_64 flow. Add an arm64 variant and double-check asset naming to avoid 404s.

Apply this diff to add arm64:

 === ":penguin: Linux (x86_64)"
@@
     sudo mv smsgate /usr/local/bin/smsgate
     ```
 
+=== ":penguin: Linux (arm64)"
+
+    ```bash
+    curl -LO https://github.com/android-sms-gateway/cli/releases/latest/download/smsgate_Linux_arm64.tar.gz
+    tar -xzf smsgate_Linux_arm64.tar.gz
+    chmod +x smsgate
+    sudo mv smsgate /usr/local/bin/smsgate
+    ```

Optionally verify current asset names:

#!/bin/bash
# Verify latest release assets contain expected Linux tarballs
curl -s https://api.github.com/repos/android-sms-gateway/cli/releases/latest \
 | jq -r '.assets[].name' | sed 's/^/ - /'

18-24: Add macOS (Intel) tab and Gatekeeper note; include PATH tip for Apple Silicon

Include an Intel build tab and a Gatekeeper tip; also note possible PATH differences on Apple Silicon.

 === ":apple: macOS (Apple Silicon)"
@@
     sudo mv smsgate /usr/local/bin/smsgate
-    ```
+    ```
+
+=== ":apple: macOS (Intel)"
+
+    ```bash
+    curl -LO https://github.com/android-sms-gateway/cli/releases/latest/download/smsgate_Darwin_x86_64.tar.gz
+    tar -xzf smsgate_Darwin_x86_64.tar.gz
+    chmod +x smsgate
+    sudo mv smsgate /usr/local/bin/smsgate
+    ```
+
+!!! tip "macOS Gatekeeper"
+    If the binary is quarantined, run: `xattr -d com.apple.quarantine /usr/local/bin/smsgate`
+
+!!! note "PATH on Apple Silicon"
+    Homebrew defaults to `/opt/homebrew/bin` on Apple Silicon. Ensure `/usr/local/bin` is in `PATH` or adjust the install path.

43-46: Harden Windows install: ensure destination, expand there, PATH update, and unblock

Create target dir, expand into it, optionally add to PATH, and handle file unblock. Note admin requirement.

-```powershell
-Invoke-WebRequest https://github.com/android-sms-gateway/cli/releases/latest/download/smsgate_Windows_x86_64.zip -OutFile smsgate.zip
-Expand-Archive smsgate.zip
-```
+```powershell
+# Run PowerShell as Administrator
+$dest = Join-Path $env:ProgramFiles 'SMSGATE'
+New-Item -ItemType Directory -Force -Path $dest | Out-Null
+
+$zip = Join-Path $env:TEMP 'smsgate.zip'
+Invoke-WebRequest https://github.com/android-sms-gateway/cli/releases/latest/download/smsgate_Windows_x86_64.zip -OutFile $zip
+Expand-Archive -Path $zip -DestinationPath $dest -Force
+
+# If the extracted EXE isn't named smsgate.exe, rename it
+$exe = Get-ChildItem -Path $dest -Filter 'smsgate*.exe' -Recurse | Select-Object -First 1
+if ($exe -and $exe.Name -ne 'smsgate.exe') {
+  Rename-Item -Path $exe.FullName -NewName 'smsgate.exe'
+}
+
+# Remove download zone identifier if present
+if (Get-Command Unblock-File -ErrorAction SilentlyContinue) {
+  Unblock-File -Path (Join-Path $dest 'smsgate.exe') -ErrorAction SilentlyContinue
+}
+
+# Optionally add to PATH for current user (new shells only)
+if (-not ($env:Path -split ';' | Where-Object { $_ -eq $dest })) {
+  setx PATH "$($env:Path);$dest" | Out-Null
+  Write-Host "Added $dest to PATH. Open a new terminal to use 'smsgate'."
+}
+```
🧹 Nitpick comments (3)
docs/integration/cli.md (3)

56-61: Clarify configuration precedence (flags vs env vs .env)

State the precedence order explicitly to avoid surprises (typical: flags > env vars > .env).

For example:

 ### Environment Variables
@@
-You can set configuration variables using a `.env` file:
+You can set configuration via environment variables or a `.env` file.  
+Precedence: command-line flags > environment variables > `.env` file.
+
+You can set variables using a `.env` file:

109-123: Document how to disable boolean flags

--delivery-report defaults to true. Add a note showing how to disable it (e.g., --delivery-report=false or --no-delivery-report), depending on the CLI framework behavior.

 | `--delivery-report`       | Enables delivery report for the message.                                              | `true`        | `true`                  |
@@
 | `--device-active-within`  | Time window in hours for device activity filtering. `0` means no filtering.           | `0`           | `12`                    |
 
+!!! note "Disabling booleans"
+    To disable, use `--delivery-report=false`. If your shell or CLI supports it, `--no-delivery-report` may also work.

251-254: Pin Docker image version for reproducibility

Using :latest can break CI/CD unexpectedly. Recommend pinning a specific tag (and updating periodically).

-docker run -it --rm --env-file .env ghcr.io/android-sms-gateway/cli \
+docker run -it --rm --env-file .env ghcr.io/android-sms-gateway/cli:<version> \
     send --phones '+19162255887' 'Hello, Dr. Turk!'
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between b5e6ff8 and 4d4e413.

📒 Files selected for processing (1)
  • docs/integration/cli.md (9 hunks)
🧰 Additional context used
🪛 markdownlint-cli2 (0.17.2)
docs/integration/cli.md

62-62: Code block style
Expected: indented; Actual: fenced

(MD046, code-block-style)


201-201: Code block style
Expected: indented; Actual: fenced

(MD046, code-block-style)


219-219: Code block style
Expected: indented; Actual: fenced

(MD046, code-block-style)


226-226: Code block style
Expected: indented; Actual: fenced

(MD046, code-block-style)


241-241: Code block style
Expected: indented; Actual: fenced

(MD046, code-block-style)


251-251: Code block style
Expected: indented; Actual: fenced

(MD046, code-block-style)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Cloudflare Pages
🔇 Additional comments (2)
docs/integration/cli.md (2)

33-37: Confirm minimum Go version for go install

Docs state Go 1.23+. Verify the actual minimum supported Go version for building/running the CLI (often >=1.20 for go install ...@version semantics).

If needed, adjust:

-    - Go 1.23+ installed
+    - Go 1.xx+ installed (minimum supported: <confirmed version>)

62-62: Resolve markdownlint MD046 (code-block-style) or relax the rule

The linter flags fenced blocks at these lines. If your docs rely on fenced blocks (with titles/syntax highlighting), consider updating markdownlint config to allow fenced blocks; otherwise convert to indented style for consistency.

Option A: adjust repo config (example .markdownlint.jsonc):

{
  "MD046": { "style": "fenced" }
}

Option B: convert flagged fenced blocks to indented style (note: titles like title="..." aren’t supported with indented blocks).

Also applies to: 201-201, 219-219, 226-226, 241-241, 251-251

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

♻️ Duplicate comments (4)
docs/integration/cli.md (4)

109-123: Option casing fixed: consistent use of --valid-until

The conflict notes now consistently use kebab-case. Looks good.


9-16: Add Linux (arm64) install tab alongside x86_64

Many users run arm64 on servers and dev boards. Provide an explicit Linux arm64 tab mirroring the x86_64 steps.

 === ":penguin: Linux (x86_64)"

     ```bash
     curl -LO https://github.com/android-sms-gateway/cli/releases/latest/download/smsgate_Linux_x86_64.tar.gz
     tar -xzf smsgate_Linux_x86_64.tar.gz
     chmod +x smsgate
     sudo mv smsgate /usr/local/bin/smsgate
     ```
+
+=== ":penguin: Linux (arm64)"
+
+    ```bash
+    curl -LO https://github.com/android-sms-gateway/cli/releases/latest/download/smsgate_Linux_arm64.tar.gz
+    tar -xzf smsgate_Linux_arm64.tar.gz
+    chmod +x smsgate
+    sudo mv smsgate /usr/local/bin/smsgate
+    ```
+
+!!! tip
+    Ensure `/usr/local/bin` is on your PATH: `echo $PATH | tr ':' '\n' | grep /usr/local/bin || echo 'Add /usr/local/bin to PATH'`

18-25: Split macOS into Apple Silicon and Intel variants; add Gatekeeper tip

Document separate Intel binary and include Gatekeeper quarantine guidance. Also note PATH differences on Apple Silicon.

 === ":apple: macOS (Apple Silicon)"
 
     ```bash
     curl -LO https://github.com/android-sms-gateway/cli/releases/latest/download/smsgate_Darwin_arm64.tar.gz
     tar -xzf smsgate_Darwin_arm64.tar.gz
     chmod +x smsgate
     sudo mv smsgate /usr/local/bin/smsgate
     ```
+
+=== ":apple: macOS (Intel)"
+
+    ```bash
+    curl -LO https://github.com/android-sms-gateway/cli/releases/latest/download/smsgate_Darwin_x86_64.tar.gz
+    tar -xzf smsgate_Darwin_x86_64.tar.gz
+    chmod +x smsgate
+    sudo mv smsgate /usr/local/bin/smsgate
+    ```
+
+!!! tip "macOS Gatekeeper"
+    If the binary is quarantined, run: `xattr -d com.apple.quarantine /usr/local/bin/smsgate`
+
+!!! note
+    On Apple Silicon, Homebrew uses `/opt/homebrew/bin`. Ensure your PATH includes the install location you choose.

41-46: Harden Windows install: ensure directory exists, download into it, and update PATH

Create the destination folder, download there, and optionally append it to PATH. Admin PowerShell is typically required.

-```powershell
-Invoke-WebRequest https://github.com/android-sms-gateway/cli/releases/latest/download/smsgate_Windows_x86_64.zip -OutFile smsgate.zip
-Expand-Archive smsgate.zip
-```
+```powershell
+# Run PowerShell as Administrator
+$dest = Join-Path $env:ProgramFiles 'SMSGATE'
+New-Item -ItemType Directory -Force -Path $dest | Out-Null
+
+Invoke-WebRequest https://github.com/android-sms-gateway/cli/releases/latest/download/smsgate_Windows_x86_64.zip -OutFile "$env:TEMP\smsgate.zip"
+Expand-Archive "$env:TEMP\smsgate.zip" -DestinationPath $dest -Force
+
+# Optionally add to PATH for current user (effective in new shells)
+if (-not ($env:Path -split ';' | Where-Object { $_ -eq $dest })) {
+  setx PATH "$($env:Path);$dest" | Out-Null
+}
+Write-Host "Installed to $dest. Open a new terminal to use 'smsgate'."
+```
🧹 Nitpick comments (2)
docs/integration/cli.md (2)

33-37: Prefer go env for GOPATH reference

Use $(go env GOPATH) to avoid issues when GOPATH isn’t explicitly set; minor wording tweak.

-    - `$GOPATH/bin` in your system PATH
+    - `$(go env GOPATH)/bin` available on your PATH

200-258: Resolve markdownlint MD046 violations without harming readability

The linter expects indented code blocks, but fenced blocks are standard with MkDocs/Material and tabs. Prefer adjusting lint config over converting blocks.

  • Option A (recommended): Configure markdownlint to allow fenced style (root .markdownlint.jsonc):
{
  "MD046": { "style": "fenced" }
}
  • Option B: Disable the rule:
{
  "MD046": false
}

If the repo already has markdownlint config, append the MD046 setting there.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 4d4e413 and a145e75.

📒 Files selected for processing (1)
  • docs/integration/cli.md (9 hunks)
🧰 Additional context used
🪛 markdownlint-cli2 (0.17.2)
docs/integration/cli.md

62-62: Code block style
Expected: indented; Actual: fenced

(MD046, code-block-style)


204-204: Code block style
Expected: indented; Actual: fenced

(MD046, code-block-style)


222-222: Code block style
Expected: indented; Actual: fenced

(MD046, code-block-style)


229-229: Code block style
Expected: indented; Actual: fenced

(MD046, code-block-style)


244-244: Code block style
Expected: indented; Actual: fenced

(MD046, code-block-style)


254-254: Code block style
Expected: indented; Actual: fenced

(MD046, code-block-style)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Cloudflare Pages
🔇 Additional comments (1)
docs/integration/cli.md (1)

11-24: Asset URLs confirmed
Verified that the documented asset names (smsgate_Linux_x86_64.tar.gz and smsgate_Darwin_arm64.tar.gz) match the latest release assets and return HTTP 200 on download. No changes needed here.

@capcom6 capcom6 force-pushed the integration/add-new-cli-options branch from a145e75 to e02bee4 Compare August 10, 2025 07:07
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

♻️ Duplicate comments (3)
docs/integration/cli.md (3)

9-16: Add Linux (arm64) install variant

Provide an explicit arm64 tab alongside x86_64 to avoid confusion for ARM servers.

 === ":penguin: Linux (x86_64)"
 
     ```bash
     curl -LO https://github.com/android-sms-gateway/cli/releases/latest/download/smsgate_Linux_x86_64.tar.gz
     tar -xzf smsgate_Linux_x86_64.tar.gz
     chmod +x smsgate
     sudo mv smsgate /usr/local/bin/smsgate
     ```
+
+=== ":penguin: Linux (arm64)"
+
+    ```bash
+    curl -LO https://github.com/android-sms-gateway/cli/releases/latest/download/smsgate_Linux_arm64.tar.gz
+    tar -xzf smsgate_Linux_arm64.tar.gz
+    chmod +x smsgate
+    sudo mv smsgate /usr/local/bin/smsgate
+    ```

Optional: prefer install for correct mode/owner in one step.

- sudo mv smsgate /usr/local/bin/smsgate
+ sudo install -m 0755 smsgate /usr/local/bin/smsgate

18-25: Add macOS (Intel) tab + Gatekeeper and PATH tips

Document Intel (x86_64) separately and add a Gatekeeper quarantine tip and PATH note.

 === ":apple: macOS (Apple Silicon)"
 
     ```bash
     curl -LO https://github.com/android-sms-gateway/cli/releases/latest/download/smsgate_Darwin_arm64.tar.gz
     tar -xzf smsgate_Darwin_arm64.tar.gz
     chmod +x smsgate
     sudo mv smsgate /usr/local/bin/smsgate
     ```
+
+=== ":apple: macOS (Intel)"
+
+    ```bash
+    curl -LO https://github.com/android-sms-gateway/cli/releases/latest/download/smsgate_Darwin_x86_64.tar.gz
+    tar -xzf smsgate_Darwin_x86_64.tar.gz
+    chmod +x smsgate
+    sudo mv smsgate /usr/local/bin/smsgate
+    ```
+
+!!! tip "macOS Gatekeeper"
+    If the binary is quarantined, run: `xattr -d com.apple.quarantine /usr/local/bin/smsgate`
+
+!!! note "PATH on Apple Silicon"
+    Ensure `/usr/local/bin` is in your PATH (many Apple Silicon setups use `/opt/homebrew/bin`).

41-46: Harden Windows install (dest dir, PATH, admin note)

Create the target dir, extract there, and optionally add to PATH; advise running as admin.

-```powershell
-Invoke-WebRequest https://github.com/android-sms-gateway/cli/releases/latest/download/smsgate_Windows_x86_64.zip -OutFile smsgate.zip
-Expand-Archive smsgate.zip
-```
+```powershell
+# Run PowerShell as Administrator
+$dest = Join-Path $env:ProgramFiles 'SMSGATE'
+New-Item -ItemType Directory -Force -Path $dest | Out-Null
+Invoke-WebRequest https://github.com/android-sms-gateway/cli/releases/latest/download/smsgate_Windows_x86_64.zip -OutFile "$env:TEMP\smsgate.zip"
+Expand-Archive "$env:TEMP\smsgate.zip" -DestinationPath $dest -Force
+# Optionally add to PATH for current user (new shells only)
+if (-not ($env:Path -split ';' | Where-Object { $_ -eq $dest })) {
+  setx PATH "$($env:Path);$dest"
+}
+```
🧹 Nitpick comments (2)
docs/integration/cli.md (2)

62-62: Resolve markdownlint MD046 (code block style) by configuring style to “fenced”

Your docs intentionally use fenced blocks. Prefer updating lint config rather than rewriting blocks.

Suggested .markdownlint.json:

{
  "MD046": { "style": "fenced" }
}

Alternatively, add a repo-wide markdownlint config to permit fenced blocks. Please confirm your lint setup and adjust accordingly.

Also applies to: 204-204, 222-222, 229-229, 244-244, 254-254


206-206: Use reserved example phone numbers (avoid real-looking PII)

Switch examples to NANP reserved numbers (e.g., +12025550123) to avoid accidental PII.

- s msgate send --phones '+19162255887' 'Hello, Dr. Turk!'
+ smsgate send --phones '+12025550123' 'Hello, Dr. Turk!'
@@
- smsgate send --phones '+19162255887' --phones '+19162255888' 'Hello, doctors!'
+ smsgate send --phones '+12025550123' --phones '+12025550124' 'Hello, doctors!'
- smsgate send --phones '+19162255887,+19162255888' 'Hello, doctors!'
+ smsgate send --phones '+12025550123,+12025550124' 'Hello, doctors!'
@@
- smsgate send --device-id 'DwWLuSmLbXvwzF8mbmTE8' --phones '+19162255887' 'Hello from specific device!'
+ smsgate send --device-id 'DwWLuSmLbXvwzF8mbmTE8' --phones '+12025550123' 'Hello from specific device!'
@@
- smsgate send --data --data-port 12345 --phones '+19162255887' 'aGVsbG8gd29ybGQ='
+ smsgate send --data --data-port 12345 --phones '+12025550123' 'aGVsbG8gd29ybGQ='
@@
- smsgate send -u <username> -p <password> \
-     --phones '+19162255887' 'Hello, Dr. Turk!'
+ smsgate send -u <username> -p <password> \
+     --phones '+12025550123' 'Hello, Dr. Turk!'
@@
- docker run -it --rm --env-file .env ghcr.io/android-sms-gateway/cli \
-     send --phones '+19162255887' 'Hello, Dr. Turk!'
+ docker run -it --rm --env-file .env ghcr.io/android-sms-gateway/cli \
+     send --phones '+12025550123' 'Hello, Dr. Turk!'

Also applies to: 209-211, 214-215, 217-218, 247-248, 256-257

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a145e75 and e02bee4.

📒 Files selected for processing (1)
  • docs/integration/cli.md (9 hunks)
🧰 Additional context used
🪛 markdownlint-cli2 (0.17.2)
docs/integration/cli.md

62-62: Code block style
Expected: indented; Actual: fenced

(MD046, code-block-style)


204-204: Code block style
Expected: indented; Actual: fenced

(MD046, code-block-style)


222-222: Code block style
Expected: indented; Actual: fenced

(MD046, code-block-style)


229-229: Code block style
Expected: indented; Actual: fenced

(MD046, code-block-style)


244-244: Code block style
Expected: indented; Actual: fenced

(MD046, code-block-style)


254-254: Code block style
Expected: indented; Actual: fenced

(MD046, code-block-style)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Cloudflare Pages
🔇 Additional comments (3)
docs/integration/cli.md (3)

117-118: Option naming is consistent (kebab-case) — good

--ttl and --valid-until use kebab-case consistently, and conflict notes match.


280-281: API Reference link path is correct
The link ./api.md in docs/integration/cli.md correctly resolves to docs/integration/api.md. No update needed.


7-25: Release asset URLs verified
All tested download URLs (Linux x86_64, Linux arm64, Darwin arm64, Darwin x86_64, Windows x86_64) return HTTP 200. The paths and extensions in docs/integration/cli.md are correct—no updates needed.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

♻️ Duplicate comments (4)
docs/integration/cli.md (4)

9-16: Add Linux (arm64) install tab to cover ARM servers

Linux arm64 users are not covered. Add a dedicated tab mirroring x86_64 steps.

     sudo mv smsgate /usr/local/bin/smsgate
     ```
 
+=== ":penguin: Linux (arm64)"
+
+    ```bash
+    curl -LO https://github.com/android-sms-gateway/cli/releases/latest/download/smsgate_Linux_arm64.tar.gz
+    tar -xzf smsgate_Linux_arm64.tar.gz
+    chmod +x smsgate
+    sudo mv smsgate /usr/local/bin/smsgate
+    ```

18-25: Add macOS (Intel) tab and Gatekeeper tip; note PATH on Apple Silicon

Only Apple Silicon is documented. Include Intel variant, add Gatekeeper guidance, and note PATH differences.

     sudo mv smsgate /usr/local/bin/smsgate
     ```
 
+=== ":apple: macOS (Intel)"
+
+    ```bash
+    curl -LO https://github.com/android-sms-gateway/cli/releases/latest/download/smsgate_Darwin_x86_64.tar.gz
+    tar -xzf smsgate_Darwin_x86_64.tar.gz
+    chmod +x smsgate
+    sudo mv smsgate /usr/local/bin/smsgate
+    ```
+
+!!! tip "macOS Gatekeeper"
+    If you see “unidentified developer” errors, remove the quarantine attribute:
+    ```
+    xattr -d com.apple.quarantine /usr/local/bin/smsgate
+    ```
+
+!!! note "Apple Silicon PATH"
+    Ensure `/usr/local/bin` is in your PATH. Some setups prefer `/opt/homebrew/bin`; adjust the install path if needed.

41-46: Windows install incomplete: move binary and update PATH (admin may be required)

After Expand-Archive, users can't run smsgate unless the dir is on PATH. Create the target dir, extract there, and add to PATH.

-    ```powershell
-    Invoke-WebRequest https://github.com/android-sms-gateway/cli/releases/latest/download/smsgate_Windows_x86_64.zip -OutFile smsgate.zip
-    Expand-Archive smsgate.zip
-    ```
+    ```powershell
+    # Run PowerShell as Administrator
+    $dest = Join-Path $env:ProgramFiles 'SMSGATE'
+    New-Item -ItemType Directory -Force -Path $dest | Out-Null
+    $zip = Join-Path $env:TEMP 'smsgate_Windows_x86_64.zip'
+    Invoke-WebRequest https://github.com/android-sms-gateway/cli/releases/latest/download/smsgate_Windows_x86_64.zip -OutFile $zip
+    Expand-Archive -Path $zip -DestinationPath $dest -Force
+    # Optionally add to PATH for current user (new shells only)
+    if (-not ($env:Path -split ';' | Where-Object { $_ -eq $dest })) {
+      setx PATH "$($env:Path);$dest"
+    }
+    ```
+    Open a new PowerShell window to pick up PATH changes.

33-37: Align Go version requirement with go.mod directive

The go.mod in HEAD specifies go 1.23.2, so the docs should require Go 1.23.2 + to match.

• File: docs/integration/cli.md
Lines: 33–37

Suggested change:

-    - Go 1.23+ installed
+    - Go 1.23.2+ installed
🧹 Nitpick comments (2)
docs/integration/cli.md (2)

1-1: Silence MD046 for fenced code blocks used with tabs

The doc relies on fenced blocks within tabbed sections; markdownlint MD046 expects indented blocks. Disable MD046 for this file to avoid noise.

+<!-- markdownlint-disable MD046 -->
 # Integration - CLI Tool 💻

56-67: Add a secrets caution for .env usage

Recommend reminding users not to commit .env and to add it to .gitignore.

 You can set configuration variables using a `.env` file:
 
 ```bash title=".env Example"
 ASG_ENDPOINT="https://api.sms-gate.app/3rdparty/v1"
 ASG_USERNAME="your_username"
 ASG_PASSWORD="your_password"

+!!! warning "Keep credentials safe"

  • Do not commit .env files to source control. Add .env to your .gitignore.

</blockquote></details>

</blockquote></details>

<details>
<summary>📜 Review details</summary>

**Configuration used: CodeRabbit UI**
**Review profile: CHILL**
**Plan: Pro**


<details>
<summary>📥 Commits</summary>

Reviewing files that changed from the base of the PR and between e02bee44c487bb99d4f22719ee4c6b4e3ff18a13 and b1a72173d769c3d51bb713dd9e21128c568de783.

</details>

<details>
<summary>📒 Files selected for processing (1)</summary>

* `docs/integration/cli.md` (9 hunks)

</details>

<details>
<summary>🧰 Additional context used</summary>

<details>
<summary>🪛 markdownlint-cli2 (0.17.2)</summary>

<details>
<summary>docs/integration/cli.md</summary>

62-62: Code block style
Expected: indented; Actual: fenced

(MD046, code-block-style)

---

204-204: Code block style
Expected: indented; Actual: fenced

(MD046, code-block-style)

---

222-222: Code block style
Expected: indented; Actual: fenced

(MD046, code-block-style)

---

229-229: Code block style
Expected: indented; Actual: fenced

(MD046, code-block-style)

---

244-244: Code block style
Expected: indented; Actual: fenced

(MD046, code-block-style)

---

254-254: Code block style
Expected: indented; Actual: fenced

(MD046, code-block-style)

</details>

</details>

</details>

<details>
<summary>🔇 Additional comments (4)</summary><blockquote>

<details>
<summary>docs/integration/cli.md (4)</summary>

`109-123`: **Options table looks solid and consistent**

Good coverage of new flags (`--device-id`, `--data[-port]`, `--skip-phone-validation`, `--device-active-within`) and proper conflict notes for TTL vs valid-until.

---

`142-144`: **Clear dependency on message ID from send command**

The status section correctly clarifies the ID requirement. Nice.

---

`254-257`: **Docker usage is concise and correct**

Using `--env-file` is the right call for credentials; example command reads well.

---

`9-25`: **Verified CLI asset URLs use correct underscore naming**

I’ve checked the release URLs referenced in docs/integration/cli.md (Lines 9–25) and confirmed that all underscore-based asset names resolve with HTTP 200, whereas the hyphenated variants return 404. No changes are needed.

</details>

</blockquote></details>

</details>

<!-- This is an auto-generated comment by CodeRabbit for review status -->

@capcom6 capcom6 force-pushed the integration/add-new-cli-options branch from b1a7217 to c4de68e Compare August 10, 2025 23:00
@capcom6 capcom6 changed the title Revise and expand SMS Gateway CLI documentation with improved instructions [integration] update CLI docs for new options Aug 10, 2025
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

♻️ Duplicate comments (2)
docs/integration/cli.md (2)

43-46: Harden Windows install: ensure target dir exists and update PATH

Create the install directory, download directly there, and optionally add it to PATH. Run as admin.

-```powershell
-Invoke-WebRequest https://github.com/android-sms-gateway/cli/releases/latest/download/smsgate_Windows_x86_64.zip -OutFile smsgate.zip
-Expand-Archive smsgate.zip
-```
+```powershell
+# Run PowerShell as Administrator
+$dest = Join-Path $env:ProgramFiles 'SMSGATE'
+New-Item -ItemType Directory -Force -Path $dest | Out-Null
+Invoke-WebRequest https://github.com/android-sms-gateway/cli/releases/latest/download/smsgate-Windows-x86_64.exe -OutFile "$dest\smsgate.exe"
+
+# Optionally add to PATH for current user (new shells only)
+if (-not ($env:Path -split ';' | Where-Object { $_ -eq $dest })) {
+  setx PATH "$($env:Path);$dest"
+}
+Write-Host "Installed to $dest. Open a new terminal to use 'smsgate'."
+```

Note: If releases provide a ZIP, expand to $dest and ensure the final exe is named smsgate.exe in $dest.


33-37: Align Go version in docs with go.mod

The module’s go.mod specifies Go 1.23.2, so the CLI docs should reflect the exact minimum patch version to avoid mismatches.

• File: docs/integration/cli.md
• Lines: 33–37

-    - Go 1.23+ installed
+    - Go 1.23.2+ installed
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between b1a7217 and c4de68e.

📒 Files selected for processing (1)
  • docs/integration/cli.md (9 hunks)
🧰 Additional context used
🪛 markdownlint-cli2 (0.17.2)
docs/integration/cli.md

62-62: Code block style
Expected: indented; Actual: fenced

(MD046, code-block-style)


204-204: Code block style
Expected: indented; Actual: fenced

(MD046, code-block-style)


222-222: Code block style
Expected: indented; Actual: fenced

(MD046, code-block-style)


229-229: Code block style
Expected: indented; Actual: fenced

(MD046, code-block-style)


244-244: Code block style
Expected: indented; Actual: fenced

(MD046, code-block-style)


254-254: Code block style
Expected: indented; Actual: fenced

(MD046, code-block-style)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Cloudflare Pages
🔇 Additional comments (1)
docs/integration/cli.md (1)

109-123: Options table looks consistent; casing issue resolved

The prior camelCase/kebab-case mismatch is fixed (--valid-until). No further issues spotted.

@capcom6 capcom6 force-pushed the integration/add-new-cli-options branch from 7573dc4 to e1d84e4 Compare August 11, 2025 06:47
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

♻️ Duplicate comments (4)
docs/integration/cli.md (4)

9-16: Add Linux (arm64) install tab and verify asset names

Only x86_64 is documented. Document arm64 as well and ensure the asset names match the latest release (underscores vs hyphens).

Proposed addition:

 === ":penguin: Linux (x86_64)"
 
     ```bash
     curl -LO https://github.com/android-sms-gateway/cli/releases/latest/download/smsgate_Linux_x86_64.tar.gz
     tar -xzf smsgate_Linux_x86_64.tar.gz
     chmod +x smsgate
     sudo mv smsgate /usr/local/bin/smsgate
     ```
+
+=== ":penguin: Linux (arm64)"
+
+    ```bash
+    curl -LO https://github.com/android-sms-gateway/cli/releases/latest/download/smsgate_Linux_arm64.tar.gz
+    tar -xzf smsgate_Linux_arm64.tar.gz
+    chmod +x smsgate
+    sudo mv smsgate /usr/local/bin/smsgate
+    ```

To verify asset names:

#!/bin/bash
set -e
curl -s https://api.github.com/repos/android-sms-gateway/cli/releases/latest \
  | jq -r '.assets[].name' | grep -Ei 'Linux.*(x86_64|amd64|arm64)'

18-25: Add macOS (Intel) tab, chmod, and Gatekeeper tip

Document the Intel x86_64 macOS binary too, and add a Gatekeeper quarantine note. Consider a PATH note for Apple Silicon.

 === ":apple: macOS (Apple Silicon)"
 
     ```bash
     curl -LO https://github.com/android-sms-gateway/cli/releases/latest/download/smsgate_Darwin_arm64.tar.gz
     tar -xzf smsgate_Darwin_arm64.tar.gz
     chmod +x smsgate
     sudo mv smsgate /usr/local/bin/smsgate
     ```
+
+=== ":apple: macOS (Intel)"
+
+    ```bash
+    curl -LO https://github.com/android-sms-gateway/cli/releases/latest/download/smsgate_Darwin_x86_64.tar.gz
+    tar -xzf smsgate_Darwin_x86_64.tar.gz
+    chmod +x smsgate
+    sudo mv smsgate /usr/local/bin/smsgate
+    ```
+
+!!! tip "macOS Gatekeeper"
+    If you see “unidentified developer” errors, remove quarantine:
+    `xattr -d com.apple.quarantine /usr/local/bin/smsgate`
+
+!!! note
+    On Apple Silicon, Homebrew defaults to `/opt/homebrew/bin`. Ensure it’s on your PATH or install there.

29-31: Harden Windows install (dest dir, PATH, run as admin)

Current steps leave the binary in the working directory and don’t add it to PATH. Create the target directory, download there, and update PATH.

-```powershell
-Invoke-WebRequest https://github.com/android-sms-gateway/cli/releases/latest/download/smsgate_Windows_x86_64.zip -OutFile smsgate.zip
-Expand-Archive smsgate.zip
-```
+```powershell
+# Run PowerShell as Administrator
+$dest = Join-Path $env:ProgramFiles 'SMSGATE'
+New-Item -ItemType Directory -Force -Path $dest | Out-Null
+
+Invoke-WebRequest `
+  https://github.com/android-sms-gateway/cli/releases/latest/download/smsgate_Windows_x86_64.zip `
+  -OutFile "$env:TEMP\smsgate.zip"
+Expand-Archive "$env:TEMP\smsgate.zip" -DestinationPath $dest -Force
+
+# Optionally add to PATH for current user (new shells only)
+if (-not ($env:Path -split ';' | Where-Object { $_ -eq $dest })) {
+  setx PATH "$($env:Path);$dest"
+}
+```
#!/bin/bash
# Verify Windows asset naming (zip vs exe, arch suffix)
curl -s https://api.github.com/repos/android-sms-gateway/cli/releases/latest \
  | jq -r '.assets[].name' | grep -Ei 'Windows.*(x86_64|amd64).*\.zip|\.exe'

40-46: Update Go version requirement to 1.23.2+ in CLI docs

The module’s go.mod specifies go 1.23.2, so we should align the documentation to require Go 1.23.2+ instead of 1.23+.

• File: docs/integration/cli.md (around lines 40–46)
• Change the minimum Go version in the Requirements section

-    - Go 1.23+ installed
+    - Go 1.23.2+ installed
🧹 Nitpick comments (2)
docs/integration/cli.md (2)

27-27: Windows tab icon label nit

Replace “:window:” with the Material icon slug or plain label to avoid a broken icon.

-=== ":window: Windows"
+=== ":material-microsoft-windows: Windows"

7-8: Resolve markdownlint MD046 for fenced code blocks (titled fences)

markdownlint flags fenced code blocks on this page (MD046). Since Material for MkDocs relies on fenced+titled blocks, disable MD046 locally or in config.

Option A (file-scope):

+<!-- markdownlint-disable MD046 -->
 # Integration - CLI Tool 💻
 …
+<!-- markdownlint-enable MD046 -->

Option B (global): add to .markdownlint.json

{
  "MD046": false
}

Also applies to: 81-88, 200-203, 206-214, 222-227, 229-240, 246-250, 256-259

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c4de68e and e1d84e4.

📒 Files selected for processing (1)
  • docs/integration/cli.md (9 hunks)
🧰 Additional context used
🪛 markdownlint-cli2 (0.17.2)
docs/integration/cli.md

64-64: Code block style
Expected: indented; Actual: fenced

(MD046, code-block-style)


206-206: Code block style
Expected: indented; Actual: fenced

(MD046, code-block-style)


224-224: Code block style
Expected: indented; Actual: fenced

(MD046, code-block-style)


231-231: Code block style
Expected: indented; Actual: fenced

(MD046, code-block-style)


246-246: Code block style
Expected: indented; Actual: fenced

(MD046, code-block-style)


256-256: Code block style
Expected: indented; Actual: fenced

(MD046, code-block-style)

🔇 Additional comments (3)
docs/integration/cli.md (3)

54-55: Good addition: link to Releases for platform matrix

Pointing users to GitHub Releases avoids drift in asset names and availability.


111-125: Option conflict casing fixed and options table looks consistent

Using --valid-until (kebab-case) consistently resolves the prior mismatch. Table additions are clear.


126-131: Helpful notes for booleans and base64 data messages

Clear guidance; defaults and disabling syntax are unambiguous.

@capcom6 capcom6 force-pushed the integration/add-new-cli-options branch from e1d84e4 to 969813f Compare August 12, 2025 00:48
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

♻️ Duplicate comments (5)
docs/integration/cli.md (5)

40-44: Align Go version requirement with go.mod (use exact patch level)

Docs say “Go 1.23+”; the module’s go.mod indicates 1.23.2. Align to “Go 1.23.2+”.

-    - Go 1.23+ installed
+    - Go 1.23.2+ installed

To confirm:

#!/bin/bash
curl -s https://raw.githubusercontent.com/android-sms-gateway/cli/HEAD/go.mod | sed -n 's/^go //p'

1-2: Resolve markdownlint MD046 errors (fenced code blocks with titles)

markdownlint flags fenced code blocks on this page. Disable MD046 for this file to accommodate titled fences used by the docs tooling.

+<!-- markdownlint-disable MD046 -->
 # Integration - CLI Tool 💻
@@
-For more information about integrating the SMS Gateway, explore the following resources:
+For more information about integrating the SMS Gateway, explore the following resources:
@@
 - [:material-github: CLI Repository](https://github.com/android-sms-gateway/cli)
 - [:material-api: API Reference](./api.md)
+
+<!-- markdownlint-enable MD046 -->

Also applies to: 278-284


9-16: Add Linux (arm64) install tab (parity with x86_64)

Linux (arm64) users aren’t covered. Provide an arm64 tab mirroring x86_64 with the correct asset name.

Apply:

 === ":material-linux: Linux (x86_64)"
 
     ```bash
     curl -LO https://github.com/android-sms-gateway/cli/releases/latest/download/smsgate_Linux_x86_64.tar.gz
     tar -xzf smsgate_Linux_x86_64.tar.gz
     chmod +x smsgate
     sudo mv smsgate /usr/local/bin/smsgate
     ```
+
+=== ":material-linux: Linux (arm64)"
+
+    ```bash
+    curl -LO https://github.com/android-sms-gateway/cli/releases/latest/download/smsgate_Linux_arm64.tar.gz
+    tar -xzf smsgate_Linux_arm64.tar.gz
+    chmod +x smsgate
+    sudo mv smsgate /usr/local/bin/smsgate
+    ```

Verify asset names exist (underscores vs hyphens) before merging:

#!/bin/bash
# Validate latest Linux asset names for both architectures
curl -s https://api.github.com/repos/android-sms-gateway/cli/releases/latest \
  | jq -r '.assets[].name' | grep -Ei '^smsgate(_|-)?Linux(_|-)?(x86_64|amd64|arm64).*'

18-25: Add macOS (Intel) variant + Gatekeeper tip + Apple Silicon PATH note

Only Apple Silicon is documented. Include Intel x86_64, and add a Gatekeeper and PATH note.

 === ":material-apple: macOS (Apple Silicon)"
 
     ```bash
     curl -LO https://github.com/android-sms-gateway/cli/releases/latest/download/smsgate_Darwin_arm64.tar.gz
     tar -xzf smsgate_Darwin_arm64.tar.gz
     chmod +x smsgate
     sudo mv smsgate /usr/local/bin/smsgate
     ```
+
+=== ":material-apple: macOS (Intel)"
+
+    ```bash
+    curl -LO https://github.com/android-sms-gateway/cli/releases/latest/download/smsgate_Darwin_x86_64.tar.gz
+    tar -xzf smsgate_Darwin_x86_64.tar.gz
+    chmod +x smsgate
+    sudo mv smsgate /usr/local/bin/smsgate
+    ```
+
+!!! tip "macOS Gatekeeper"
+    If you see “unidentified developer” errors, remove the quarantine attribute:
+    `xattr -d com.apple.quarantine /usr/local/bin/smsgate`
+
+!!! note
+    On Apple Silicon, Homebrew’s default prefix is `/opt/homebrew`. Ensure `/usr/local/bin` is on your `PATH`, or install to `/opt/homebrew/bin` instead.

29-32: Harden Windows install: target directory, extraction path, PATH update

The current Windows steps extract a zip but don’t place the binary in a stable location or add it to PATH.

-    ```powershell
-    Invoke-WebRequest https://github.com/android-sms-gateway/cli/releases/latest/download/smsgate_Windows_x86_64.zip -OutFile smsgate.zip
-    Expand-Archive smsgate.zip
-    ```
+    ```powershell
+    # Run PowerShell as Administrator
+    $dest = Join-Path $env:ProgramFiles 'SMSGATE'
+    New-Item -ItemType Directory -Force -Path $dest | Out-Null
+
+    Invoke-WebRequest https://github.com/android-sms-gateway/cli/releases/latest/download/smsgate_Windows_x86_64.zip -OutFile "$env:TEMP\smsgate.zip"
+    Expand-Archive -Force "$env:TEMP\smsgate.zip" -DestinationPath $dest
+
+    # Optionally add to PATH for current user (new shells only)
+    if (-not ($env:Path -split ';' | Where-Object { $_ -eq $dest })) {
+      setx PATH "$($env:Path);$dest"
+    }
+
+    Write-Host "Installed to $dest. You may need to open a new terminal."
+    ```
🧹 Nitpick comments (1)
docs/integration/cli.md (1)

54-55: Optional: clarify “supported platforms” link to include architectures

Consider explicitly mentioning both OS and CPU architectures (x86_64/arm64) so users know to pick the right asset.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e1d84e4 and 969813f.

📒 Files selected for processing (1)
  • docs/integration/cli.md (9 hunks)
🧰 Additional context used
🪛 markdownlint-cli2 (0.17.2)
docs/integration/cli.md

64-64: Code block style
Expected: indented; Actual: fenced

(MD046, code-block-style)


206-206: Code block style
Expected: indented; Actual: fenced

(MD046, code-block-style)


224-224: Code block style
Expected: indented; Actual: fenced

(MD046, code-block-style)


231-231: Code block style
Expected: indented; Actual: fenced

(MD046, code-block-style)


246-246: Code block style
Expected: indented; Actual: fenced

(MD046, code-block-style)


256-256: Code block style
Expected: indented; Actual: fenced

(MD046, code-block-style)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Cloudflare Pages
🔇 Additional comments (2)
docs/integration/cli.md (2)

119-121: Good catch: option name consistency uses kebab-case

The conflict note consistently references --valid-until (kebab-case). This fixes the prior camelCase mismatch.


126-128: “Disabling booleans” note is clear and actionable

Explicit --delivery-report=false guidance reduces ambiguity across shells.

@capcom6 capcom6 merged commit be502f8 into master Aug 12, 2025
2 checks passed
@capcom6 capcom6 deleted the integration/add-new-cli-options branch August 12, 2025 01:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant