You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This repository contains an example command-line interface (CLI) tool for joining a global, permissionless, CRDT-based database using CRDTs, IPFS & libp2p.
4
+
5
+
## Features
6
+
7
+
- Join a global CRDT-based database with IPFS.
8
+
- Store and retrieve key-value pairs in a distributed datastore.
9
+
- Subscribe to a pubsub topic to receive updates in real-time.
10
+
- Bootstrap and connect to other peers in the network.
11
+
- Operate in daemon mode for continuous operation.
12
+
- Simple CLI commands to interact with the database.
13
+
14
+
## Building
15
+
16
+
To build the example GlobalDB CLI, clone this repository and build the binary:
17
+
18
+
```bash
19
+
git clone https://github.com/ipfs/go-ds-crdt
20
+
cd examples/globaldb
21
+
go build -o globaldb
22
+
```
23
+
24
+
Ensure that you have Go installed and set up in your environment.
25
+
26
+
## Usage
27
+
28
+
Run the CLI with:
29
+
30
+
```bash
31
+
./globaldb [options]
32
+
```
33
+
34
+
### Options
35
+
36
+
-`-daemon`: Run in daemon mode.
37
+
-`-datadir`: Specify a directory for storing the local database and keys.
38
+
39
+
### Commands
40
+
41
+
Once running, the CLI provides the following interactive commands:
42
+
43
+
-`list`: List all items in the store.
44
+
-`get <key>`: Retrieve the value for a specified key.
45
+
-`put <key> <value>`: Store a value with a specified key.
46
+
-`connect <multiaddr>`: Connect to a peer using its multiaddress.
47
+
-`debug <on/off/peers/subs>`: Enable or disable debug logging, list connected peers, show pubsub subscribers
0 commit comments