Pinata CLI
The Pinata CLI written in Go is designed to help automate Pinata related tasks in the terminal. Its still in development so please feel free to open issues and pull requests on the GitHub repo!
Installation
We are currently working on the build flow for binaries to make installation easier, but for now we recommend building from source.
To do this make sure you have Go installed on your computer and the following command returns a version:
Then paste and run the following into your terminal:
Usage
The Pinata CLI is equipped with the majortiry of features on the Pinata API.
auth
- Authentication
With the CLI installed you will first need to authenticate it with your Pinata JWT
upload
- Uploads
After authentication you can now upload using the upload
command or u
for short, then pass in the path to the file or folder you want to upload.
The following flags are also available to set the name or CID version of the upload.
list
- List Files
You can list files with the list
command or the alias l
. The results are printed in raw JSON to help increase composability.
By default it will retrieve the 10 latest files, but with the flags below you can get more results or fine tune your search.
delete
- Delete Files
If you ever need to you can delete a file by CID using the delete
command or alias d
followed by the file CID.
pin
- Pin by CID
Separate from the upload
command which uploads files from your machine to Pinata, you can also pin a file already on the IPFS network by using the pin
command or alias p
followed by the CID. This will start a pin by CID request which will go into a queue.
To check the queue use the request
command.
requests
- Pin by CID Requests
As mentioned in the pin
command, when you submit an existing CID on IPFS to be pinned to your Pinata account, it goes into a request queue. From here it will go through multiple status’. For more info on these please consult the documentation.
You can use flags to help filter requests as well.
Contact
If you have any questions please feel free to reach out to us!