https://github.com/application-research/barge
Barge - CLI tool to stream/upload files/cars/dirs to Estuary
https://github.com/application-research/barge
Last synced: about 1 year ago
JSON representation
Barge - CLI tool to stream/upload files/cars/dirs to Estuary
- Host: GitHub
- URL: https://github.com/application-research/barge
- Owner: application-research
- License: other
- Created: 2022-07-07T03:22:49.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2022-11-22T21:01:56.000Z (over 3 years ago)
- Last Synced: 2025-04-11T18:21:33.403Z (about 1 year ago)
- Language: Go
- Homepage:
- Size: 736 KB
- Stars: 6
- Watchers: 1
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Estuary Barge
Barge is a CLI tool that directly uses estuary api to stream/upload files to the filecoin network.

*This project is based on the a sub module on Estuary under /cmd/barge.*
## Installation
### Pre-requisites
- Go
- make
- filecoin-ffi (this is a submodule)
Clone this repo and run the following
```
make all
```
This will generate a `barge` binary on the root folder that you can test.
## Usage
### Grab your API key from Estuary and run the following:
```
./barge login
```
### Initialize
Initialize barge with the following command. This will create a configuration file which
holds the estuary connection information.
```
./barge init
```
### Local configuration file
```
{
"estuary": {
"host": "http://localhost:3004",
"primaryshuttle": "http://localhost:3005",
"token": ""
}
}
```
### Remote Estuary configuration
```
{
"estuary": {
"host": "https://api.estuary.tech",
"primaryshuttle": "https://upload.estuary.tech",
"token": ""
}
}
```
## Usage
### Upload a file
```
./barge plumb put-file
```
### Upload a CAR file
```
./barge plumb put-car
```
## WebUI
Run Web
```
./barge web
```
[http://localhost:3000](http://localhost:3000)
## REST API Endpoints
Run Web and use the following endpoints to interact with the barge.
```
./barge web
```
### Upload file
```
curl --location --request POST 'http://localhost:3000/api/v0/plumb/file' \
--form 'file=@"website.png"'
```
### Upload CAR
```
curl --location --request POST 'http://localhost:3000/api/v0/plumb/car' \
--form 'file=@"file.car"'
```