{"id":13711566,"url":"https://github.com/petarov/apns-push-cmd","last_synced_at":"2025-03-19T20:31:56.798Z","repository":{"id":77497030,"uuid":"302979165","full_name":"petarov/apns-push-cmd","owner":"petarov","description":"Send Apple push notifications from your command line","archived":false,"fork":false,"pushed_at":"2025-03-13T08:50:45.000Z","size":99,"stargazers_count":4,"open_issues_count":0,"forks_count":4,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-13T09:36:26.012Z","etag":null,"topics":["apns","apns-http2","apns2","apple","apple-push-notifications","mdm","push-notifications"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/petarov.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":"2020-10-10T19:53:20.000Z","updated_at":"2025-03-13T08:49:42.000Z","dependencies_parsed_at":null,"dependency_job_id":"740be291-110a-454f-9628-438b65aff749","html_url":"https://github.com/petarov/apns-push-cmd","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/petarov%2Fapns-push-cmd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/petarov%2Fapns-push-cmd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/petarov%2Fapns-push-cmd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/petarov%2Fapns-push-cmd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/petarov","download_url":"https://codeload.github.com/petarov/apns-push-cmd/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244019365,"owners_count":20384743,"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":["apns","apns-http2","apns2","apple","apple-push-notifications","mdm","push-notifications"],"created_at":"2024-08-02T23:01:09.443Z","updated_at":"2025-03-19T20:31:56.418Z","avatar_url":"https://github.com/petarov.png","language":"Go","funding_links":[],"categories":["Tools :hammer_and_wrench:"],"sub_categories":[],"readme":"APNs Command Line Push\n===================================================\n\n![build](https://github.com/petarov/apns-push-cmd/workflows/CI%20Build/badge.svg)\n[![goreport](https://goreportcard.com/badge/github.com/petarov/apns-push-cmd)](https://goreportcard.com/report/github.com/petarov/apns-push-cmd)\n\n\u003cimg align=\"right\" src=\"apnsicon.png\"\u003e Send your push notifications to Apple Push Notification service from the command line using HTTP/2.\n\nAuthentication Mechanism         | Supported\n---------------------------------|------------------------\n Provider Authentication Tokens  | yes :white_check_mark:\n APNs provider certificate       | yes :white_check_mark:\n\n# Installation\n\n[Download binaries](https://github.com/petarov/apns-push-cmd/releases/tag/latest) for Linux, macOS and Windows.\n\n# Usage\n\nSend a push notification to your app using certificate-based authentication:\n\n    apnscmd_linux_amd64 -cert-file app-cert.pem -cert-key app-private.pem \\\n        -token c7b68e4eb7d604876bf5836133479ffa49449c669f7e6b79318ae59032e83c24 \\\n        -topic com.my.app\n\nSend an MDM push notification using certificate-based authentication with a PKCS#12 keystore and Base64 encoded device token:\n\n    apnscmd_linux_amd64 -cert-p12 apns.p12 -cert-pass \u003cmy password\u003e \\\n        -token 'v2RwEsm69Go4aY4vSFY2pRLped2BMqETO3gDGBx7XmxKwSaKtZik7Q==' \\\n        -topic com.apple.mgmt.External.462ad9c3-7ca1-437b-8c6f-5575941a4ea7 \\\n        -mdm-magic 1AA91790-BA78-4DBF-9102-FBA06E6110C4\n\nSend a push notification to your app using token-based authentication:\n\n    apnscmd_linux_amd64 -auth-token AuthKey_BBC42Y2321.p8 -key-id BBC42Y2321 -team-id YXB7430FC8 \\\n        -token c7b68e4eb7d604876bf5836133479ffa49449c669f7e6b79318ae59032e83c24 \\\n        -topic com.my.app\n\nSend a custom push notification to your app using token-based authentication with the JSON message specified in the command line:\n\n    apnscmd_linux_amd64 -auth-token AuthKey_BBC42Y2321.p8 -key-id BBC42Y2321 -team-id YXB7430FC8 \\\n        -token c7b68e4eb7d604876bf5836133479ffa49449c669f7e6b79318ae59032e83c24 \\\n        -topic com.my.app -alert-json '{\"aps\": {\"alert\" : \"test\", \"sound\": \"default\"}, \"custom\":\"custom value\"}'\n\n\nSend a custom push notification to your app using token-based authentication with the JSON message read from a file:\n\n    apnscmd_linux_amd64 -auth-token AuthKey_BBC42Y2321.p8 -key-id BBC42Y2321 -team-id YXB7430FC8 \\\n        -token c7b68e4eb7d604876bf5836133479ffa49449c669f7e6b79318ae59032e83c24 \\\n        -topic com.my.app -alert-filename custom.json\n\n\nShow all available arguments:\n\n    apnscmd_linux_amd64 -h\n\nThe `-auth-token` argument always takes prescedence overt the `-cert-*` arguments.\n\n## Extract keys from PKCS#12\n\nIf you're using a PKCS#12 keystore, then it must be [DER](https://en.wikipedia.org/wiki/X.690#DER_encoding) encoded. [BER](https://en.wikipedia.org/wiki/X.690#BER_encoding) encoded keystores are not supported. You'll need to manually break down a BER encoded keystore into certificate and private key files.\n\nTo extract private key file from a PKCS#12 container use:\n\n    openssl pkcs12 -info -in apns-production.p12 -nodes -nocerts -out apns-private.pem\n\nTo extrcat certificate file from a PKCS#12 container use:\n\n    openssl pkcs12 -info -in apns-production.p12 -nokeys -out apns-cert.pem\n\n# Development\n\n  - [Sending Notification Requests to APNs](https://developer.apple.com/documentation/usernotifications/setting_up_a_remote_notification_server/sending_notification_requests_to_apns/)\n  - [Communicating with APNs](https://developer.apple.com/library/archive/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/CommunicatingwithAPNs.html)\n\n# License\n\n[MIT](LICENSE)\n\nREADME icon by [Freepik](http://www.freepik.com/) from [Flaticon](https://www.flaticon.com/).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpetarov%2Fapns-push-cmd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpetarov%2Fapns-push-cmd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpetarov%2Fapns-push-cmd/lists"}