@tenderprompt/cli 0.1.0 → 0.1.2

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.
Files changed (2) hide show
  1. package/README.md +94 -0
  2. package/package.json +2 -2
package/README.md ADDED
@@ -0,0 +1,94 @@
1
+ # Tender CLI
2
+
3
+ Command-line tools for managing Tender Apps from a local checkout.
4
+
5
+ The CLI is built for humans and local coding agents. The agent runs locally,
6
+ edits files locally, and uses normal Git plus explicit Tender API commands for
7
+ auth, preview, build, and publish. The CLI does not send prompts or chat
8
+ messages to Tender.
9
+
10
+ ## Install
11
+
12
+ ```bash
13
+ npm install -g @tenderprompt/cli
14
+ ```
15
+
16
+ Then run:
17
+
18
+ ```bash
19
+ tender --help
20
+ ```
21
+
22
+ ## Typical Flow
23
+
24
+ ```bash
25
+ tender auth login --device --profile edit-preview --artifact artifact_123 --ttl 7d
26
+
27
+ tender artifacts git setup artifact_123 --dir ./widget
28
+
29
+ cd ./widget
30
+ npm run check
31
+ git push tender main
32
+
33
+ tender artifacts preview watch artifact_123 --commit "$(git rev-parse HEAD)" --stream --json
34
+
35
+ tender artifacts publish artifact_123 --commit "$(git rev-parse HEAD)" --confirm publish --stream --json
36
+ ```
37
+
38
+ ## Auth
39
+
40
+ Use the device login flow to mint a local token:
41
+
42
+ ```bash
43
+ tender auth login --device --profile edit-preview --artifact artifact_123 --ttl 7d
44
+ ```
45
+
46
+ TTL values are intentionally bounded:
47
+
48
+ - `7d`
49
+ - `14d`
50
+ - `30d`
51
+
52
+ Use `--profile publish` only when the token should be allowed to publish.
53
+ Publish still requires explicit confirmation with `--confirm publish`.
54
+
55
+ ## Git Transport
56
+
57
+ Tender source movement uses Git:
58
+
59
+ ```bash
60
+ git push tender main
61
+ ```
62
+
63
+ A push updates artifact source and can trigger preview work. Publishing remains
64
+ an explicit lifecycle command so local agents do not accidentally publish
65
+ production changes.
66
+
67
+ ## Useful Commands
68
+
69
+ ```bash
70
+ tender artifacts list --json
71
+ tender artifacts create --name "Exit Intent Widget" --json
72
+ tender artifacts update artifact_123 --name "Sale Widget" --json
73
+ tender artifacts init artifact_123 --dir ./widget --json
74
+ tender artifacts context status artifact_123 --dir ./widget --json
75
+ tender artifacts doctor --dir ./widget --json
76
+ tender artifacts validate artifact_123 --json
77
+ tender artifacts build artifact_123 --commit "$(git rev-parse HEAD)" --json
78
+ tender artifacts preview rebuild artifact_123 --commit "$(git rev-parse HEAD)" --stream --json
79
+ tender artifacts publish artifact_123 --dry-run --json
80
+ ```
81
+
82
+ ## Safety Model
83
+
84
+ - Local agents run in the user's environment, not in Tender.
85
+ - Source moves through artifact Git.
86
+ - Preview, build, and publish are explicit API lifecycle operations.
87
+ - `write` lets a token edit and preview; `publish` must be explicitly granted.
88
+ - `tender artifacts publish` requires `--dry-run` or `--confirm publish`.
89
+ - Tokens are stored outside the project checkout and are not written into Git
90
+ remote URLs.
91
+
92
+ ## Related Package
93
+
94
+ The CLI uses `@tenderprompt/tender-app-validator` for local Tender App checks.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tenderprompt/cli",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "tender": "./bin/tender.js"
@@ -23,7 +23,7 @@
23
23
  "prepack": "yarn build"
24
24
  },
25
25
  "dependencies": {
26
- "@tenderprompt/tender-app-validator": "0.1.0"
26
+ "@tenderprompt/tender-app-validator": "0.1.2"
27
27
  },
28
28
  "engines": {
29
29
  "node": ">=20"