This is a simple Lighthouse (Filecoin) example https://docs.lighthouse.storage/ for uploading and downloading files to and from Filecoin via lighthouse sdk.
pnpm install
npm install -g @lighthouse-web3/sdk
lighthouse-web3 --help
lighthouse-web create-wallet
# add publicKey to LIGHTHOUSE_PUBLIC_KEY in .envlighthouse-web api-key --new
# add api-key to LIGHTHOUSE_API_KEY .envpnpm start
curl https://gateway.lighthouse.storage/ipfs/CID
# Make sure to replace 'CID' with the actual Content Identifier of your file.Retrieve File: https://docs.lighthouse.storage/lighthouse-1/how-to/retrieve-file