@userland.fun/cli 0.1.3 → 0.3.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 +83 -7
- package/dist/index.js +664 -399
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -17,45 +17,121 @@ npm install -g @userland.fun/cli
|
|
|
17
17
|
Then run:
|
|
18
18
|
|
|
19
19
|
```sh
|
|
20
|
-
userland
|
|
21
|
-
userland login --
|
|
20
|
+
userland login
|
|
21
|
+
userland login --no-browser
|
|
22
|
+
userland signup
|
|
22
23
|
userland auth status
|
|
23
|
-
userland auth save-key --
|
|
24
|
+
userland auth save-key --api-key <api-key>
|
|
25
|
+
userland auth logout
|
|
26
|
+
userland auth logout --revoke
|
|
24
27
|
userland accounts list
|
|
25
28
|
userland accounts use <account-id>
|
|
29
|
+
userland accounts status --account <account-id>
|
|
30
|
+
userland accounts limits --account <account-id>
|
|
31
|
+
userland accounts downgrade preview --to free --account <account-id>
|
|
26
32
|
userland apps publish examples/<example-slug>
|
|
27
33
|
userland apps publish examples/<example-slug> --account <account-id>
|
|
28
34
|
userland apps list
|
|
29
35
|
USERLAND_ACCOUNT_ID=<account-id> userland apps list
|
|
36
|
+
userland apps status <app-id>
|
|
30
37
|
userland apps releases <app-id>
|
|
38
|
+
userland versions <app-id>
|
|
31
39
|
userland apps rollback <app-id> <release-id>
|
|
32
40
|
userland apps secrets set <app-id> <NAME> --value <value>
|
|
33
41
|
userland apps events <app-id>
|
|
42
|
+
userland apps routes list <app-id>
|
|
43
|
+
userland apps slugs add <app-id> <slug>
|
|
44
|
+
userland apps domains add <app-id> <hostname>
|
|
45
|
+
userland apps domains verify <app-id> <hostname>
|
|
34
46
|
```
|
|
35
47
|
|
|
36
48
|
From this repo, the same commands can be run from source:
|
|
37
49
|
|
|
38
50
|
```sh
|
|
39
|
-
npm run userland --
|
|
40
|
-
npm run userland -- login --
|
|
51
|
+
npm run userland -- login
|
|
52
|
+
npm run userland -- login --no-browser
|
|
53
|
+
npm run userland -- signup
|
|
41
54
|
npm run userland -- auth status
|
|
42
|
-
npm run userland -- auth save-key --
|
|
55
|
+
npm run userland -- auth save-key --api-key <api-key>
|
|
56
|
+
npm run userland -- auth logout
|
|
57
|
+
npm run userland -- auth logout --revoke
|
|
43
58
|
npm run userland -- accounts list
|
|
44
59
|
npm run userland -- accounts use <account-id>
|
|
60
|
+
npm run userland -- accounts status --account <account-id>
|
|
61
|
+
npm run userland -- accounts limits --account <account-id>
|
|
62
|
+
npm run userland -- accounts downgrade preview --to free --account <account-id>
|
|
45
63
|
npm run userland -- apps publish examples/<example-slug>
|
|
46
64
|
npm run userland -- apps publish examples/<example-slug> --account <account-id>
|
|
47
65
|
npm run userland -- apps list
|
|
48
66
|
npm run userland -- apps list --account <account-id>
|
|
67
|
+
npm run userland -- apps status <app-id>
|
|
49
68
|
npm run userland -- apps releases <app-id>
|
|
69
|
+
npm run userland -- versions <app-id>
|
|
50
70
|
npm run userland -- apps rollback <app-id> <release-id>
|
|
51
71
|
npm run userland -- apps secrets set <app-id> <NAME> --value <value>
|
|
52
72
|
npm run userland -- apps events <app-id>
|
|
73
|
+
npm run userland -- apps routes list <app-id>
|
|
74
|
+
npm run userland -- apps slugs add <app-id> <slug>
|
|
75
|
+
npm run userland -- apps domains add <app-id> <hostname>
|
|
76
|
+
npm run userland -- apps domains verify <app-id> <hostname>
|
|
53
77
|
```
|
|
54
78
|
|
|
55
|
-
`
|
|
79
|
+
`login` starts a browser device-authorization flow. The CLI prints a verification URL and user code, opens the browser when possible, waits for approval, then saves the returned API key to `~/.userland/credentials.json` with `0600` permissions. `signup` is an alias for the same flow; if the email is new, account creation happens in the browser after email proof.
|
|
80
|
+
|
|
81
|
+
The CLI does not store platform passwords. App commands prefer `USERLAND_API_KEY` when it is set, then fall back to the saved API key. `auth save-key` remains available for CI, support, and manually copied API keys.
|
|
56
82
|
|
|
57
83
|
Most users do not need to select an account. If no account is selected, the API uses the actor's default account. Team, client, and agency workflows can select an account with `--account <account-id>`, `USERLAND_ACCOUNT_ID`, or `userland accounts use <account-id>`. Platform account members manage apps, releases, secrets, billing, and settings; they are separate from app users inside a published app.
|
|
58
84
|
|
|
85
|
+
Status and limits:
|
|
86
|
+
|
|
87
|
+
```sh
|
|
88
|
+
userland accounts status --account <account-id>
|
|
89
|
+
userland accounts limits --account <account-id>
|
|
90
|
+
userland accounts downgrade preview --to starter --account <account-id>
|
|
91
|
+
userland apps status <app-id> --account <account-id>
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
`accounts limits` includes plan features, manifest limits, deployment limits, runtime limits, release limits, usage limits, current usage, and route counts.
|
|
95
|
+
|
|
96
|
+
Route management:
|
|
97
|
+
|
|
98
|
+
```sh
|
|
99
|
+
userland apps routes list <app-id> --account <account-id>
|
|
100
|
+
userland apps slugs list <app-id> --account <account-id>
|
|
101
|
+
userland apps slugs add <app-id> <slug> --account <account-id>
|
|
102
|
+
userland apps slugs remove <app-id> <slug> --account <account-id>
|
|
103
|
+
userland apps domains list <app-id> --account <account-id>
|
|
104
|
+
userland apps domains add <app-id> <hostname> --account <account-id>
|
|
105
|
+
userland apps domains verify <app-id> <hostname> --account <account-id>
|
|
106
|
+
userland apps domains remove <app-id> <hostname> --account <account-id>
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
Internal/platform-admin only operations are routed by the CLI but authorized server-side:
|
|
110
|
+
|
|
111
|
+
```sh
|
|
112
|
+
userland ops accounts status <account-id>
|
|
113
|
+
userland ops accounts flag <account-id> suspended_abuse --reason "spam"
|
|
114
|
+
userland ops accounts clear <account-id> suspended_abuse --reason "reviewed"
|
|
115
|
+
userland ops apps status <app-id>
|
|
116
|
+
userland ops apps flag <app-id> suspended_security --reason "incident"
|
|
117
|
+
userland ops apps clear <app-id> suspended_security --reason "resolved"
|
|
118
|
+
userland ops apps takedown <app-id> --reason "legal review"
|
|
119
|
+
userland ops routes disable <route-id> --status disabled_abuse --reason "abuse"
|
|
120
|
+
userland ops routes enable <route-id> --reason "resolved"
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
Structured API errors keep details on separate lines:
|
|
124
|
+
|
|
125
|
+
```text
|
|
126
|
+
API 402: Monthly request quota exceeded for the current plan.
|
|
127
|
+
error=quota_exceeded
|
|
128
|
+
metric=requests.monthly.max
|
|
129
|
+
plan_key=free
|
|
130
|
+
limit=10000
|
|
131
|
+
current=10000
|
|
132
|
+
upgrade_required=true
|
|
133
|
+
```
|
|
134
|
+
|
|
59
135
|
## Validation
|
|
60
136
|
|
|
61
137
|
Build and inspect the publish tarball:
|