Docs / Getting Started / Getting Started

Getting Started

Get an SMS notification when any long-running command finishes. No SDK, no dependencies — just curl.

1

Prerequisites

All you need is curl (installed on virtually every system) and a phone that can receive SMS. nudge.sh works with phone numbers in 20+ countries.

2

Get Your API Token

Sign up at nudge.sh and grab your API token from the dashboard. Store it as an environment variable so your scripts can use it:

bash
# Add to your ~/.bashrc or ~/.zshrc export NUDGE_TOKEN="your-api-token-here"
3

Send Your First Nudge

Append a curl call after any long-running command. When the command finishes, you will get a text message within seconds:

bash
# Run your build, then nudge yourself npm run build && curl https://nudge.sh/$NUDGE_TOKEN -d status="done"

Or capture the exit code and duration automatically:

bash
# With timing and exit code START=$(date +%s) npm run build EXIT_CODE=$? DURATION=$(( $(date +%s) - $START )) curl -s https://nudge.sh/$NUDGE_TOKEN \ -d status="done" \ -d exit_code=$EXIT_CODE \ -d duration=$DURATION

What You Receive

Within seconds, you will receive an SMS on your verified phone number:

SMS Preview
✓ Done (3m 42s)
nudge.sh/r/a8f3k2

POST Parameters

Send a POST request to https://nudge.sh/{token} with the following parameters:

Parameter Type Description
statusREQUIRED string A short status label, e.g. done, failed, deployed. Appears as the headline of your SMS.
exit_code integer The exit code of the completed process. 0 is treated as success, anything else as failure.
duration integer Elapsed time in seconds. Automatically formatted as human-readable (e.g. "3m 42s") in the SMS.
output string Command output or logs (max 50KB). Viewable via the link in the SMS. Not included in the message body itself.
message string Optional custom message body. Overrides the default format entirely.
label string A label for the task, e.g. prod-deploy or ml-training. Helps you identify which job sent the nudge.
That's it

No SDK, no config files, no background daemon. Every nudge is a single stateless HTTP call. Pipe it after any command in any language on any OS.

SMS length limit

SMS messages are limited to 160 characters. If your status and label exceed this, the message will be truncated. Use the output parameter for longer content -- it is stored on the server and accessible via the link in the SMS.

Next Steps