{"id":23938044,"url":"https://github.com/virtuallyaverage/basic-mdns-cli","last_synced_at":"2025-10-26T15:04:14.037Z","repository":{"id":270924030,"uuid":"911864573","full_name":"virtuallyaverage/basic-mdns-cli","owner":"virtuallyaverage","description":"Provides a basic CLI interface to find local MDNS devices. Intended as a sidecar for existing projects","archived":false,"fork":false,"pushed_at":"2025-01-25T20:44:57.000Z","size":23,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-25T21:25:08.324Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C#","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/virtuallyaverage.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":"2025-01-04T03:43:13.000Z","updated_at":"2025-01-25T20:43:05.000Z","dependencies_parsed_at":null,"dependency_job_id":"84d8e9ea-3bc7-40f1-a9fa-4b940702ec70","html_url":"https://github.com/virtuallyaverage/basic-mdns-cli","commit_stats":null,"previous_names":["virtuallyaverage/basic-mdns-cli"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/virtuallyaverage%2Fbasic-mdns-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/virtuallyaverage%2Fbasic-mdns-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/virtuallyaverage%2Fbasic-mdns-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/virtuallyaverage%2Fbasic-mdns-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/virtuallyaverage","download_url":"https://codeload.github.com/virtuallyaverage/basic-mdns-cli/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240415209,"owners_count":19797599,"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-01-06T02:17:55.050Z","updated_at":"2025-10-26T15:04:14.025Z","avatar_url":"https://github.com/virtuallyaverage.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# How to Use: DEPRECATED, no longer needed\r\nDownload the executable from the releases and run it in powershell or a command prompt. \r\nSetting the ParentProcessId to 0 disables the parent tracking functionality.\r\n```\r\nUsage: \u003cParentProcessId\u003e \u003cMdnsID\u003e [--debug]\r\n``` \r\n**Example**:\r\n\r\nTo find haptic devices:\r\n\r\n`./mdns-cli-\u003cversion\u003e 0 \"_haptics._udp.local\" --debug`\r\n\r\n## Output:\r\n\r\nThis sidecar outputs in the format: `\u003clog_type\u003e:\u003clog info\u003e ` with the flags:\r\n```csharp\r\npublic enum LogType\r\n    {\r\n        DBUG, // enabled with --debug flag\r\n        EROR, // caused the system to fail\r\n        WARN, // will be presented, but don't contain info\r\n        _ADD, // device added + new device info.\r\n        _RMV, // device removed + old device info.\r\n        _CHG, // device details updated + new device info (has the same MAC address)\r\n    }\r\n```\r\nAll flags that contain info are returned in `.json` format immediately after the semicolon symbol\r\n\r\nExample output:\r\n``` \r\nDBUG:Logging with debug mode True\r\nDBUG:Using MdnsID: ._haptics._udp.local\r\nDBUG:Parent process ID is zero; will not close program automatically.\r\n_ADD:{ \"MAC\": \"7C:2C:67:C8:A4:64\", \"IP\": \"192.168.1.101\", \"DisplayName\": \"vest_b\", \"Port\": 1027, \"TTL\": 120 }\r\n_ADD:{ \"MAC\": \"7C:2C:67:C9:3E:70\", \"IP\": \"192.168.1.100\", \"DisplayName\": \"vest_f\", \"Port\": 1027, \"TTL\": 120 }\r\n```\r\n\r\nThis program keeps track of devices by their MAC address reported in a TXT packet. \r\nBecause of that, it is required that a device reports its mac address keyed by `MAC` e.g:`MAC=7C:2C:67:C9:3E:70`\r\nEnable the debug flag to get all detected devices reported.\r\n\r\n\r\n## Implementations\r\nRust:\r\n```rs\r\nuse std::process::{Command, Stdio};\r\nfn main() {\r\nlet output = Command::new(\"path/to/mdns-cli\")\r\n.arg(\"0\")\r\n.arg(\"_haptics._udp.local\")\r\n.output()\r\n.expect(\"Failed to execute command\");\r\nprintln!(\"stdout: {}\", String::from_utf8_lossy(\u0026output.stdout));\r\n}\r\n```\r\n\r\nTypescript:\r\n```ts\r\nconst { exec } = require('child_process');\r\nexec(`path/to/mdns-cli 0 _haptics._udp.local`, (error, stdout, stderr) =\u003e {\r\n  if (error) console.error(`Error: ${error.message}`);\r\n  else console.log(stdout);\r\n});\r\n```\r\n\r\nPython:\r\n```python\r\nimport subprocess\r\nresult = subprocess.run(['path/to/mdns-cli', '0', '_haptics._udp.local'], capture_output=True)\r\n```\r\n\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvirtuallyaverage%2Fbasic-mdns-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvirtuallyaverage%2Fbasic-mdns-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvirtuallyaverage%2Fbasic-mdns-cli/lists"}