@jelou/cli 0.1.0 → 0.1.1

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 (3) hide show
  1. package/LICENSE +25 -0
  2. package/README.md +238 -0
  3. package/package.json +1 -1
package/LICENSE ADDED
@@ -0,0 +1,25 @@
1
+ Copyright 2026 Jelou Inc. All rights reserved.
2
+
3
+ This software and associated documentation files (the "Software") are the
4
+ proprietary property of Jelou Inc. ("Jelou").
5
+
6
+ Permission is hereby granted to any person who obtains a copy of this Software
7
+ to use the Software solely for the purpose of interacting with services
8
+ provided by Jelou, subject to the following conditions:
9
+
10
+ 1. You may not modify, merge, publish, distribute, sublicense, or sell copies
11
+ of the Software.
12
+
13
+ 2. You may not reverse engineer, decompile, or disassemble the Software.
14
+
15
+ 3. You may not use the Software to build a competing product or service.
16
+
17
+ 4. The above copyright notice and this permission notice shall be included in
18
+ all copies or substantial portions of the Software.
19
+
20
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL JELOU
23
+ INC. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
24
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
25
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,238 @@
1
+ # @jelou/cli
2
+
3
+ Command-line tool for building, deploying, and managing
4
+ [Jelou Functions](https://jelou.ai) — serverless TypeScript functions on the
5
+ edge.
6
+
7
+ ```bash
8
+ jelou login
9
+ jelou init
10
+ jelou dev
11
+ jelou deploy
12
+ ```
13
+
14
+ ## Install
15
+
16
+ ```bash
17
+ # npm (recommended)
18
+ npm install -g @jelou/cli
19
+
20
+ # npx (no install)
21
+ npx @jelou/cli deploy
22
+
23
+ # Deno
24
+ deno install -A -n jelou jsr:@jelou/cli
25
+ ```
26
+
27
+ After installing, the `jelou` binary is available globally.
28
+
29
+ ## Authentication
30
+
31
+ ```bash
32
+ jelou login
33
+ # Paste your access token (starts with jfn_pat_)
34
+ ```
35
+
36
+ Or set the `JELOU_TOKEN` environment variable to skip interactive login:
37
+
38
+ ```bash
39
+ export JELOU_TOKEN=jfn_pat_your_token_here
40
+ jelou functions list
41
+ ```
42
+
43
+ | Command | Description |
44
+ | -------------- | -------------------------------- |
45
+ | `jelou login` | Save access token to `~/.jelou/` |
46
+ | `jelou logout` | Remove stored credentials |
47
+ | `jelou whoami` | Show current identity and scopes |
48
+
49
+ ## Quick Start
50
+
51
+ ```bash
52
+ mkdir my-function && cd my-function
53
+ jelou init
54
+ # Creates index.ts, jelou.json, .env, .gitignore
55
+
56
+ jelou dev
57
+ # Local server at http://localhost:3000 with hot reload
58
+
59
+ jelou deploy
60
+ # Ships to production
61
+ ```
62
+
63
+ ## Commands
64
+
65
+ ### Project
66
+
67
+ | Command | Description |
68
+ | ------------ | -------------------------------------- |
69
+ | `jelou init` | Scaffold a new function project |
70
+ | `jelou dev` | Start local dev server with hot reload |
71
+
72
+ **`jelou dev` options:**
73
+
74
+ | Flag | Default | Description |
75
+ | ------------ | ------- | --------------------- |
76
+ | `--port` | `3000` | Port to listen on |
77
+ | `--env` | `.env` | Path to env file |
78
+ | `--no-watch` | — | Disable file watching |
79
+
80
+ ### Deploy & Rollback
81
+
82
+ | Command | Description |
83
+ | -------------------------------------- | ------------------------------- |
84
+ | `jelou deploy` | Deploy current directory |
85
+ | `jelou rollback [slug] [deploymentId]` | Rollback to previous deployment |
86
+
87
+ **`jelou deploy` options:**
88
+
89
+ | Flag | Description |
90
+ | -------------- | ------------------------ |
91
+ | `--no-confirm` | Skip confirmation prompt |
92
+ | `--follow, -f` | Tail logs after deploy |
93
+
94
+ ### Functions
95
+
96
+ | Command | Description |
97
+ | ------------------------ | --------------------- |
98
+ | `jelou functions list` | List all functions |
99
+ | `jelou functions info` | Show function details |
100
+ | `jelou functions create` | Create a new function |
101
+ | `jelou functions delete` | Delete a function |
102
+
103
+ ### Secrets
104
+
105
+ | Command | Description |
106
+ | ----------------------------------------- | ---------------- |
107
+ | `jelou secrets list [slug]` | List secret keys |
108
+ | `jelou secrets set [slug] [...KEY=VALUE]` | Set secrets |
109
+ | `jelou secrets delete <slug> <key>` | Delete a secret |
110
+
111
+ ```bash
112
+ # Inline
113
+ jelou secrets set my-fn API_KEY=sk-123 DB_URL=postgres://...
114
+
115
+ # From file
116
+ jelou secrets set my-fn --from-env .env.production
117
+
118
+ # Interactive
119
+ jelou secrets set my-fn
120
+ ```
121
+
122
+ ### Tokens
123
+
124
+ | Command | Description |
125
+ | -------------------------- | ----------------------------------- |
126
+ | `jelou tokens list` | List all PAT tokens |
127
+ | `jelou tokens create` | Create a new token (admin required) |
128
+ | `jelou tokens revoke <id>` | Revoke a token |
129
+
130
+ ### Monitoring
131
+
132
+ | Command | Description |
133
+ | ----------------------------- | ---------------------- |
134
+ | `jelou logs [slug]` | Stream live logs |
135
+ | `jelou logs [slug] --history` | Fetch historical logs |
136
+ | `jelou cron list [slug]` | List cron schedules |
137
+ | `jelou analytics` | View company analytics |
138
+
139
+ ## CI / Non-Interactive Mode
140
+
141
+ Every command works in CI pipelines without hanging on prompts.
142
+
143
+ ### Global Flags
144
+
145
+ | Flag | Description |
146
+ | ------------ | -------------------------------- |
147
+ | `--no-input` | Disable all interactive prompts |
148
+ | `--json` | Output structured JSON to stdout |
149
+
150
+ Non-interactive mode is **auto-detected** when:
151
+
152
+ - `CI=true` environment variable is set (GitHub Actions, GitLab CI, etc.)
153
+ - `JELOU_NO_INPUT=1` is set
154
+ - stdin is not a TTY (piped input)
155
+
156
+ ### JSON Output
157
+
158
+ All data commands support `--json`. Output format: `{ "ok": true, "data": ... }`
159
+
160
+ ```bash
161
+ jelou functions list --json | jq '.data[].slug'
162
+ jelou whoami --json | jq '.data.scopes'
163
+ jelou deploy --no-confirm --json | jq '.data.url'
164
+ ```
165
+
166
+ ### Per-Command CI Flags
167
+
168
+ | Command | Flags |
169
+ | ------------------ | ---------------------------------------------- |
170
+ | `login` | `--token <token>` |
171
+ | `init` | `--slug`, `--description`, `--mode`, `--force` |
172
+ | `functions create` | `--slug`, `--name`, `--description` |
173
+ | `functions delete` | `--yes, -y` |
174
+ | `tokens create` | `--name`, `--scopes` (comma-separated) |
175
+ | `tokens revoke` | `--yes, -y` |
176
+ | `deploy` | `--no-confirm` |
177
+
178
+ ### GitHub Actions Example
179
+
180
+ ```yaml
181
+ - name: Deploy function
182
+ env:
183
+ JELOU_TOKEN: ${{ secrets.JELOU_TOKEN }}
184
+ run: |
185
+ npx @jelou/cli secrets set my-fn API_KEY=${{ secrets.API_KEY }}
186
+ npx @jelou/cli deploy --no-confirm --json | jq '.data.url'
187
+ ```
188
+
189
+ ### Full CI Example
190
+
191
+ ```bash
192
+ export JELOU_TOKEN=jfn_pat_...
193
+
194
+ # Create a token for CI
195
+ jelou tokens create --name ci-deploy --scopes functions:read,functions:deploy --json
196
+
197
+ # Init without prompts
198
+ jelou init --slug my-fn --mode create --force
199
+
200
+ # Deploy and capture URL
201
+ DEPLOY_URL=$(jelou deploy --no-confirm --json | jq -r '.data.url')
202
+ echo "Deployed to $DEPLOY_URL"
203
+ ```
204
+
205
+ ## Configuration
206
+
207
+ ### Project — `jelou.json`
208
+
209
+ Created by `jelou init` in your project root:
210
+
211
+ ```json
212
+ {
213
+ "function": "my-function",
214
+ "entrypoint": "index.ts"
215
+ }
216
+ ```
217
+
218
+ ### User — `~/.jelou/`
219
+
220
+ | File | Purpose |
221
+ | ------------------ | ------------------------------ |
222
+ | `credentials.json` | Saved token from `jelou login` |
223
+ | `config.json` | API URL override (optional) |
224
+
225
+ ### Environment Variables
226
+
227
+ | Variable | Description |
228
+ | ---------------- | --------------------------------------------- |
229
+ | `JELOU_TOKEN` | Access token (overrides saved credentials) |
230
+ | `JELOU_API_URL` | API base URL override |
231
+ | `CI` | Auto-enables non-interactive mode when `true` |
232
+ | `JELOU_NO_INPUT` | Disables interactive prompts when `1` |
233
+
234
+ ## License
235
+
236
+ Copyright 2026 Jelou Inc. All rights reserved.
237
+
238
+ See [LICENSE](./LICENSE) for details.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jelou/cli",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Jelou Functions CLI — deploy serverless TypeScript functions to the edge",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "repository": {