Tools for working with nft.storage.
- Ensure git and Node.js are installed.
- Clone this repo:
git clone https://github.com/nftstorage/nft.storage-tools.git cd nft.storage-tools
- Install dependencies:
npm install
- Sign up for an account on nft.storage and create an API key.
- Create a
.env
file in the project root and add the following content:ENDPOINT="https://api.nft.storage" API_KEY="NFT_STORAGE_API_KEY"
- Choose a script from the root to run (usage instructions can be found at the top of the file) or instructions for some common tasks can be found below.
To talk directly to the nft.storage IPFS Cluster using the cluster*.js
scripts, add the following to the .env
file:
CLUSTER_URL="https://CLUSTER_DOMAIN/api/"
CLUSTER_HEADERS='{"Authorization":"Basic CLUSTER_BASIC_AUTH_KEY"}'
You have a list of CIDs for content you have stored in IPFS already and would like to import that content into nft.storage.
- Export CIDs to a newline delimited file. For example, you could use the following command:
ipfs pin ls -q > pinlist.txt
- Follow the usage instructions above until the last step.
- Run the import script:
Note: if you need to stop the script, you can resume from a particular line number by passing
node import.js pinlist.txt
--start 1000
(to start from line 1,000).
After nft.storage receives all your CIDs, it'll start to transfer data from peers that already have the content. This may take a long time for long lists of CIDs and may fail if the content cannot be found on the IPFS network. You can check the status of the CIDs you imported.
You have previously imported a CID list and want to check to see progress of the pinning operations.
- Follow instructions for importing a list of CIDs.
- Run the status checker script:
Note: failed and unknown CIDs are shown after all CIDs have been queried. These can be re-imported to attempt recovery.
node status.js pinlist.txt
Feel free to join in. All welcome. Open an issue!
Dual-licensed under MIT + Apache 2.0