+41
-9
README.md
+41
-9
README.md
···
23
23
24
24
## Installation
25
25
26
+
### Global Installation (CLI)
27
+
26
28
```bash
29
+
bun i -g @atscan/plcbundle-bun
30
+
```
31
+
32
+
After global installation, the `plcbundle-bun` command is available:
33
+
34
+
```bash
35
+
plcbundle-bun --help
36
+
```
37
+
38
+
### Library Installation
39
+
40
+
```bash
41
+
bun add @atscan/plcbundle-bun
42
+
```
43
+
44
+
### Development
45
+
46
+
```bash
47
+
git clone https://tangled.org/@atscan.net/plcbundle-bun
48
+
cd plcbundle-bun
27
49
bun install
28
50
```
29
51
···
31
53
32
54
```bash
33
55
# Clone bundles from remote repository
34
-
bun src/cli.ts clone --remote https://plcbundle.atscan.net
56
+
plcbundle-bun clone --remote https://plcbundle.atscan.net
35
57
36
58
# Clone specific range with multiple threads
37
-
bun src/cli.ts clone --remote https://plcbundle.atscan.net --bundles 1-100 --threads 8
59
+
plcbundle-bun clone --remote https://plcbundle.atscan.net --bundles 1-100 --threads 8
38
60
39
61
# Show repository info
40
-
bun src/cli.ts info --dir ./bundles
62
+
plcbundle-bun info --dir ./bundles
41
63
42
64
# Detect/filter operations with custom function
43
-
bun src/cli.ts detect --detect ./examples/detect.ts --dir ./bundles
65
+
plcbundle-bun detect --detect ./examples/detect.ts --dir ./bundles
44
66
45
67
# Detect with range and threads
46
-
bun src/cli.ts detect --detect ./detect.ts --bundles 1-50 --threads 4
68
+
plcbundle-bun detect --detect ./detect.ts --bundles 1-50 --threads 4
47
69
48
70
# Verify bundle integrity
49
-
bun src/cli.ts verify --bundle 42 --dir ./bundles
71
+
plcbundle-bun verify --bundle 42 --dir ./bundles
50
72
51
73
# Export operations from bundle
52
-
bun src/cli.ts export --bundle 1 --dir ./bundles > ops.jsonl
74
+
plcbundle-bun export --bundle 1 --dir ./bundles > ops.jsonl
75
+
```
76
+
77
+
### Development CLI Usage
78
+
79
+
When developing locally, run commands directly:
80
+
81
+
```bash
82
+
bun src/cli.ts clone --remote https://plcbundle.atscan.net
83
+
bun src/cli.ts info --dir ./bundles
84
+
bun src/cli.ts detect --detect ./examples/detect.ts
53
85
```
54
86
55
87
## Library Usage
56
88
57
89
```typescript
58
-
import { PLCBundle } from './src';
90
+
import { PLCBundle } from "@atscan/plcbundle-bun";
59
91
60
92
// Initialize
61
93
const bundle = new PLCBundle('./bundles');
···
118
150
Then use it:
119
151
120
152
```bash
121
-
bun src/cli.ts detect --detect ./detect.ts
153
+
plcbundle-bun detect --detect ./detect.ts
122
154
```
123
155
124
156
## Why Bun?
+1
-1
jsr.json
+1
-1
jsr.json
+2
-2
package.json
+2
-2
package.json
···
1
1
{
2
2
"name": "@atscan/plcbundle-bun",
3
-
"version": "0.9.1",
3
+
"version": "0.9.2",
4
4
"type": "module",
5
5
"description": "Bun library for working with DID PLC bundle archives (plcbundle)",
6
6
"main": "./src/index.ts",
7
7
"bin": {
8
-
"plcbundle": "./src/cli.ts"
8
+
"plcbundle-bun": "./src/cli.ts"
9
9
},
10
10
"exports": {
11
11
".": "./src/index.ts"