@diafunc/cli 0.2.0 → 0.3.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.
- package/README.md +65 -15
- package/dist/bin/diafunc.js +1 -1
- package/dist/{chunk-YNIZ5WGU.js → chunk-PDVC2LAL.js} +640 -324
- package/dist/chunk-PDVC2LAL.js.map +1 -0
- package/dist/src/index.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-YNIZ5WGU.js.map +0 -1
package/README.md
CHANGED
|
@@ -4,19 +4,38 @@ Command-line interface for the [Diafunc](https://diafunc.com) platform.
|
|
|
4
4
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
|
7
|
+
### Shell installer (Linux, macOS — recommended)
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
curl -fsSL https://diafunc.com/cli/install.sh | sh
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Drops a single self-contained binary into `~/.local/bin/diafunc`. No Node.js required.
|
|
14
|
+
|
|
15
|
+
Environment variables:
|
|
16
|
+
|
|
17
|
+
- `DIAFUNC_CLI_VERSION` — pin to a specific version (e.g. `v0.3.0`). Defaults to the latest release.
|
|
18
|
+
- `DIAFUNC_CLI_INSTALL_DIR` — override the install directory (default `$HOME/.local/bin`).
|
|
19
|
+
|
|
20
|
+
### npm (if you already have Node.js 20+)
|
|
21
|
+
|
|
7
22
|
```bash
|
|
8
23
|
npm install -g @diafunc/cli
|
|
9
24
|
```
|
|
10
25
|
|
|
11
|
-
|
|
26
|
+
### Manual download
|
|
27
|
+
|
|
28
|
+
Pre-built binaries for Linux, macOS, and Windows are attached to each release:
|
|
29
|
+
|
|
30
|
+
- Latest from `diafunc.com`: `https://diafunc.com/cli/diafunc-<os>-<arch>.tar.gz` (and `diafunc-windows-x64.zip`)
|
|
31
|
+
- Any version: <https://gitlab.com/diafunc/cli/-/releases>
|
|
32
|
+
|
|
33
|
+
Verify the SHA-256 checksum against `SHA256SUMS` in the same release, then place the binary on your `PATH`.
|
|
12
34
|
|
|
13
35
|
## Quick Start
|
|
14
36
|
|
|
15
37
|
```bash
|
|
16
|
-
#
|
|
17
|
-
diafunc auth login --token dfat_your_token_here
|
|
18
|
-
|
|
19
|
-
# Or log in interactively
|
|
38
|
+
# Log in via the browser (OIDC device-code flow — default)
|
|
20
39
|
diafunc auth login
|
|
21
40
|
|
|
22
41
|
# Set a default project
|
|
@@ -28,10 +47,34 @@ diafunc project list
|
|
|
28
47
|
# View table data
|
|
29
48
|
diafunc table view my-table
|
|
30
49
|
|
|
31
|
-
# Run an automatic analysis
|
|
50
|
+
# Run an automatic analysis and watch it live
|
|
32
51
|
diafunc analyze data.csv --name "My Analysis" --time 2
|
|
52
|
+
diafunc analyze watch
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
## Authentication
|
|
56
|
+
|
|
57
|
+
`diafunc auth login` supports three modes:
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
# OIDC device-code flow (default) — prints a URL and a short user code,
|
|
61
|
+
# you approve in the browser, tokens are cached locally.
|
|
62
|
+
# Uses auth.<your-endpoint> (e.g. auth.diafunc.com for the default endpoint).
|
|
63
|
+
diafunc auth login
|
|
64
|
+
|
|
65
|
+
# Non-interactive, for scripts and CI. Get a token from
|
|
66
|
+
# Settings → API Tokens in the web UI.
|
|
67
|
+
diafunc auth login --token dfat_your_token_here
|
|
68
|
+
|
|
69
|
+
# Legacy username/password, kept for environments without a browser.
|
|
70
|
+
diafunc auth login --password
|
|
33
71
|
```
|
|
34
72
|
|
|
73
|
+
`diafunc auth logout` clears the local credentials and revokes the refresh
|
|
74
|
+
token at the identity provider for device-code sessions.
|
|
75
|
+
|
|
76
|
+
`diafunc auth status` shows the active profile, endpoint, and user.
|
|
77
|
+
|
|
35
78
|
## Configuration
|
|
36
79
|
|
|
37
80
|
Config is stored at `~/.diafunc/config.json` with 0600 permissions.
|
|
@@ -96,22 +139,29 @@ diafunc project create --visibility PRIVATE --dry-run
|
|
|
96
139
|
|
|
97
140
|
| Command | Description |
|
|
98
141
|
|---------|-------------|
|
|
99
|
-
| `diafunc auth` | Login, logout, status, API token management |
|
|
142
|
+
| `diafunc auth` | Login (OIDC device-code, API token, or legacy password), logout, status, API token management |
|
|
143
|
+
| `diafunc whoami` | Show the currently authenticated user |
|
|
100
144
|
| `diafunc config` | Configuration and profile management |
|
|
101
|
-
| `diafunc project` | Project CRUD, lock/unlock, member management |
|
|
145
|
+
| `diafunc project` | Project CRUD, `recent`, `update`, lock/unlock, member management |
|
|
102
146
|
| `diafunc entity` | Entity CRUD, content upload/download, history, revert |
|
|
147
|
+
| `diafunc entity-branch` | List and create parallel branches of a single entity |
|
|
103
148
|
| `diafunc link` | Create and manage links between entities |
|
|
104
149
|
| `diafunc event` | Create and manage events |
|
|
105
150
|
| `diafunc branch` | Branch management, merge, fork |
|
|
106
151
|
| `diafunc table` | View data, import CSV/Excel, export, row/column/cell operations |
|
|
107
|
-
| `diafunc function` | Execute functions
|
|
108
|
-
| `diafunc
|
|
109
|
-
| `diafunc
|
|
110
|
-
| `diafunc
|
|
152
|
+
| `diafunc function` | Execute functions and develop them: `call`, `create`, `source get/set`, `edit` (opens `$EDITOR`), `evaluations`, `last-evaluation`, `outputs`, `logs`, `stop`, `engines` |
|
|
153
|
+
| `diafunc shell` | Interactive REPL for evaluating function code (multi-line editor, language switching) |
|
|
154
|
+
| `diafunc trigger` | Create, list, inspect, and delete function triggers |
|
|
155
|
+
| `diafunc schedule` | Schedule function execution and list/stop scheduled runs |
|
|
156
|
+
| `diafunc chat` | AI chat REPL (default), plus `send` / `stream` / `upload`, `usage`, and `session list/show/rename/delete` |
|
|
111
157
|
| `diafunc search` | Search entities across projects |
|
|
112
|
-
| `diafunc group` | Group management, members, projects |
|
|
113
|
-
| `diafunc
|
|
114
|
-
| `diafunc
|
|
158
|
+
| `diafunc group` | Group management: list/get/create/update/delete, members, projects |
|
|
159
|
+
| `diafunc analyze` | Automatic analysis wizard, plus `list`, `get`, `watch` (live progress), `open` (browser) |
|
|
160
|
+
| `diafunc subscription` | View your current and upcoming subscription, plus available plans |
|
|
161
|
+
| `diafunc invoice` | List and download invoices |
|
|
162
|
+
| `diafunc utilization` | Show current credit utilization and historical usage |
|
|
163
|
+
| `diafunc status` | Platform health: summary, per-component status, incidents |
|
|
164
|
+
| `diafunc admin` | User management, subscription, settings, backups, index rebuild, permission inspection |
|
|
115
165
|
| `diafunc completion` | Generate shell completions |
|
|
116
166
|
|
|
117
167
|
Run `diafunc <command> --help` for detailed usage of any command.
|