{"id":13832782,"url":"https://github.com/blakejakopovic/nostcat","last_synced_at":"2025-07-09T19:31:22.481Z","repository":{"id":63419884,"uuid":"566981687","full_name":"blakejakopovic/nostcat","owner":"blakejakopovic","description":"Websocket client for nostr relay scripting","archived":false,"fork":false,"pushed_at":"2023-11-24T12:57:24.000Z","size":93,"stargazers_count":94,"open_issues_count":2,"forks_count":12,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-05-17T12:02:59.944Z","etag":null,"topics":["cli","nostr","nostr-protocol","rust","websocat","websocket"],"latest_commit_sha":null,"homepage":"","language":"Rust","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/blakejakopovic.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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}},"created_at":"2022-11-16T20:28:12.000Z","updated_at":"2024-04-20T19:43:18.000Z","dependencies_parsed_at":"2024-01-13T16:31:43.976Z","dependency_job_id":"868b19a5-7585-43ef-9318-9a19ef44e841","html_url":"https://github.com/blakejakopovic/nostcat","commit_stats":{"total_commits":41,"total_committers":3,"mean_commits":"13.666666666666666","dds":0.4390243902439024,"last_synced_commit":"6019487899513c7fc711b9a9c07e4517c5de19e2"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blakejakopovic%2Fnostcat","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blakejakopovic%2Fnostcat/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blakejakopovic%2Fnostcat/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blakejakopovic%2Fnostcat/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/blakejakopovic","download_url":"https://codeload.github.com/blakejakopovic/nostcat/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225581836,"owners_count":17491794,"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":["cli","nostr","nostr-protocol","rust","websocat","websocket"],"created_at":"2024-08-04T11:00:30.585Z","updated_at":"2024-11-20T15:31:05.838Z","avatar_url":"https://github.com/blakejakopovic.png","language":"Rust","funding_links":[],"categories":["Tools"],"sub_categories":["Client reviews and/or comparisons"],"readme":"# nostcat\n[![Crates.io](https://img.shields.io/crates/v/nostcat)](https://crates.io/crates/nostcat)\n[![Crates.io](https://img.shields.io/crates/d/nostcat)](https://crates.io/crates/nostcat)\n[![Crates.io](https://img.shields.io/crates/l/nostcat)](https://github.com/blakejakopovic/nostcat/blob/master/LICENSE)\n\nWebsocket client command line tool for nostr relay scripting, with docker and tor support\n\n\n## Examples\n\nUsing interactive input\n```shell\n$ nostcat wss://relay.damus.io \u003creturn\u003e\n[\"REQ\", \"RAND\", {\"kinds\": [1], \"limit\": 8}] \u003creturn\u003e\n\u003cctrl-D\u003e\n```\n\nUsing stdin (supports multiple lines of commands)\n```shell\n$ echo '[\"REQ\", \"RAND\", {\"kinds\": [1], \"limit\": 8}]' |\n  nostcat wss://relay.damus.io\n\n$ cat commands.txt\n[\"REQ\", \"RAND\", {\"kinds\": [1], \"limit\": 2}]\n[\"REQ\", \"RAND2\", {\"kinds\": [2], \"limit\": 2}]\n\n$ cat commands.txt | nostcat wss://relay.damus.io\n\n```\n\nUsing jq to query Nostr JSON events and select the event JSON\n```shell\n$ echo '[\"REQ\", \"RAND\", {\"kinds\": [1], \"limit\": 8}]' |\n  nostcat wss://relay.damus.io |\n  jq '.[2]'\n\n$ echo '[\"REQ\", \"RAND\", {\"kinds\": [1], \"limit\": 8}]' |\n  nostcat wss://relay.damus.io |\n  jq '.[2].content'\n```\n\nUnique (dedupe) results as they come in (note: no longer applies sorting events - FIFO)\n```shell\n$ echo '[\"REQ\", \"RAND\", {\"kinds\": [1], \"limit\": 8}]' |\n  nostcat --unique wss://relay.damus.io wss://nostr.ono.re\n```\n\nWith a websocket connection timeout in milliseconds\n```shell\n$ echo '[\"REQ\", \"RAND\", {\"kinds\": [1], \"limit\": 2}]' |\n  nostcat --connect-timeout 250 wss://relay.damus.io\n```\n\n\nStream websocket data (like tail -f)\n```shell\n$ echo '[\"REQ\", \"RAND\", {\"kinds\": [1], \"limit\": 8}]' |\n  nostcat --stream wss://relay.damus.io\n```\n\nOutput info log messages which can assist with debugging\n```shell\n$ echo '[\"REQ\", \"RAND\", {\"kinds\": [1], \"limit\": 8}]' |\n  RUST_LOG=info nostcat wss://relay.damus.io\n```\n\nPipe events from one server to another (currently limited to 1 event at a time)\n```shell\n$ echo '[\"REQ\", \"RAND\", {\"limit\": 1}]' |\n  nostcat wss://relay.damus.io |\n  jq -c 'del(.[1])' |\n  nostcat wss://nostr.ono.re\n```\n\nPipe events from one server to another (for multiple events, `ctrl-C` when finished)\n```shell\n$ echo '[\"REQ\", \"RAND\", {\"limit\": 3}]' |\n  nostcat wss://relay.damus.io |\n  jq -c 'del(.[1])' |\n  nostcat --stream wss://nostr.ono.re\n  \u003cctrl-C\u003e\n```\n\n\n## Getting started\nUsing Cargo to install (requires ~/.cargo/bin to be in PATH)\n```shell\n$ cargo install nostcat\n```\n\nBuilding from source (may be unstable)\n```shell\n$ git clone https://github.com/blakejakopovic/nostcat\n$ cargo build --release\n```\n\nRunning inside a Docker image\n```shell\n$ docker build -t nostcat .\n\n# Run the the docker image as an executable\n$ echo '[\"REQ\", \"RAND\", {\"kinds\": [1], \"limit\": 2}]' | docker run --rm -i nostcat wss://relay.damus.io\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblakejakopovic%2Fnostcat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fblakejakopovic%2Fnostcat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblakejakopovic%2Fnostcat/lists"}