@yamo/cli 1.0.0 → 1.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +61 -17
- package/dist/index.js +0 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,42 +1,78 @@
|
|
|
1
|
-
# 💻 YAMO CLI (
|
|
1
|
+
# 💻 YAMO CLI [](https://www.npmjs.com/package/@yamo/cli)
|
|
2
2
|
|
|
3
3
|
The Command Line Interface for the YAMO Protocol. Now powered by `@yamo/core`.
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## 📦 Installation
|
|
6
6
|
|
|
7
|
-
From the monorepo root:
|
|
8
7
|
```bash
|
|
9
|
-
|
|
10
|
-
npm
|
|
8
|
+
# Global installation (recommended)
|
|
9
|
+
npm install -g @yamo/cli
|
|
10
|
+
|
|
11
|
+
# Or use npx (no installation needed)
|
|
12
|
+
npx @yamo/cli <command>
|
|
11
13
|
```
|
|
12
14
|
|
|
13
|
-
## ⚙️ Configuration
|
|
14
|
-
|
|
15
|
+
## ⚙️ Configuration
|
|
16
|
+
|
|
17
|
+
Set environment variables or create a `.env` file:
|
|
15
18
|
|
|
16
19
|
```bash
|
|
17
|
-
CONTRACT_ADDRESS=
|
|
18
|
-
RPC_URL=
|
|
19
|
-
PRIVATE_KEY=
|
|
20
|
+
CONTRACT_ADDRESS=0x3c9440fa8d604E732233ea17095e14be1a53b015
|
|
21
|
+
RPC_URL=https://ethereum-sepolia-rpc.publicnode.com
|
|
22
|
+
PRIVATE_KEY=0xYOUR_PRIVATE_KEY
|
|
20
23
|
|
|
21
|
-
# IPFS Settings
|
|
22
|
-
USE_REAL_IPFS=
|
|
23
|
-
PINATA_JWT=
|
|
24
|
+
# IPFS Settings (optional)
|
|
25
|
+
USE_REAL_IPFS=false
|
|
26
|
+
PINATA_JWT=your_pinata_jwt_if_using_real_ipfs
|
|
24
27
|
```
|
|
25
28
|
|
|
29
|
+
### Networks
|
|
30
|
+
|
|
31
|
+
**Sepolia Testnet (default):**
|
|
32
|
+
- Contract: `0x3c9440fa8d604E732233ea17095e14be1a53b015`
|
|
33
|
+
- RPC: `https://ethereum-sepolia-rpc.publicnode.com` (free public RPC)
|
|
34
|
+
|
|
35
|
+
**Local Development:**
|
|
36
|
+
- Contract: Deploy using `@yamo/contracts`
|
|
37
|
+
- RPC: `http://127.0.0.1:8545`
|
|
38
|
+
|
|
26
39
|
## 📖 Commands
|
|
27
40
|
|
|
28
41
|
### `yamo init <agent_name>`
|
|
29
42
|
Creates a new `block.yamo` template.
|
|
30
43
|
|
|
44
|
+
```bash
|
|
45
|
+
# With global install
|
|
46
|
+
yamo init MyAgent
|
|
47
|
+
|
|
48
|
+
# With npx
|
|
49
|
+
npx @yamo/cli init MyAgent
|
|
50
|
+
```
|
|
51
|
+
|
|
31
52
|
### `yamo hash <file>`
|
|
32
53
|
Calculates the content hash formatted for blockchain submission.
|
|
33
54
|
|
|
55
|
+
```bash
|
|
56
|
+
yamo hash block.yamo
|
|
57
|
+
```
|
|
58
|
+
|
|
34
59
|
### `yamo submit <file>`
|
|
35
60
|
Submits a block to the chain.
|
|
36
61
|
* `--ipfs`: Uploads content to IPFS. If the YAMO file contains `output: file.json;`, it will automatically create a **Deep Bundle** containing both the trace and the artifact.
|
|
37
62
|
* `-e, --encrypt`: Encrypts the IPFS bundle using AES-256-GCM.
|
|
38
63
|
* `-k, --key <string>`: The passphrase for encryption (or use `YAMO_ENCRYPTION_KEY` env var).
|
|
39
64
|
|
|
65
|
+
```bash
|
|
66
|
+
# Basic submission
|
|
67
|
+
yamo submit block.yamo
|
|
68
|
+
|
|
69
|
+
# With IPFS
|
|
70
|
+
yamo submit block.yamo --ipfs
|
|
71
|
+
|
|
72
|
+
# With encryption
|
|
73
|
+
yamo submit block.yamo --ipfs --encrypt --key "my-secret"
|
|
74
|
+
```
|
|
75
|
+
|
|
40
76
|
### `yamo audit <blockId>`
|
|
41
77
|
Performs a cryptographic integrity check.
|
|
42
78
|
1. Fetches block data from the chain.
|
|
@@ -46,6 +82,14 @@ Performs a cryptographic integrity check.
|
|
|
46
82
|
|
|
47
83
|
* `-k, --key <string>`: Passphrase to decrypt the content if the bundle is encrypted.
|
|
48
84
|
|
|
85
|
+
```bash
|
|
86
|
+
# Audit without encryption
|
|
87
|
+
yamo audit block_001
|
|
88
|
+
|
|
89
|
+
# Audit encrypted content
|
|
90
|
+
yamo audit block_001 --key "my-secret"
|
|
91
|
+
```
|
|
92
|
+
|
|
49
93
|
## 🔒 Encryption
|
|
50
94
|
|
|
51
95
|
YAMO v1.0 supports optional client-side encryption for IPFS bundles.
|
|
@@ -55,9 +99,9 @@ YAMO v1.0 supports optional client-side encryption for IPFS bundles.
|
|
|
55
99
|
|
|
56
100
|
**Example Encrypted Workflow:**
|
|
57
101
|
```bash
|
|
58
|
-
# Submit
|
|
59
|
-
yamo submit task.yamo --
|
|
102
|
+
# Submit with encryption
|
|
103
|
+
yamo submit task.yamo --ipfs --encrypt --key "my-secret"
|
|
60
104
|
|
|
61
|
-
# Audit
|
|
62
|
-
yamo audit
|
|
105
|
+
# Audit encrypted block
|
|
106
|
+
yamo audit block_001 --key "my-secret"
|
|
63
107
|
```
|
package/dist/index.js
CHANGED
|
File without changes
|