{"id":38014125,"url":"https://github.com/ipni/ipni-cli","last_synced_at":"2026-01-16T19:23:30.795Z","repository":{"id":157874897,"uuid":"628238215","full_name":"ipni/ipni-cli","owner":"ipni","description":":computer: CLI tool for all things IPNI","archived":false,"fork":false,"pushed_at":"2025-07-01T04:41:55.000Z","size":467,"stargazers_count":6,"open_issues_count":6,"forks_count":0,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-07-01T05:34:57.118Z","etag":null,"topics":["cli","diagnostics","ipni"],"latest_commit_sha":null,"homepage":"","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/ipni.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}},"created_at":"2023-04-15T10:27:03.000Z","updated_at":"2025-07-01T04:41:58.000Z","dependencies_parsed_at":null,"dependency_job_id":"f808b44f-f8a8-46f3-b7cf-80ffb056aab2","html_url":"https://github.com/ipni/ipni-cli","commit_stats":null,"previous_names":[],"tags_count":41,"template":false,"template_full_name":null,"purl":"pkg:github/ipni/ipni-cli","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ipni%2Fipni-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ipni%2Fipni-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ipni%2Fipni-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ipni%2Fipni-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ipni","download_url":"https://codeload.github.com/ipni/ipni-cli/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ipni%2Fipni-cli/sbom","scorecard":{"id":493960,"data":{"date":"2025-08-11","repo":{"name":"github.com/ipni/ipni-cli","commit":"7b1cca4d46b4b5b5731f7b39f170339c36dcfb41"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":4.1,"checks":[{"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 3/28 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":"Maintained","score":3,"reason":"4 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 3","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"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":"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/go-check.yml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/ipni/ipni-cli/go-check.yml/main?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/ipni/ipni-cli/go-test.yml/main?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/ipni/ipni-cli/release-binaries.yml/main?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/ipni/ipni-cli/release-binaries.yml/main?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/ipni/ipni-cli/release-binaries.yml/main?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/ipni/ipni-cli/release-check.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/releaser.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/ipni/ipni-cli/releaser.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/tagpush.yml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/ipni/ipni-cli/tagpush.yml/main?enable=pin","Info:   0 out of   2 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   6 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":"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":"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":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"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":"Packaging","score":10,"reason":"packaging workflow detected","details":["Info: Project packages its releases by way of GitHub Actions.: .github/workflows/release-binaries.yml:10"],"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":"Signed-Releases","score":0,"reason":"Project has not signed or included provenance with any releases.","details":["Warn: release artifact v0.4.3 not signed: https://api.github.com/repos/ipni/ipni-cli/releases/229140313","Warn: release artifact v0.4.2 not signed: https://api.github.com/repos/ipni/ipni-cli/releases/217749864","Warn: release artifact v0.4.1 not signed: https://api.github.com/repos/ipni/ipni-cli/releases/217470587","Warn: release artifact v0.4.0 not signed: https://api.github.com/repos/ipni/ipni-cli/releases/217461284","Warn: release artifact v0.3.0 not signed: https://api.github.com/repos/ipni/ipni-cli/releases/214923764","Warn: release artifact v0.4.3 does not have provenance: https://api.github.com/repos/ipni/ipni-cli/releases/229140313","Warn: release artifact v0.4.2 does not have provenance: https://api.github.com/repos/ipni/ipni-cli/releases/217749864","Warn: release artifact v0.4.1 does not have provenance: https://api.github.com/repos/ipni/ipni-cli/releases/217470587","Warn: release artifact v0.4.0 does not have provenance: https://api.github.com/repos/ipni/ipni-cli/releases/217461284","Warn: release artifact v0.3.0 does not have provenance: https://api.github.com/repos/ipni/ipni-cli/releases/214923764"],"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":"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"}},{"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"}}]},"last_synced_at":"2025-08-19T19:57:50.847Z","repository_id":157874897,"created_at":"2025-08-19T19:57:50.847Z","updated_at":"2025-08-19T19:57:50.847Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28481680,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T11:59:17.896Z","status":"ssl_error","status_checked_at":"2026-01-16T11:55:55.838Z","response_time":107,"last_error":"SSL_read: 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":["cli","diagnostics","ipni"],"created_at":"2026-01-16T19:23:30.702Z","updated_at":"2026-01-16T19:23:30.777Z","avatar_url":"https://github.com/ipni.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ipni-cli\n[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](https://protocol.ai)\n[![Go Reference](https://pkg.go.dev/badge/github.com/ipni/ipni-cli.svg)](https://pkg.go.dev/github.com/ipni/ipni-cli)\n\n:computer: CLI tools for all things IPNI\n\nThis project provides a command line utility to access IPNI indexers and index-providers.\n\n## Install\n\n### Install binary\n\nGet to the [latest ipni-cli release](https://github.com/ipni/ipni-cli/releases/latest) and get the binary appropriate for your system.\n\n### Build with Golang\n\n```sh\ngit clone https://github.com/ipni/ipni-cli.git\ncd ipni-cli\ngo install ./cmd/ipni\n```\n\nThis will install the `ipni` command into `$GOPATH/bin/`\n\n## Run\n\nTo see instructions for use, run:\n```\nipni --help\n```\n\n## Examples\n\nHere are a few examples that use the following commands:\n- `ads`       Show advertisements on a chain from a specified publisher\n  - `get`         Show information about an advertisement from a specified publisher\n  - `list`        List advertisements from latest to earlier from a specified publisher\n  - `crawl`       Crawl publisher's advertisements and show information for each advertisement\n  - `dist`        Determine the distance between two advertisements in a chain\n- `find`      Find value by CID or multihash in indexer\n- `provider`  Show information about providers known to an indexer\n- `random`    Show random multihashes from a random advertisement\n- `spaddr`    Get storage provider p2p ID and address from lotus gateway\n- `verify`    Verifies advertised content validity and queryability from an indexer\n\n### `ads get`\n- Show the latest advertisement from a publisher:\n```sh\nipni ads get --ai=/ip4/76.219.232.45/tcp/24001/p2p/12D3KooWPNbkEgjdBNeaCGpsgCrPRETe4uBZf1ShFXStobdN18ys --head\n```\n- Show information about a specific advertisement:\n```\n./ipni ads get --ai=/ip4/76.219.232.45/tcp/24001/p2p/12D3KooWPNbkEgjdBNeaCGpsgCrPRETe4uBZf1ShFXStobdN18ys \\\n    --cid=baguqeerank3iclae2u4lin3vj2avuory3ny67tldh2cd5uodsgsdl6uawz3a\n```\n- Show information about multiple advertisements:\n```sh\nipni ads get --ai=/ip4/76.219.232.45/tcp/24001/p2p/12D3KooWPNbkEgjdBNeaCGpsgCrPRETe4uBZf1ShFXStobdN18ys \\\n    --cid=baguqeerank3iclae2u4lin3vj2avuory3ny67tldh2cd5uodsgsdl6uawz3a\n    --cid=baguqeera3aylz3gkoxtkmqdwulxlaqbudf7nhdomfpyjqij236pwehrngngq\n```\n- Get ads from a list of CIDs in a file:\n```sh\ncat ad-cids-list.txt | ipni add get /dns4/ads.example.com/tcp/24001/p2p/\u003cpublisher-p2p-id\u003e\n```\n\n### `ads list`\n- List the 10 most recent advertisements from a provider:\n```sh\nipni ads list -n 10 --ai=/ip4/38.70.220.112/tcp/10201/p2p/12D3KooWEAcRJ5fYjuavKgAhu79juR7mgaznSZxsm2RRUBiWurv9\n```\n\n### `ads crawl`\n- Crawl advertisements from a provider and stop after reading 1000 multihashes:\n```sh\nipni ads crawl -stop-mhs 1000 --ai=/ip4/38.70.220.112/tcp/10201/p2p/12D3KooWEAcRJ5fYjuavKgAhu79juR7mgaznSZxsm2RRUBiWurv9\n```\n\n### `ads dist`\n- Get distance from an advertisement to the head of the advertisement chain:\n```sh\nipni ads dist --ai=/ip4/76.219.232.45/tcp/24001/p2p/12D3KooWPNbkEgjdBNeaCGpsgCrPRETe4uBZf1ShFXStobdN18ys \\\n    --start=baguqeera3aylz3gkoxtkmqdwulxlaqbudf7nhdomfpyjqij236pwehrngngq\n```\n- Find the distance between 2 advertisements on a publisher's chain:\n```sh\nipni ads dist --ai=/ip4/76.219.232.45/tcp/24001/p2p/12D3KooWPNbkEgjdBNeaCGpsgCrPRETe4uBZf1ShFXStobdN18ys \\\n    --start=baguqeera3aylz3gkoxtkmqdwulxlaqbudf7nhdomfpyjqij236pwehrngngq \\\n    --end=baguqeerage4rh6yqy4u37x7i337q57wrwfls5ihiei6l72rr6ezrw5vcucea\n```\n\n**Note* To include an HTTP path prefix in the `addr-info` flag of the `ads` command, include the `http-path` component in the multiaddr. For example, `--ai /dns/pool.example.com/https/http-path/eu%2Fprovider1/p2p/12D3KooWPMGfQs5CaJKG4yCxVWizWBRtB85gEUwiX2ekStvYvqgp` fetches ads from `https://pool.example.com/eu/provider1/ipni/v1/ad/head`. Any \"/\" within the http-path must be escaped.\n\n### `find`\n- Ask cid.contact where to find CID `bafybeigvgzoolc3drupxhlevdp2ugqcrbcsqfmcek2zxiw5wctk3xjpjwy`:\n```sh\nipni find -i https://cid.contact --cid bafybeigvgzoolc3drupxhlevdp2ugqcrbcsqfmcek2zxiw5wctk3xjpjwy\n```\n- Ask cid.contact where to find multiple multihashes:\n```sh\n./ipni find -i https://cid.contact \\\n    --mh=2Drjgb5kxWdcTNfhfEC8F3Ltk4s16aAgG2aLnXxSdpiGTazLGE \\\n    --mh=2Drjgb4GmZ3cJGRunHYdHrmtgbmGoDuSMeN42gdU1jSiGmHVmA \\\n    --mh=2DrjgbJZxQgMTvWDG6ih2SNESWeoabccawmLwuFt1T59joGFxd\n```\n\n### `provider`\n- Get all providers known by the indexer dev.cid.contact:\n```\nipni provider -i https://dev.cid.contact --all\n```\n- Get information about the provider with ID `QmQzqxhK82kAmKvARFZSkUVS6fo9sySaiogAnx5EnZ6ZmC`\n```\nipni provider -i https://cid.contact -pid QmQzqxhK82kAmKvARFZSkUVS6fo9sySaiogAnx5EnZ6ZmC\n```\n```\necho QmQzqxhK82kAmKvARFZSkUVS6fo9sySaiogAnx5EnZ6ZmC | ipni provider -i https://cid.contact\n```\n- Get indexer's current ingestion distance, from the most recent published advertisement, for a provider:\n```sh\nipni provider -i https://indexstar.prod.cid.contact -pid QmQzqxhK82kAmKvARFZSkUVS6fo9sySaiogAnx5EnZ6ZmC --distance\n```\n- Get information about the providers returned from find results:\n```sh\nipni find -i https://cid.contact --cid bafybeigvgzoolc3drupxhlevdp2ugqcrbcsqfmcek2zxiw5wctk3xjpjwy --id-only | ipni provider -i https://cid.contact\n```\n- See which providers cid.contact knows about that dev.cid.contact does not:\n```sh \nipni provider --all -i https://dev.cid.contact --id-only | ipni provider -invert -i https://cid.contact --id-only\n```\n- Get combined provider information from multiple indexers:\n```\nipni provider --all -i https://alva.dev.cid.contact -i https://cora.dev.cid.contact --id-only | wc -l\n```\n- Watch indexer stay up-to-date with a provider's advertisement chain:\n```\nipni provider -i https://inga.prod.cid.contact -pid QmQzqxhK82kAmKvARFZSkUVS6fo9sySaiogAnx5EnZ6ZmC -follow-dist -uin=10s\n```\n\n### `random`\n- For specified providers, choose an advertisement with undeleted content from a random depth between 1 and n in the chain and return m random multihashs from the first entries block.\n```\nipni random -i https://cid.contact --n=5 --m=3 --pid=12D3KooWC8QzjdzWynwYybjDLKa1YbPiRXUjwsibERubatgmQP51\n```\n- Lookup provider information for each random multihash.\n```\nipni random --quiet -i https://cid.contact --n=5 --m=3 --pid=12D3KooWC8QzjdzWynwYybjDLKa1YbPiRXUjwsibERubatgmQP51 | xargs -J % -n1 ipni find -i https://cid.contact -mh %\n```\n\n### `spaddr`\n- Get p2p ID and multiaddrs of storage provider identified by storage provider ID \"t01000\":\n```\nipni spaddr --spid=t01000\n```\n\n### `verify ingest`\n- Verfy ingestion at cid.contact, of multihashes \n```\nipni verify ingest -i https://cid.contact \\\n    --ad-cid=baguqeerank3iclae2u4lin3vj2avuory3ny67tldh2cd5uodsgsdl6uawz3a \\\n    --provider-id=12D3KooWPNbkEgjdBNeaCGpsgCrPRETe4uBZf1ShFXStobdN18ys \\\n    --batch-size=25 \\\n    --sampling-prob=0.125\n```\n\n## License\n\n[SPDX-License-Identifier: Apache-2.0 OR MIT](LICENSE.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fipni%2Fipni-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fipni%2Fipni-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fipni%2Fipni-cli/lists"}