Questions and messages
Send your own alerts and questions from any terminal or script.
Send a message
greatping notify "Deploy finished" --title "staging"The command returns once the service has queued the message. That does not prove a device displayed it; while the computer is paused, the message is listed in the app without ringing anyone.
Ask a question
greatping ask "Ship to production?"Reply in your own words in the GreatPing app. The command waits, then prints your answer in the terminal:
Wait until the migration finishes.ask waits for your answer and prints only the answer on standard output, so it works in scripts. Messages and progress go to standard error.
- Without
--choices, the question takes your own words. - With
--choices, only one of them is accepted. Add--allow-textto accept your own words too. --timeout 5msets how long to wait (default 30 minutes).- A Yes/No question gets Yes and No buttons right in the notification, and Reply when your own words are allowed.
Exit codes: 0 answered, 2 the question ended without an answer (expired or withdrawn), 3 an answer arrived that could not be verified, 130/143 interrupted. Interrupting ask withdraws the question from your devices.
An answer counts only if a device of your account signed it, for this question, and it is one of the choices or allowed text. Anything else is refused and the question is withdrawn.
Know when a long command ends
greatping run -- pnpm testYou get one alert when the command ends: "pnpm test succeeded, Finished in 4m 12s" or "pnpm test failed, Exit code 1 after 4m 12s". Only the program and a plain-word subcommand are named; arguments never leave the computer, since they can hold tokens or paths.
--on-failalerts only on failure.--titlenames the alert yourself.runexits with the command's own exit code. An interrupted command alerts nobody.- The command runs directly, not through a shell. For pipelines, use
greatping run -- sh -c "…".
Privacy
The text, title and choices of questions and messages, and your answers, are end-to-end encrypted to your own devices. See Security.
GreatPing