@diafunc/cli 0.12.0 → 0.14.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 +21 -17
- package/dist/bin/diafunc.js +3 -3
- package/dist/{chunk-A4VM56MK.js → chunk-5VMDFBM6.js} +3 -3
- package/dist/chunk-5VMDFBM6.js.map +1 -0
- package/dist/{chunk-4NQYIRPF.js → chunk-V3EXWLZP.js} +603 -221
- package/dist/chunk-V3EXWLZP.js.map +1 -0
- package/dist/{chunk-BUHZT6MT.js → chunk-XXWRNCTW.js} +3 -3
- package/dist/{chunk-BUHZT6MT.js.map → chunk-XXWRNCTW.js.map} +1 -1
- package/dist/src/index.js +2 -2
- package/dist/update-check-3ZDZSY7M.js +8 -0
- package/package.json +2 -2
- package/dist/chunk-4NQYIRPF.js.map +0 -1
- package/dist/chunk-A4VM56MK.js.map +0 -1
- package/dist/update-check-SNH7P32S.js +0 -8
- /package/dist/{update-check-SNH7P32S.js.map → update-check-3ZDZSY7M.js.map} +0 -0
package/README.md
CHANGED
|
@@ -22,8 +22,8 @@ Drops a single self-contained binary at `~/.local/bin/diafunc` (Linux/macOS) or
|
|
|
22
22
|
|
|
23
23
|
Environment variables:
|
|
24
24
|
|
|
25
|
-
- `DIAFUNC_CLI_VERSION
|
|
26
|
-
- `DIAFUNC_CLI_INSTALL_DIR
|
|
25
|
+
- `DIAFUNC_CLI_VERSION`: pin to a specific version (must match the latest release; older versions are available via npm only).
|
|
26
|
+
- `DIAFUNC_CLI_INSTALL_DIR`: override the install directory.
|
|
27
27
|
|
|
28
28
|
### npm (if you already have Node.js 20+)
|
|
29
29
|
|
|
@@ -42,12 +42,12 @@ diafunc update # upgrade to the latest release
|
|
|
42
42
|
diafunc uninstall # remove the binary (and optionally ~/.diafunc/)
|
|
43
43
|
```
|
|
44
44
|
|
|
45
|
-
`diafunc update` uses the same install path as the original install
|
|
45
|
+
`diafunc update` uses the same install path as the original install: shell installer (or PowerShell installer on Windows) in place, npm-installed CLIs are pointed at `npm install -g @diafunc/cli@latest`. On Windows the running `.exe` is renamed aside before the new one is dropped in; the old file is cleaned up the next time `diafunc` runs.
|
|
46
46
|
|
|
47
47
|
## Quick Start
|
|
48
48
|
|
|
49
49
|
```bash
|
|
50
|
-
# Log in via the browser (OIDC device-code flow
|
|
50
|
+
# Log in via the browser (OIDC device-code flow, the default)
|
|
51
51
|
diafunc auth login
|
|
52
52
|
|
|
53
53
|
# Set a default project
|
|
@@ -56,6 +56,10 @@ diafunc config set defaults.project my-project
|
|
|
56
56
|
# List your projects
|
|
57
57
|
diafunc project list
|
|
58
58
|
|
|
59
|
+
# Create a table and load a file into it
|
|
60
|
+
diafunc table create my-table --name "My Table"
|
|
61
|
+
diafunc table import my-table data.csv
|
|
62
|
+
|
|
59
63
|
# View table data
|
|
60
64
|
diafunc table view my-table
|
|
61
65
|
|
|
@@ -73,7 +77,7 @@ diafunc analyze watch
|
|
|
73
77
|
`diafunc auth login` supports three modes:
|
|
74
78
|
|
|
75
79
|
```bash
|
|
76
|
-
# OIDC device-code flow (default)
|
|
80
|
+
# OIDC device-code flow (default): prints a URL and a short user code,
|
|
77
81
|
# you approve in the browser, tokens are cached locally.
|
|
78
82
|
# Uses auth.<your-endpoint> (e.g. auth.diafunc.com for the default endpoint).
|
|
79
83
|
diafunc auth login
|
|
@@ -188,12 +192,12 @@ Nothing is asked when stdin or stdout is not a terminal, with `--output json`, o
|
|
|
188
192
|
| `diafunc schedule` | Schedule function execution and list/stop scheduled runs |
|
|
189
193
|
| `diafunc chat` | AI chat REPL (default), plus `send` / `stream` / `upload`, `usage`, and `session list/show/rename/delete` |
|
|
190
194
|
| `diafunc search` | Search entities across projects |
|
|
191
|
-
| `diafunc analyze` |
|
|
195
|
+
| `diafunc analyze` | Run an automatic analysis on a data file and follow it live (interactive when run from a terminal), plus `list`, `get`, `watch`, `open`, `runs`, `cancel`, `presets`, `triggers` (see [doc/analyze.md](./doc/analyze.md)) |
|
|
192
196
|
| `diafunc subscription` | View your current and upcoming subscription, plus available plans |
|
|
193
197
|
| `diafunc invoice` | List and download invoices |
|
|
194
|
-
| `diafunc utilization` | Show current credit utilization and
|
|
198
|
+
| `diafunc utilization` | Show current credit utilization, and with `history` what each day of the billing cycle cost |
|
|
195
199
|
| `diafunc status` | Platform health: summary, per-component status, incidents |
|
|
196
|
-
| `diafunc admin` | User management, subscription, settings, backups, index rebuild, permission inspection |
|
|
200
|
+
| `diafunc admin` | User management, subscription, settings, platform settings, backups, index rebuild, permission inspection |
|
|
197
201
|
| `diafunc completion` | Generate shell completions |
|
|
198
202
|
|
|
199
203
|
Run `diafunc <command> --help` for detailed usage of any command.
|
|
@@ -201,10 +205,10 @@ Run `diafunc <command> --help` for detailed usage of any command.
|
|
|
201
205
|
## Shell Completions
|
|
202
206
|
|
|
203
207
|
```bash
|
|
204
|
-
# Bash
|
|
208
|
+
# Bash: add to ~/.bashrc
|
|
205
209
|
eval "$(diafunc completion bash)"
|
|
206
210
|
|
|
207
|
-
# Zsh
|
|
211
|
+
# Zsh: add to ~/.zshrc
|
|
208
212
|
eval "$(diafunc completion zsh)"
|
|
209
213
|
|
|
210
214
|
# Fish
|
|
@@ -223,7 +227,7 @@ npm run lint # TypeScript type check
|
|
|
223
227
|
|
|
224
228
|
## Releasing to npm
|
|
225
229
|
|
|
226
|
-
Publishing is fully automated via GitLab CI using [npm trusted publishing](https://docs.npmjs.com/trusted-publishers/) over OIDC
|
|
230
|
+
Publishing is fully automated via GitLab CI using [npm trusted publishing](https://docs.npmjs.com/trusted-publishers/) over OIDC, so no long-lived tokens are stored anywhere.
|
|
227
231
|
|
|
228
232
|
### One-time setup on npmjs.com
|
|
229
233
|
|
|
@@ -241,24 +245,24 @@ The first publish must be done manually (run `npm publish` locally) to create th
|
|
|
241
245
|
|
|
242
246
|
### Cutting a release
|
|
243
247
|
|
|
244
|
-
**Option A
|
|
248
|
+
**Option A, from the terminal:**
|
|
245
249
|
|
|
246
250
|
```bash
|
|
247
|
-
npm version patch # or minor / major
|
|
251
|
+
npm version patch # or minor / major; bumps package.json, commits, creates tag
|
|
248
252
|
git push origin main --follow-tags
|
|
249
253
|
```
|
|
250
254
|
|
|
251
|
-
**Option B
|
|
255
|
+
**Option B, from the GitLab UI:**
|
|
252
256
|
|
|
253
257
|
1. First bump `package.json` `version` via a small MR (or direct commit to `main`).
|
|
254
258
|
2. Go to https://gitlab.com/diafunc/cli/-/releases/new and create a new release with tag `v<version>` from `main`.
|
|
255
259
|
|
|
256
260
|
Either way, pushing a `vX.Y.Z` tag triggers two CI jobs:
|
|
257
|
-
- `publish
|
|
258
|
-
- `gitlab-release
|
|
261
|
+
- `publish`: builds and publishes to npm via OIDC trusted publishing (npm generates [provenance attestations](https://docs.npmjs.com/generating-provenance-statements) automatically)
|
|
262
|
+
- `gitlab-release`: creates a GitLab Release entry linking to the npm package
|
|
259
263
|
|
|
260
264
|
No manual steps after the tag push.
|
|
261
265
|
|
|
262
266
|
## License
|
|
263
267
|
|
|
264
|
-
Apache License 2.0
|
|
268
|
+
Apache License 2.0; see [LICENSE](./LICENSE).
|
package/dist/bin/diafunc.js
CHANGED
|
@@ -4,13 +4,13 @@ import {
|
|
|
4
4
|
PromptCancelled,
|
|
5
5
|
createProgram,
|
|
6
6
|
handleError
|
|
7
|
-
} from "../chunk-
|
|
7
|
+
} from "../chunk-V3EXWLZP.js";
|
|
8
8
|
import {
|
|
9
9
|
getUpdateNotice
|
|
10
|
-
} from "../chunk-
|
|
10
|
+
} from "../chunk-XXWRNCTW.js";
|
|
11
11
|
import {
|
|
12
12
|
package_default
|
|
13
|
-
} from "../chunk-
|
|
13
|
+
} from "../chunk-5VMDFBM6.js";
|
|
14
14
|
|
|
15
15
|
// bin/diafunc.ts
|
|
16
16
|
import chalk2 from "chalk";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
// package.json
|
|
2
2
|
var package_default = {
|
|
3
3
|
name: "@diafunc/cli",
|
|
4
|
-
version: "0.
|
|
5
|
-
description: "Diafunc CLI
|
|
4
|
+
version: "0.14.0",
|
|
5
|
+
description: "Diafunc CLI: the command-line interface for the Diafunc platform",
|
|
6
6
|
type: "module",
|
|
7
7
|
bin: {
|
|
8
8
|
diafunc: "./dist/bin/diafunc.js"
|
|
@@ -62,4 +62,4 @@ var package_default = {
|
|
|
62
62
|
export {
|
|
63
63
|
package_default
|
|
64
64
|
};
|
|
65
|
-
//# sourceMappingURL=chunk-
|
|
65
|
+
//# sourceMappingURL=chunk-5VMDFBM6.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../package.json"],"sourcesContent":["{\n \"name\": \"@diafunc/cli\",\n \"version\": \"0.14.0\",\n \"description\": \"Diafunc CLI: the command-line interface for the Diafunc platform\",\n \"type\": \"module\",\n \"bin\": {\n \"diafunc\": \"./dist/bin/diafunc.js\"\n },\n \"homepage\": \"https://diafunc.com\",\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"git+https://gitlab.com/diafunc/cli.git\"\n },\n \"bugs\": {\n \"url\": \"https://gitlab.com/diafunc/cli/-/issues\"\n },\n \"author\": \"Markus Pollak <markus.pollak@diafunc.com>\",\n \"scripts\": {\n \"build\": \"tsup && node -e \\\"const fs=require('fs');const f='dist/bin/diafunc.js';fs.writeFileSync(f,'#!/usr/bin/env node\\\\n'+fs.readFileSync(f,'utf8'))\\\"\",\n \"dev\": \"tsup --watch\",\n \"test\": \"vitest run\",\n \"test:watch\": \"vitest\",\n \"lint\": \"tsc --noEmit\",\n \"start\": \"node dist/bin/diafunc.js\",\n \"prepublishOnly\": \"npm run lint && npm test && npm run build\"\n },\n \"files\": [\n \"dist\",\n \"LICENSE\",\n \"README.md\"\n ],\n \"keywords\": [\n \"diafunc\",\n \"cli\",\n \"data-science\",\n \"symbolic-regression\"\n ],\n \"license\": \"Apache-2.0\",\n \"publishConfig\": {\n \"access\": \"public\",\n \"registry\": \"https://registry.npmjs.org/\"\n },\n \"engines\": {\n \"node\": \">=20.0.0\"\n },\n \"dependencies\": {\n \"@inquirer/prompts\": \"^7.0.0\",\n \"chalk\": \"^5.4.0\",\n \"cli-table3\": \"^0.6.5\",\n \"commander\": \"^12.1.0\",\n \"ora\": \"^8.1.0\"\n },\n \"devDependencies\": {\n \"@types/node\": \"^22.0.0\",\n \"tsup\": \"^8.3.0\",\n \"typescript\": \"^5.6.0\",\n \"vitest\": \"^2.1.0\"\n }\n}\n"],"mappings":";AAAA;AAAA,EACE,MAAQ;AAAA,EACR,SAAW;AAAA,EACX,aAAe;AAAA,EACf,MAAQ;AAAA,EACR,KAAO;AAAA,IACL,SAAW;AAAA,EACb;AAAA,EACA,UAAY;AAAA,EACZ,YAAc;AAAA,IACZ,MAAQ;AAAA,IACR,KAAO;AAAA,EACT;AAAA,EACA,MAAQ;AAAA,IACN,KAAO;AAAA,EACT;AAAA,EACA,QAAU;AAAA,EACV,SAAW;AAAA,IACT,OAAS;AAAA,IACT,KAAO;AAAA,IACP,MAAQ;AAAA,IACR,cAAc;AAAA,IACd,MAAQ;AAAA,IACR,OAAS;AAAA,IACT,gBAAkB;AAAA,EACpB;AAAA,EACA,OAAS;AAAA,IACP;AAAA,IACA;AAAA,IACA;AAAA,EACF;AAAA,EACA,UAAY;AAAA,IACV;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AAAA,EACA,SAAW;AAAA,EACX,eAAiB;AAAA,IACf,QAAU;AAAA,IACV,UAAY;AAAA,EACd;AAAA,EACA,SAAW;AAAA,IACT,MAAQ;AAAA,EACV;AAAA,EACA,cAAgB;AAAA,IACd,qBAAqB;AAAA,IACrB,OAAS;AAAA,IACT,cAAc;AAAA,IACd,WAAa;AAAA,IACb,KAAO;AAAA,EACT;AAAA,EACA,iBAAmB;AAAA,IACjB,eAAe;AAAA,IACf,MAAQ;AAAA,IACR,YAAc;AAAA,IACd,QAAU;AAAA,EACZ;AACF;","names":[]}
|