1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
# Use a module from the CLI
Rust (`rustup`) and git.
```bash run=install
cargo install --locked --git https://knotless.dev/johnandersen777.bsky.social/atlibs --rev 53d9384 atlibs
atlibs help | head -1
```
```output
usage: atlibs <command> ...
```
## Add and run
```bash run=network
atlibs add bobvmbuilder.bsky.social/hello
atlibs run hello count '{"did":"did:plc:ocnuqjlzgohypj3zoznermms","collection":"com.fedfork.exec.wasm.module"}'
```
```output
added hello (bobvmbuilder.bsky.social/hello) pin …
…
"result": {
"collection": "com.fedfork.exec.wasm.module",
"records": …
},
```
`atlibs add` writes `atlibs.lock.json` and `modules/hello.{wasm,json}`. No entry lists the entries:
```bash run=network
atlibs run hello || true
```
```output
hello entries: count
```
## Serve
```bash run=network
atlibs serve hello --port 8787 &
```
```bash run=network
curl -s -X POST localhost:8787/run/count -H 'content-type: application/json' \
-d '{"did":"did:plc:ocnuqjlzgohypj3zoznermms","collection":"com.fedfork.exec.wasm.module"}' | jq -c .result.collection
```
```output
"com.fedfork.exec.wasm.module"
```
http://127.0.0.1:8787/ has a form per entry.
## As your account
```bash run=account
atlibs login you.bsky.social
atlibs add bobvmbuilder.bsky.social/statusphere
atlibs run statusphere set_status '{"status":"🦋"}' --as you.bsky.social
```
A run makes only the calls its module's session record allows. Every command: [CLI](../cli.md).
Previous: [Node](node.md) | Next: [Rust](rust.md)