{"id":50089604,"url":"https://github.com/grunch/nostr-publisher-template","last_synced_at":"2026-05-22T22:10:10.020Z","repository":{"id":357425140,"uuid":"1236906276","full_name":"grunch/nostr-publisher-template","owner":"grunch","description":null,"archived":false,"fork":false,"pushed_at":"2026-05-12T17:57:42.000Z","size":21,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-12T19:30:44.178Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/grunch.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-05-12T17:28:32.000Z","updated_at":"2026-05-12T17:57:47.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/grunch/nostr-publisher-template","commit_stats":null,"previous_names":["grunch/nostr-publisher-template"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/grunch/nostr-publisher-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grunch%2Fnostr-publisher-template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grunch%2Fnostr-publisher-template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grunch%2Fnostr-publisher-template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grunch%2Fnostr-publisher-template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/grunch","download_url":"https://codeload.github.com/grunch/nostr-publisher-template/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grunch%2Fnostr-publisher-template/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33372740,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-22T21:56:13.512Z","status":"ssl_error","status_checked_at":"2026-05-22T21:56:10.769Z","response_time":265,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":[],"created_at":"2026-05-22T22:10:01.049Z","updated_at":"2026-05-22T22:10:10.015Z","avatar_url":"https://github.com/grunch.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# nostr-publisher-template\n\nMinimal Rust template for publishing notes to Nostr with `nostr-sdk 0.44.1`.\n\n## What it does\n\n- loads `NOSTR_NSEC` or `--secret-key`\n- loads relays from `--relay` and/or `NOSTR_RELAYS`\n- uses a built-in base relay set if none is provided\n- expands the built-in relay set with `--all-relays`\n- normalizes relays by removing trailing `/` and deduplicates the list\n- publishes a `kind 1` text note\n- prints `event_id`, successful relays, and failed relays\n- attempts to verify the event by `id` on the configured relays\n\n## Relay priority\n\n1. repeated `--relay` flags in the CLI\n2. `NOSTR_RELAYS` as a comma-separated list\n3. built-in relays by default\n4. if you pass `--all-relays`, the expanded relay list is added too\n\n## Quick start\n\n```bash\ncp .env.example .env\n# fill in NOSTR_NSEC and, if you want, NOSTR_RELAYS\ncargo run -- --content \"Hello Nostr\"\n```\n\nOr with flags:\n\n```bash\ncargo run -- \\\n  --secret-key \"nsec1...\" \\\n  --relay wss://relay.damus.io \\\n  --relay wss://nos.lol/ \\\n  --content \"Hello Nostr\"\n```\n\nTo use the expanded relay list:\n\n```bash\ncargo run -- --all-relays --content \"Hello Nostr\"\n```\n\n## Notes\n\n- `npub` is not enough to publish.\n- If there are no explicit relays, the binary uses the built-in base set.\n- Relay verification may take a little while depending on indexing.\n- URLs are normalized to remove trailing slashes, so `wss://nos.lol/` and `wss://nos.lol` are treated the same.\n- For Notion posts with media:\n  - the script downloads the attachment and uploads it to nostr.build using `NOSTR_BUILD_NPUB` and `NOSTR_BUILD_PASSWD`\n  - if the attachment is already hosted on nostr.build, the script reuses that public URL as-is\n  - the public URL returned by nostr.build is the one used in the Nostr post\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgrunch%2Fnostr-publisher-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgrunch%2Fnostr-publisher-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgrunch%2Fnostr-publisher-template/lists"}