filecoin-project / filecoin-project/filecoin-pin

feat: add `filecoin-pin get` retrieval command

Open
#575 8 comments 1 reaction 1 assignee Claimed by @BravoNatalie View on GitHub
CLI enhancement help wanted ready-for-work team/filecoin-pin team/fs-wg
Dominant language
TypeScript
Stars
26
Forks
21
Avg merge
5d 18h
Merged PRs (30d)
27

Description

## Description

After a successful upload, `filecoin-pin` gives the user a CID and retrieval URLs but has no way to fetch content itself. Users must switch to Kubo, a browser, or `curl` to retrieve what they just stored. This breaks the upload-store-retrieve loop. A tool that can pin should also be able to retrieve. SP retrieval URLs work over plain HTTP and don't require IPFS routing, so a `get` command doesn't depend on IPNI being ready.

## Proposed solution

Add `filecoin-pin get /` that fetches content from the SP retrieval URL. Support `-O ` to write output to a file (mirroring `curl -O`). Accept both IPFS CID and Piece CID. Default to stdout so it composes with pipes.

## Done criteria

- [ ] `filecoin-pin get ` streams file content from the SP retrieval URL
- [ ] `filecoin-pin get -O ` writes output to disk
- [ ] Works without IPNI being ready (fetches directly from SP, not via gateway)
- [ ] Piece CID accepted as an alternative to IPFS CID
- [ ] Error message is actionable when CID is not retrievable

## Notes

- Implementation: wrap `verified-fetch`

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.