{"id":20642407,"url":"https://github.com/ipld/go-fixtureplate","last_synced_at":"2026-02-28T12:02:45.252Z","repository":{"id":196719724,"uuid":"696611237","full_name":"ipld/go-fixtureplate","owner":"ipld","description":"Tools to generate and inspect IPLD data to assist in testing","archived":false,"fork":false,"pushed_at":"2026-02-24T02:26:43.000Z","size":220,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":11,"default_branch":"master","last_synced_at":"2026-02-24T08:51:43.370Z","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":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ipld.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-09-26T05:12:34.000Z","updated_at":"2026-02-24T02:26:46.000Z","dependencies_parsed_at":"2024-01-02T03:21:34.023Z","dependency_job_id":"fea22e9f-0d97-4a16-9c8b-23862a1e2b91","html_url":"https://github.com/ipld/go-fixtureplate","commit_stats":null,"previous_names":["ipld/go-fixtureplate"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/ipld/go-fixtureplate","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ipld%2Fgo-fixtureplate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ipld%2Fgo-fixtureplate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ipld%2Fgo-fixtureplate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ipld%2Fgo-fixtureplate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ipld","download_url":"https://codeload.github.com/ipld/go-fixtureplate/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ipld%2Fgo-fixtureplate/sbom","scorecard":{"id":493901,"data":{"date":"2025-08-11","repo":{"name":"github.com/ipld/go-fixtureplate","commit":"1c979bd1f7645aa89a1c17eec6ff929a86c50561"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.3,"checks":[{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Maintained","score":1,"reason":"2 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 1","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Code-Review","score":1,"reason":"Found 1/6 approved changesets -- score normalized to 1","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: third-party GitHubAction not pinned by hash: .github/workflows/generated-pr.yml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/ipld/go-fixtureplate/generated-pr.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/go-check.yml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/ipld/go-fixtureplate/go-check.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/go-test.yml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/ipld/go-fixtureplate/go-test.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release-binaries.yml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/ipld/go-fixtureplate/release-binaries.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release-binaries.yml:19: update your workflow using https://app.stepsecurity.io/secureworkflow/ipld/go-fixtureplate/release-binaries.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/release-binaries.yml:23: update your workflow using https://app.stepsecurity.io/secureworkflow/ipld/go-fixtureplate/release-binaries.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/release-check.yml:19: update your workflow using https://app.stepsecurity.io/secureworkflow/ipld/go-fixtureplate/release-check.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/releaser.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/ipld/go-fixtureplate/releaser.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/stale.yml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/ipld/go-fixtureplate/stale.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/tagpush.yml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/ipld/go-fixtureplate/tagpush.yml/master?enable=pin","Info:   0 out of   2 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   8 third-party GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Info: topLevel 'contents' permission set to 'read': .github/workflows/go-check.yml:10","Info: topLevel 'contents' permission set to 'read': .github/workflows/go-test.yml:10","Warn: no topLevel permission defined: .github/workflows/release-binaries.yml:1","Warn: topLevel 'contents' permission set to 'write': .github/workflows/release-check.yml:10","Warn: topLevel 'contents' permission set to 'write': .github/workflows/releaser.yml:9","Info: topLevel 'contents' permission set to 'read': .github/workflows/tagpush.yml:9","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"License","score":9,"reason":"license file detected","details":["Info: project has a license file: LICENSE.md:0","Warn: project license file does not contain an FSF or OSI license."],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Signed-Releases","score":0,"reason":"Project has not signed or included provenance with any releases.","details":["Warn: release artifact v0.0.3 not signed: https://api.github.com/repos/ipld/go-fixtureplate/releases/125349952","Warn: release artifact v0.0.2 not signed: https://api.github.com/repos/ipld/go-fixtureplate/releases/123428301","Warn: release artifact v0.0.1 not signed: https://api.github.com/repos/ipld/go-fixtureplate/releases/122705851","Warn: release artifact v0.0.3 does not have provenance: https://api.github.com/repos/ipld/go-fixtureplate/releases/125349952","Warn: release artifact v0.0.2 does not have provenance: https://api.github.com/repos/ipld/go-fixtureplate/releases/123428301","Warn: release artifact v0.0.1 does not have provenance: https://api.github.com/repos/ipld/go-fixtureplate/releases/122705851"],"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 30 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-19T19:57:04.224Z","repository_id":196719724,"created_at":"2025-08-19T19:57:04.224Z","updated_at":"2025-08-19T19:57:04.224Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29933021,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-28T09:58:13.507Z","status":"ssl_error","status_checked_at":"2026-02-28T09:57:57.047Z","response_time":90,"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":"2024-11-16T16:08:59.983Z","updated_at":"2026-02-28T12:02:45.231Z","avatar_url":"https://github.com/ipld.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# go-fixtureplate\n\n**Tools to generate and inspect IPLD data to assist in testing.**\n\n* [Example](#example)\n  * [Generate some UnixFS data](#generate-some-unixfs-data)\n  * [Explain a CAR file](#explain-a-car-file)\n  * [Explain a specific path through the CAR file](#explain-a-specific-path-through-the-car-file)\n  * [Use IPFS Trustless Gateway style queries](#use-ipfs-trustless-gateway-style-queries)\n* [Installation](#installation)\n* [CLI Usage](#cli-usage)\n  * [`explain`](#explain)\n  * [`generate`](#generate)\n* [Generate spec DSL](#generate-spec-dsl)\n* [License](#license)\n\n## Example\n\n### Generate some UnixFS data\n\n```console\n$ fixtureplate generate \\\n  'dir(~5*file:1.0kB,~5*file:~102kB,2*dir{sharded}(~10*file:51kB),file:1.0MB{zero},file:10B,file:20B)'\n```\n\nAsks for a UnixFS directory structure with some files and directories, packaged into a well-ordered\nCAR file. The directory structure is described as:\n\n```\nA directory containing:\n  → Approximately 5 files of 1.0 kB\n  → Approximately 5 files of approximately 102 kB\n  → 2 directories sharded with bitwidth 4 containing:\n    → Approximately 10 files of 51 kB\n  → A file of 1.0 MB containing just zeros\n  → A file of 10 B\n  → A file of 20 B\n```\n\n### Explain a CAR file\n\n```console\n$ fixtureplate explain \\\n  --car bafybeia7igckzgzxeyh5acp2l4etsa3rk2hf533nlwgeggxx4xsjjnxdwi.car\n```\n\n```\n/ipfs/bafybeia7igckzgzxeyh5acp2l4etsa3rk2hf533nlwgeggxx4xsjjnxdwi?dag-scope=all\nbafybeia7igckzgzxeyh5acp2l4etsa3rk2hf533nlwgeggxx4xsjjnxdwi | Directory | /\nbafybeih4rlw42wbsamz3zpodkps23kezqqytytdij6ae6sjhq3qvubqwla | HAMTShard | ↳ /Abscond8\nbafkreicp3wpwpwpl6fh2d53uo7tprdkodd2b2a4trmauad6eudfczons3e | RawLeaf   |   ↳ /Abscond8/5 [0:50999] (51,000 B)\nbafkreicmstgzmn4nqwvswdqdfvh4vzijme36saambqtsjgljyx4yfrbhhi | RawLeaf   |     /Abscond8/i [0:50999] (51,000 B)\nbafkreig2bb4fh6e7p2gtxcuxlwkdkkt6egsbtstrdfnaw2hqb2v2qbnoq4 | RawLeaf   |     /Abscond8/wæterscipe [0:50999] (51,000 B)\nbafkreidre3o7jeohihhiv3ddbj6zxxe7ftgbvquv6k6lzxh57ba42aq4ei | RawLeaf   |     /Abscond8/ẓẽṕhýr [0:50999] (51,000 B)\nbafkreidmzymddrsn4ttxijrc5rjhfidvg5q5r2xso22ktd7lrzvjiryloe | RawLeaf   |     /Abscond8/Polonius [0:50999] (51,000 B)\nbafkreienalqkpdgogmjdw7acylwjixmpub7db3have22rjzgc7jqm7cvya | RawLeaf   |     /Abscond8/eorþwerod [0:50999] (51,000 B)\nbafkreihwwqxfejrgwx36vq5ilu2hyn5epgvwvl4shtw6relx4t45msb7ne | RawLeaf   |     /Abscond8/Iago [0:50999] (51,000 B)\nbafkreigjovj6estaghq7fz7c4cjwgntcthfcdur6ayotwqxyksnwwfpvoq | RawLeaf   |     /Abscond8/juxtapositionally [0:50999] (51,000 B)\nbafkreigvz2koxrdifsaznvugtdchyegcpogvsmhsgo3ccf44s54s4b7uiy | RawLeaf   |     /Abscond8/snozzle [0:50999] (51,000 B)\nbafkreidv3vhd4iwgtx3v3mxcz53y2ogrpnu7e4ilxwibqvz3er4bdpukbu | RawLeaf   |   /E [0:19] (20 B)\nbafkreiapy6vr7t56t5oir762ul3l4hmdgutdte6b5qvwufs3bpvu44jrly | RawLeaf   |   /Fandango [0:111516] (111,517 B)\nbafkreigvuhqznqhoxmtu2amw2imgq5plnfttmncplbjkyjarojvjoiueya | RawLeaf   |   /brackle [0:999] (1,000 B)\nbafybeidyhi62ammifxk2mtcqdt5hr3d2a2ikoo7nsfbfvohli2njluk7ya | HAMTShard |   /eorþscūa\nbafkreico5f2zayg4nnlkdvykwwodpkywnnlmmdm7vsfwrspq3twcr2s2q4 | RawLeaf   |   ↳ /eorþscūa/Persnickety [0:50999] (51,000 B)\nbafkreibssfqg3gf6k5zr4kgc2y64rcilfl3lcuv2brupd3qwhk7bermjra | RawLeaf   |     /eorþscūa/Guildenstern [0:50999] (51,000 B)\nbafkreibkpahul4fxq42jzunujvbt3j44t2p5had3nrwibghomgar4q23zy | RawLeaf   |     /eorþscūa/Rigmarole [0:50999] (51,000 B)\nbafkreicm2ijz6225pp6mtr3na5umyiynkh6bme7kvjyki5acb4hl5b6zsa | RawLeaf   |     /eorþscūa/Titania [0:50999] (51,000 B)\nbafybeidbdgc42ogob2s6jv6oqgmsxvanpvai5yw5lgftpkqbu36oebb7ii | HAMTShard |     /eorþscūa [1E]\nbafkreid4dvstcnpqdmouolvcyxajnrsp5ohvrtjjtpemagxrnwgtoa2dse | RawLeaf   |     ↳ /eorþscūa/jinty [0:50999] (51,000 B)\nbafkreignyiotu3a5be6mbjq5kw4ghwalk2mmqqp2u4mitevzdp6zdgdyf4 | RawLeaf   |       /eorþscūa/mibber [0:50999] (51,000 B)\nbafkreifmf6t3l6gl5id6k3zrdpeidiypv4qoav4gi2fw2kmwdivaxfnkg4 | RawLeaf   |       /eorþscūa/5h4r3d [0:50999] (51,000 B)\nbafkreif4q6p544er5krzvcpebqwn4ovnnoagink3bjsfm7veodwbkcr4bi | RawLeaf   |     /eorþscūa/brobdingnagian [0:50999] (51,000 B)\nbafkreiecrqy3tdnff5ztffcf2a3t6s3evk5tz7gp7nj5iuswchxgye7bgm | RawLeaf   |   /eorþtæfl [0:101689] (101,690 B)\nbafkreifxqp3lpiis4furgfwsf7vnu3ildskg47ucgpvyhzndtdayitvj3q | RawLeaf   |   /flippet [0:999] (1,000 B)\nbafkreidws6mg2odvhal7lr52vfagjohxy3ofbang7q5johpvhmnl6zsxcy | RawLeaf   |   /go [0:999] (1,000 B)\nbafybeibvjrzbx6m66lyh7vu526jkjcvw3tgssjntylas5ikmxmadbtqwee | File      |   /hēahgerefa [0:999999] (1,000,000 B)\nbafkreihqnlkfmwgyj34ctwxiobr42xh2p6rxpxp3lygh5albhsgmylqfki | RawLeaf   |   ↳ /hēahgerefa [0:256143] (256,144 B)\nbafkreihqnlkfmwgyj34ctwxiobr42xh2p6rxpxp3lygh5albhsgmylqfki | RawLeaf   |     /hēahgerefa [256144:512287] (256,144 B)\nbafkreihqnlkfmwgyj34ctwxiobr42xh2p6rxpxp3lygh5albhsgmylqfki | RawLeaf   |     /hēahgerefa [512288:768431] (256,144 B)\nbafkreibzz7ccqrjibdd6ew2iqdyccc4hprasqy22rrkgdgmtt7pxhd7way | RawLeaf   |     /hēahgerefa [768432:999999] (231,568 B)\nbafkreibs4zufdog5ptkw5pmnohx7rkjcbrngk5qzra4gys3cvtucua6f6a | RawLeaf   |   /klop [0:9] (10 B)\nbafkreieanunxuk4a27rb4q6uksyk6iieycaqiizqxa4nw3jurnamk65ewa | RawLeaf   |   /overenthusiastically [0:109434] (109,435 B)\nbafkreidsqiwdgu25qgtmoz3rwa7esikryqpr3wfhg7u4krdwm67wuw47yq | RawLeaf   |   /p [0:95598] (95,599 B)\nbafkreifme6jeysy43bb64rcwwcik2nb3p3bvbzy22idg2ujzykx64geuse | RawLeaf   |   /ye [0:86970] (86,971 B)\nbafkreiaukjbwfe7nbfuabgkh3hy2eahptmlujxhesyb67cywddbvw4nwea | RawLeaf   |   /ŵăνę [0:999] (1,000 B)\n```\n\n### Explain a specific path through the CAR file\n\n```console\n$ fixtureplate explain \\\n  --car bafybeia7igckzgzxeyh5acp2l4etsa3rk2hf533nlwgeggxx4xsjjnxdwi.car \\\n  --path /eorþscūa/Guildenstern\n```\n\n```\n/ipfs/bafybeia7igckzgzxeyh5acp2l4etsa3rk2hf533nlwgeggxx4xsjjnxdwi/eorþscūa/Guildenstern?dag-scope=all\nbafybeia7igckzgzxeyh5acp2l4etsa3rk2hf533nlwgeggxx4xsjjnxdwi | Directory | /\nbafybeidyhi62ammifxk2mtcqdt5hr3d2a2ikoo7nsfbfvohli2njluk7ya | HAMTShard | ↳ /eorþscūa\nbafkreibssfqg3gf6k5zr4kgc2y64rcilfl3lcuv2brupd3qwhk7bermjra | RawLeaf   |   ↳ /eorþscūa/Guildenstern [0:50999] (51,000 B)\n```\n\n### Use IPFS Trustless Gateway style queries\n\n```console\n$ fixtureplate explain \\\n  --car bafybeia7igckzgzxeyh5acp2l4etsa3rk2hf533nlwgeggxx4xsjjnxdwi.car \\\n  --query '/ipfs/bafybeia7igckzgzxeyh5acp2l4etsa3rk2hf533nlwgeggxx4xsjjnxdwi/hēahgerefa?dag-scope=entity\u0026entity-bytes=550000:-200000'\n```\n\n```\n/ipfs/bafybeia7igckzgzxeyh5acp2l4etsa3rk2hf533nlwgeggxx4xsjjnxdwi/hēahgerefa?dag-scope=entity\u0026entity-bytes=550000:-200000\nbafybeia7igckzgzxeyh5acp2l4etsa3rk2hf533nlwgeggxx4xsjjnxdwi | Directory | /\nbafybeibvjrzbx6m66lyh7vu526jkjcvw3tgssjntylas5ikmxmadbtqwee | File      | ↳ /hēahgerefa [0:999999] (1,000,000 B)\nbafybeibvjrzbx6m66lyh7vu526jkjcvw3tgssjntylas5ikmxmadbtqwee | File      |   ↳ /hēahgerefa [0:999999] (1,000,000 B)\nbafkreihqnlkfmwgyj34ctwxiobr42xh2p6rxpxp3lygh5albhsgmylqfki | RawLeaf   |     ↳ /hēahgerefa [512288:768431] (256,144 B)\nbafkreibzz7ccqrjibdd6ew2iqdyccc4hprasqy22rrkgdgmtt7pxhd7way | RawLeaf   |       /hēahgerefa [768432:999999] (231,568 B)\n```\n\n## Installation\n\nTo install the latest version of go-fixtureplate, run:\n\n```console\n$ go install github.com/ipld/go-fixtureplate/cmd/fixtureplate@latest\n```\n\nBinaries are directly available for download on the [releases page](https://github.com/ipld/go-fixtureplate/releases).\n\nAlternatively, use go-fixtureplate as a library in your application by importing [`github.com/ipld/go-fixtureplate`](https://pkg.go.dev/github.com/ipld/go-fixtureplate).\n\n## CLI Usage\n\n### `explain`\n\nExplain the IPLD contents and paths in a CAR file.\n\n```console\n$ fixtureplate explain --car=\u003ccar\u003e \\\n  [--root=\u003ccid\u003e] \\\n  [--path=\u003cpath\u003e] \\\n  [--scope=\u003cscope\u003e] \\\n  [--bytes=\u003cbyte range\u003e] \\\n  [--duplicates] \\\n  [--full-path=false] \\\n  [--ignore-missing]\n```\n\nOr\n\n```console\n$ fixtureplate explain --car=\u003ccar\u003e --query=\u003cquery\u003e [--full-path=false] [--ignore-missing]\n```\n\nWhere:\n\n* `--car` specifies the path to a CAR file to inspect.\n* `--query` specifies an [IPFS Trustless Gateway](https://specs.ipfs.tech/http-gateways/trustless-gateway/) style query to execute. e.g. `/ipfs/\u003ccid\u003e/\u003cpath\u003e?dag-scope=\u003cscope\u003e\u0026entity-bytes=\u003cbyte range\u003e`. See [the specification](https://specs.ipfs.tech/http-gateways/trustless-gateway/) for full details. Note though that the query here also includes some elements not normally provided on the query string, such as the `dups=y|n` which is normally in the `Accept` header.\n* `--root` specifies a root CID to use, overriding the root CID in the CAR file _or_ the `--query`. If not specified, the root CID in the CAR file or `--query` will be used. This may be useful for cases where you are dealing with a CAR without roots, or you want to start from a sub-DAG in the CAR.\n* `--path` (default: `/`) specifies a path through the DAG to follow. If not specified, an implicit path of `/` will be used, which will traverse and explain the entire DAG. This would be equivalent to `--query=/ipfs/\u003ccid\u003e?dag-scope=all`.\n* `--scope` (or `--dag-scope`, default: `all`) specifies the scope of the traversal at the terminus of the PATH. See the [IPFS Trustless Gateway](https://specs.ipfs.tech/http-gateways/trustless-gateway/) specification for full details. If not specified, the default scope is `all`. Options include `block`, to halt at the block, and `entity` to halt at the block _or_ sharded entity (directory or file) at the terminus of the path.\n* `--bytes` (or `--entity-bytes`) specifies the byte range of the entity to return. See the [IPFS Trustless Gateway](https://specs.ipfs.tech/http-gateways/trustless-gateway/) specification for full details. If not specified, the default is to return the entire entity. Supplying a byte range will implicitly set the scope to `entity`.\n* `--duplicates` (or `--dups`, default: `true`) specifies whether to include duplicate blocks in the output. If not specified, the default is to include duplicates.\n*  `--full-path` (default: `true`) specifies whether to include the full path in the output. If not specified, the default is to include the full path.\n*  `--ignore-missing` (default: `false`) specifies whether to ignore missing blocks. If not specified, the default is to error on missing blocks. Turning this on may be useful to explain partial CAR files, such as those downloaded via the IPFS Trustless Gateway using a path, or scope other than `all`.\n\n### `generate`\n\nGenerate IPLD data according to a simple DSL that describes the structure of UnixFS file / directory trees.\n\n```console\n$ fixtureplate generate [--seed=\u003cseed\u003e] \u003cspec\u003e\n```\n\nWhere:\n\n* `--seed` specifies a random seed to use for generating the data. If not specified, a random seed will be `0` which should lead to reproducible results.\n* `\u003cspec\u003e` is a UnixFS directory structure specification. See [the specification](#generate-spec-dsl) for full details.\n\n`generate` will construct a UnixFS structure in IPLD blocks and output a CAR file containing the data. The CAR will be properly ordered, have the correct root and the name will be `{root cid}.car`. A textual description of the spec will also be printed to stdout in order to clarify what the request was.\n\n## Generate spec DSL\n\nThe generate `\u003cspec\u003e` DSL is a simple way to describe a UnixFS directory structure. It is a string that describes a directory structure, with some additional modifiers to control the size and content of the blocks in the DAG. It is intended to be used via the CLI with the `generate` command, but can also be used via the `github.com/ipld/go-fixtureplate/generator` package programmatically to generate UnixFS data for testing purposes.\n\nThe basic DSL uses `file:size` and `dir(...)` to describe a directory structure. For example:\n\n```\ndir(file:100B,file:200B)\n```\n\nDescribes a directory containing two files, one of 100 bytes and one of 200 bytes.\n\nThe simplest form is a single file. The `file` descriptor _must_ also have an accompanying size after a `:` character. e.g. `file:200KiB`. Once this file is beyond the size of the default chunker used (splitting at 256,144 bytes), it will yield a multi-block sharded file. Otherwise it will be a single block file.\n\nA directory can contain one or more files, which should be comma separated. The simplest directory has a single file. The `dir` descriptor _must_ be followed by a `(...)` containing the files in the directory.\n\nDirectories can also be nested, and inteleaved with files. For example:\n\n```\ndir(file:100B,dir(file:200B,file:300B),file:400B)\n```\n\nDescribes a directory containing two files, one of 100 bytes, one of 400 bytes, and one sub-directory containing two files, one of 200 bytes and one of 300 bytes.\n\nFile sizes can also be described as **approximate** using the `~` prefix to the size specifier. This inserts some randomness around a target size. For example: `file:~100B` will generate a file of *approximately* 100 bytes. The actual size will be roughly between 90% and 110% of the target size. This is useful for generating data that is not exactly the same size every time, but is still within a reasonable range.\n\nBoth files and directories can have **multipliers**. By prefixing `file` or `dir` with `N*` where `N` is a number, the file or directory will be repeated `N` times. For example:\n\n```\ndir(5*file:~100B)\n```\n\nDescribes a directory containing 5 files of approximately 100 bytes each.\n\nMultipliers can also be **approximate** in the same was as file sizes by using `~N*`. For example:\n\n```\ndir(~5*file:~100B,~5*dir(~10*file:50B))\n```\n\nDescribes a directory containing approximately 5 files of approximately 100 bytes each, and approximately 5 directories each containing approximately 10 files of exactly 50 bytes each.\n\nDirectories can also be **sharded**. This is done by adding `{sharded}` after the directory descriptor. For example:\n\n```\ndir{sharded}(~100*file:~100B)\n```\n\nDescribes a directory containing approximately 100 files of approximately 100 bytes each, sharded with a default bitwidth of `4`. The normal bitwidth of a UnixFS sharded directory in production is `8`, which yields a fan-out of up to 256 children of each node. Using a bitwidth of `4` yields a fan-out of 16. This is useful for testing purposes as you can generate more collisions and deeper trees using a smaller number of children in the directory.\n\nAlternative bitwidths can be specified by adding a number after `sharded`, as in `{sharded:N}`. For example:\n\n```\ndir{sharded:8}(~100*file:~100B)\n```\n\nDescribes a directory containing approximately 100 files of approximately 100 bytes each, sharded with a bitwidth of `8`.\n\nFiles can be **zeroed** by adding `{zero}` after the file descriptor. This will generate a file of the specified size, but with all bytes set to zero. This is primarily useful in generating **duplicate blocks** in your DAG. A file spanning many blocks with all-zeros will generate duplicate blocks for that file, and multiple files in a DAG with zeros will generate duplicate blocks across multiple files. For example:\n\n```\ndir(100*file:1MB{zero})\n```\n\nDescribes a directory containing approximately 100 files of exactly 1MB each, all of which are zeroed. This will generate a DAG with many duplicate blocks. In practice, with the current defaults of `generate`, this will generate a **5** block DAG, where one of those blocks is used **497** times.\n\nFiles and directories can be **named** by adding a `{name:\"...\"}` after the `file` or `dir` descriptor. Multiples cannot be named, and collisions are the responsibility of the user. A mixture of named and non-named files will result in random names being assigned along with the fixed ones. Caution should be applied. For example:\n\n```\ndir(dir{name:\"boop\"}(file:100B{name:\"foo\"},file:200B{name:\"bar\"}))\n```\n\nDescribes a directory containing a directory named `boop` containing two files, one named `foo` and one named `bar`.\n\nWhen using the `generate` CLI command, a long-form textual description of the spec will be printed to stdout in order to clarify what the request was. For example:\n\n```\ndir(~5*file:1.0kB,~5*file:~102kB,2*dir{sharded}(~10*file:51kB),file:1.0MB{zero},file:10B,file:20B)\n```\n\nIs described as:\n\n```\nA directory containing:\n  → Approximately 5 files of 1.0 kB\n  → Approximately 5 files of approximately 102 kB\n  → 2 directories sharded with bitwidth 4 containing:\n    → Approximately 10 files of 51 kB\n  → A file of 1.0 MB containing just zeros\n  → A file of 10 B\n  → A file of 20 B\n```\n\n## License\n\nApache-2.0/MIT © Protocol Labs\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fipld%2Fgo-fixtureplate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fipld%2Fgo-fixtureplate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fipld%2Fgo-fixtureplate/lists"}