{"id":13832839,"url":"https://github.com/UTXOnly/nostpy-cli","last_synced_at":"2025-07-09T20:30:41.403Z","repository":{"id":237125668,"uuid":"793861685","full_name":"UTXOnly/nostpy-cli","owner":"UTXOnly","description":"Command line nostr client","archived":false,"fork":false,"pushed_at":"2024-11-18T01:05:54.000Z","size":35,"stargazers_count":4,"open_issues_count":1,"forks_count":3,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-06T14:40:22.509Z","etag":null,"topics":["nostr","nostr-client"],"latest_commit_sha":null,"homepage":"","language":"Python","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/UTXOnly.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,"zenodo":null}},"created_at":"2024-04-30T02:27:14.000Z","updated_at":"2025-04-09T17:28:33.000Z","dependencies_parsed_at":"2024-05-11T23:32:00.926Z","dependency_job_id":"b02acf04-d6cb-43fa-9383-774da08bd7cf","html_url":"https://github.com/UTXOnly/nostpy-cli","commit_stats":null,"previous_names":["utxonly/nostpy-cli"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/UTXOnly/nostpy-cli","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UTXOnly%2Fnostpy-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UTXOnly%2Fnostpy-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UTXOnly%2Fnostpy-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UTXOnly%2Fnostpy-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/UTXOnly","download_url":"https://codeload.github.com/UTXOnly/nostpy-cli/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UTXOnly%2Fnostpy-cli/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264502642,"owners_count":23618663,"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":["nostr","nostr-client"],"created_at":"2024-08-04T11:00:31.859Z","updated_at":"2025-07-09T20:30:41.358Z","avatar_url":"https://github.com/UTXOnly.png","language":"Python","funding_links":[],"categories":["Tools"],"sub_categories":["Client reviews and/or comparisons"],"readme":"# nostpy-cli\n\n`nostpy-cli` is a Command Line Interface tool for sending and querying nostr events by websocket connection.\n\n## Features\n\n- Send events to specified relays\n- Query events from specified relays\n- Encode/decode kind4 messages\n- Supports [NIP-50](https://github.com/nostr-protocol/nips/blob/master/50.md) searches\n\n## Prerequisites\n\nBefore installing `nostpy-cli`, ensure you have Python 3.6 or higher installed on your system. You can check your Python version by running:\n\n```\npython3 --version\n```\n## Installation\n\n### Install Using pip\nTo install using `pip` use the command below:\n```\npip install nostpy-cli\n```\n\n### Build from source\nClone the Repository\nFirst, clone the repository to your local machine:\n\n```\ngit clone https://github.com/UTXOnly/nostpy-cli.git\ncd nostpy-cli\npython3 -m build\npip install .\n```\n\n\n\n## Usage\nOnce installed, you can run `nostpy-cli` from the command line as shown below:\n\n### Send Event\nTo send an event:\n\n```\nnostpy-cli send_event -privkey \"your_private_key_hex\" -content \"your plaintext message\" -tags \"[['tag1', 'value1']]\" -kind 4 --relay \"wss://yourrelayurl.com\" \"wss://yoursecondrelayurl.com\"\n```\n`--priv_key` and `--relay` arguments are required, all else are optional\n\n#### Example\n* Send a kind 1 event with tags\n\n```\nnostpy-cli send_event -pubkey 5ce5b352f1ef76b1dffc5694dd5b34126137184cc9a7d78cba841c0635e17952 -privkey 2b1e4e1f26517dda57458596760bb3bd3bd3717083763166e12983a6421abc18 -content test27 -tags \"[\n['t', 'vvfdvfd'], ['v', 'v2']]\" -kind 1 --relay wss://relay.nostpy.lol wss://relay.damus.io wss://nos.lol\n```\n\n* Send a kind 4 direct message\n```\nnostpy-cli send_event -privkey 2b1e4e1f26517dda57458596760bb3bd3bd3717083763166e12983a6421abc18 -content \"This is my plaintext message\" -tags \"[['p', '4503baa127bdfd0b054384dc5ba82cb0e2a8367cbdb0629179f00db1a34caacc']]\" -kind 4 --relay wss://relay.nostpy.lol wss://relay.damus.io wss://nos.lol\n```\n\n### Query Event\nTo query events:\n\n```\nnostpy-cli query --kinds \"[1,9735]\" --relay \"wss://yourrelayurl.com\"\n```\n`--relay` field required\n\n#### Example\n* Query an event with search\n```\nnostpy-cli query -kinds \"[31990,1]\" -search \"random_search\" -since 1713629501 -authors aef0d6b212827f3ba1de6189613e6d4824f181f567b1205273c16895fdaf0b23 --relay wss://relay.nostpy.lol\n```\n\n### Decrypt kind4 message content\nDecrypt kind4 message content by providing recipient private key hex, sender public key hex and the message ciphertext, returns the plaintext message\n\n#### Example \n```\nnostpy-cli decrypt -content \"kP9dCG/stpEGNTjW2/aySQ==?iv=+GCHVOBAiM9X074n1vxiFg==\" -priv_key 2b1e4e1f26517dda57458596760bb3bd3bd3717083763166e12983a6421abc18 -sender_pubkey 4503baa127bdfd0b054384dc5ba82cb0e2a8367cbdb0629179f00db1a34caacc \n```\n### Help\nTo view all available commands and their options, use the help command:\n\n```\nnostpy-cli -h\n```\n\n```\nusage: nostpy-cli [-h] {query,send_event,decode} ...\n\nSend and query nostr events\n\noptions:\n  -h, --help            show this help message and exit\n\ncommands:\n  valid commands\n\n  {query,send_event,decode}\n                        additional help\n    query               Query events\n    send_event          Send an event\n    decode              Decode kind4 content\n\nExample send usage: nostpy-cli send_event -pubkey \"abc123...\" -privkey \"def456...\" -content \"Hello, world!\" --relay \"wss://example.com\"\n```\n## Contributing\nContributions to nostpy-cli are welcome! Please feel free to submit pull requests or open issues to report bugs or suggest enhancements.\n\n### License\nThis project is licensed under the MIT License - see the LICENSE file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FUTXOnly%2Fnostpy-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FUTXOnly%2Fnostpy-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FUTXOnly%2Fnostpy-cli/lists"}