{"id":24557835,"url":"https://github.com/timclicks/data-from","last_synced_at":"2026-02-17T08:33:44.676Z","repository":{"id":264937223,"uuid":"838275567","full_name":"timClicks/data-from","owner":"timClicks","description":null,"archived":false,"fork":false,"pushed_at":"2024-08-05T10:05:55.000Z","size":4,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"hero","last_synced_at":"2026-01-13T11:22:04.543Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","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/timClicks.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}},"created_at":"2024-08-05T10:05:22.000Z","updated_at":"2024-08-05T12:28:49.000Z","dependencies_parsed_at":"2024-11-27T00:16:49.182Z","dependency_job_id":null,"html_url":"https://github.com/timClicks/data-from","commit_stats":null,"previous_names":["timclicks/data-from"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/timClicks/data-from","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timClicks%2Fdata-from","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timClicks%2Fdata-from/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timClicks%2Fdata-from/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timClicks%2Fdata-from/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/timClicks","download_url":"https://codeload.github.com/timClicks/data-from/tar.gz/refs/heads/hero","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timClicks%2Fdata-from/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29537837,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-17T08:11:05.436Z","status":"ssl_error","status_checked_at":"2026-02-17T08:09:38.860Z","response_time":100,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: 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":"2025-01-23T05:29:39.450Z","updated_at":"2026-02-17T08:33:44.662Z","avatar_url":"https://github.com/timClicks.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# data-from\n\nA fairly opinionated tool that provides the output of commands that typically\nneed post-processing with sed, grep as structured data. Inspired loosely by\nPowershell and Nushell, and generally by the idea that stringly-typed data can\nmake life harder than it needs to be.\n\nProvides output as _ndjson_ (\"Newline-delimited JSON\"), which is also known as the\n_json-lines_ format.\n\n## Status\n\nJust a prototype at this stage. Seeking feedback.\n\n## Usage and operation\n\nGenerally speaking, you either pipe the output of the intended command (with the\nnecessary arguments to enable parsing by machine) and provide the source\nprefixed with a double-dash, or provide the command's name as the first argument.\n\nFor example, consider `lspci`. The following two forms produce equivalent output:\n\n    data-from lspci\n    lspci -vmm -nn | data-from --lspci\n\nNote: Failing to provide the information in the intended way will cause\n`data-from` to fail. For example, omitting the `-vmm -nn` flags from `lspci`\nmeans that `data-from` won't be able to parse the output correctly.\n\nWhen you provide a command's name, rather than sending data to stdin,\n`data-from` will invoke the command on its own within a sub-process.\n\n### lspci\n\nTo list PCI interfaces, you can either request that `data-from` invokes `lspci`\nitself (`data-from lspci`), or you can pipe data into `data-from` (`lspci -vmm -nn | data-from --lspci`).\n\nExample output (with some formatting applied):\n\n```console\n$ data-from lspci\n...\n{\n  \"slot\": \"6c:00.0\",\n  \"device\": \"RTS5260 PCI Express Card Reader\",\n  \"device-code\": { \"hex\": [\"52\", \"60\"], \"int\": [82, 96] },\n  \"sub-device\": \"RTS5260 PCI Express Card Reader\",\n  \"sub-device-code\": { \"hex\": [\"09\", \"7d\"], \"int\": [9, 125] },\n  \"class\":\"Unassigned class\",\n  \"class-code\": { \"hex\": [\"ff\", \"00\"], \"int\": [255, 0] },\n  \"vendor\":\"Realtek Semiconductor Co., Ltd.\",\n  \"vendor-code\": { \"hex\": [\"10\", \"ec\"], \"int\": [16, 236] },\n  \"sub-vendor\": \"Dell\",\n  \"sub-vendor-code\": { \"hex\": [\"10\", \"28\"], \"int\": [16, 40] },\n  \"revision\": 1,\n  \"programming-interface\": null\n}\n```\n\nThe `*-code` values are the numbers supplied by the devices themselves. To match\nthese codes to names, your computer typically makes a lookup to the [PCI ID\nRepository](https://pci-ids.ucw.cz/).\n\n## Alternatives\n\n- \"grep and hope\"\n- `jc` is a Python tool which is much more complete. It requires a Python\n  interpreter and only produces JSON. The JSON output is typically wrapped in an\n  array, which makes it difficult for follow-on tools which expect input line-by-line.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimclicks%2Fdata-from","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftimclicks%2Fdata-from","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimclicks%2Fdata-from/lists"}