Official shell script library for Pincho - Send push notifications from shell scripts, cron jobs, and automation workflows. POSIX sh compatible, zero dependencies (only curl).
curl -sL https://raw.githubusercontent.com/Pincho-App/pincho-sh/main/install.sh | shGet your token: Open app → Settings → Help → copy token
# Source the library
. /usr/local/lib/pincho/pincho.sh
# Set your token
export PINCHO_TOKEN="your_token"
# Send a notification
pincho_send "Deploy Complete" "Version 1.2.3 deployed to production"#!/bin/sh
. /usr/local/lib/pincho/pincho.sh
# Basic notification
pincho_send "Title" "Message"
# With all options
pincho_send \
--title "Deploy Complete" \
--message "Version 1.2.3 deployed" \
--type "deployment" \
--tag "prod" \
--tag "release" \
--image "https://example.com/image.png" \
--action "https://example.com/dashboard"Arguments:
--title TEXT- Title (required, max 256 chars)--message TEXT- Message (required, max 4096 chars)--type TEXT- Type for categorization--tag TEXT- Tag (repeatable, max 10)--image URL- Image URL--action URL- Action URL--token TEXT- API token (overridesPINCHO_TOKENenv var)
Exit codes: 0=success, 1=auth error, 2=validation error, 3=rate limit, 4=network error
Shorthand: pincho_send "Title" "Message"
Environment variables:
PINCHO_TOKEN(required) - Your API tokenPINCHO_URL(optional) - API endpoint (default: https://api.pincho.app/send)PINCHO_LAST_RATE_*(exported) - Rate limit info after each request
Convert text to notifications using AI. Useful for automation workflows where you have free-form text that should become a structured notification.
Arguments:
--text TEXT- Text to convert (required, 5-2500 chars)--type TEXT- Type for categorization--token TEXT- API token (overridesPINCHO_TOKENenv var)
Exit codes: Same as pincho_send
Shorthand: pincho_notifai "Deploy server and restart services"
Example:
pincho_notifai "SSL cert expires in 7 days - renew now"
pincho_notifai --text "Build failed with 3 errors" --type "ci-cd"For better array handling: . /usr/local/lib/pincho/pincho-bash.sh (requires Bash 4.0+)
Not supported in shell scripts. Use CLI tool or language SDKs (Go, Python, JS, PHP, C#, Rust) for encryption.
See examples/ directory for complete scripts: cron jobs, git hooks, CI/CD, monitoring, error handling, rate limits, parallel sending.
- Advanced Usage - Error handling, integrations, best practices
- Examples Guide - Detailed example walkthrough
- Security - Security best practices
- Website: https://pincho.app
- Repository: https://github.com/Pincho-App/pincho-sh
- CLI Tool: https://github.com/Pincho-App/pincho-cli
MIT License - see LICENSE file for details.