https://github.com/aquaflamingo/ipfs-repl
Basic REPL program for IPFS.
https://github.com/aquaflamingo/ipfs-repl
ipfs
Last synced: 2 months ago
JSON representation
Basic REPL program for IPFS.
- Host: GitHub
- URL: https://github.com/aquaflamingo/ipfs-repl
- Owner: aquaflamingo
- Created: 2021-08-19T15:19:03.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2022-04-27T16:13:57.000Z (about 4 years ago)
- Last Synced: 2026-02-01T10:39:39.540Z (5 months ago)
- Topics: ipfs
- Language: Go
- Homepage:
- Size: 13.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# IPFS REPL
A bare bones REPL for IPFS
## Install
You can build the binary by running make build
```
make build
```
Code is currently setup to use `localhost:5001` as node source.
## Usage
### Define
You can define variables in the REPL through standard assignment
```bash
myVar = 123
```
These can be used in other commands
### Print
You can print the value of a variable by typing its name
```bash
myVar
123
```
### Add
You can add a file to IPFS by using `add` with the full path to the file to add
```bash
ipfs > add /Users/myCoolUser/ipfs-repl/test.txt
QmZLRFWaz9Kypt2ACNMDzA5uzACDRiCqwdkNSP1UZsu56D
```
The returned value is the content identifier hash for IPFS. You can use the 'special' `$$` variable to reprint the value too.
```bash
ipfs > myVar = $$
ipfs > myVar
QmZLRFWaz9Kypt2ACNMDzA5uzACDRiCqwdkNSP1UZsu56D
```
### Cat
You can use `cat` to print the value of the file from IPFS:
```bash
ipfs > cat $$
This is a test file stored on IPFS.
```
## Licence
This code is licensed under MIT open source licence.