@affordances/cli 0.0.0-stage → 0.0.0
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 +13 -2
- package/dist/cli.js +31404 -0
- package/package.json +30 -4
package/README.md
CHANGED
|
@@ -1,3 +1,14 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @affordances/cli
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
The `affordances` command: set up a Next.js app, and see and call any page the way an agent does.
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
vlx @affordances/cli init # route handler, withAffordances, .gitignore, manifest
|
|
7
|
+
vlx @affordances/cli build # regenerate .affordances/manifest.ts
|
|
8
|
+
vlx @affordances/cli open localhost:3000/cart # the page's graph, as an agent gets it
|
|
9
|
+
vlx @affordances/cli call localhost:3000/products/tee addToCart --input '{"sku":"TEE-BLK-M"}'
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
Every command takes `--json` and exits 1 on failure, so scripts and coding agents can drive it. Built on [Effect](https://effect.website), which is bundled into the one file that ships.
|
|
13
|
+
|
|
14
|
+
Docs: [https://github.com/vltpkg/affordances/blob/main/apps/docs/content/reference/cli.mdx](https://github.com/vltpkg/affordances/blob/main/apps/docs/content/reference/cli.mdx)
|