{"id":24987407,"url":"https://github.com/sergi/siphon","last_synced_at":"2025-07-04T09:31:59.099Z","repository":{"id":57705454,"uuid":"115757100","full_name":"sergi/siphon","owner":"sergi","description":"Stream commands output to your browser","archived":false,"fork":false,"pushed_at":"2018-02-17T21:31:00.000Z","size":22,"stargazers_count":8,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-04T00:35:58.900Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sergi.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}},"created_at":"2017-12-29T22:05:09.000Z","updated_at":"2023-03-06T23:58:53.000Z","dependencies_parsed_at":"2022-09-26T21:11:17.970Z","dependency_job_id":null,"html_url":"https://github.com/sergi/siphon","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sergi%2Fsiphon","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sergi%2Fsiphon/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sergi%2Fsiphon/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sergi%2Fsiphon/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sergi","download_url":"https://codeload.github.com/sergi/siphon/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248497901,"owners_count":21113982,"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":[],"created_at":"2025-02-04T11:42:56.645Z","updated_at":"2025-04-11T23:41:10.216Z","avatar_url":"https://github.com/sergi.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"### Siphon - Stream commands output to your browser\n\nSiphon is an application and a library consisting of a client and a server that communicate through UDP. The client `siph` accepts stdin and streams it to the server. There can be as many clients streaming to the server, each with its own id.\n\nThe server emits data via websockets to any listener that connects to it\n\n### Usage\n\nYou can simply use the siphone CLI application, or use it programmatically as a library.\n\n#### Command Line Usage\n\n```sh\n$ # Start a streaming client that sends command stdout output to a server.\n$ # the id and adderss flags are both optional, with the id defaulting to a\n$ # random string and the default server address defaulting to \"127.0.0.1:1200\"\n$ yourprogram | siph client id=\"myClient\" address=\"127.0.0.1:1200\"\n\n$ # Start a UDP/WebSockets server. The defaults for udp and websockets port are\n$ # 1200 and 3000, respectively.\n$ siph server --udp-port=1200 --ws-port=3000\n```\n\nTo see other options and flags use `siph --help` or `siph \u003ccommand\u003e --help`.\n\n#### As a library\n\nTo run as a server:\n\n```go\n// NewServer signature: NewServer(udpPort int, wsPort int) *Server\nserver := siphon.NewServer(1200, 3000)\nerr := server.Init()\nif err != nil {\n    fmt.Println(err)\n    os.Exit(ExitCodeError)\n}\n```\n\nTo run as a client:\n```go\n// Init signature: Init(address string, id string, stream *bufio.Reader, emitOutput bool) error\nerr := siphon.Init(\"127.0.0.1:1200\", \"myclient\", bufio.NewReader(os.Stdin), true)\nif err != nil {\n    fmt.Fprintln(os.Stderr, err)\n    os.Exit(ExitCodeError)\n}\n```\n### How it works\n\n### License\n\nSee LICENSE\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsergi%2Fsiphon","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsergi%2Fsiphon","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsergi%2Fsiphon/lists"}