@fui-org/fui-cli 1.0.4 → 1.1.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 +42 -78
- package/dist/fui.js +208 -196
- package/package.json +9 -7
- package/skills/fui/SKILL.md +63 -38
package/README.md
CHANGED
|
@@ -1,17 +1,6 @@
|
|
|
1
1
|
# fui
|
|
2
2
|
|
|
3
|
-
A
|
|
4
|
-
|
|
5
|
-
v1 covers the database workflow:
|
|
6
|
-
|
|
7
|
-
- connections
|
|
8
|
-
- SQL
|
|
9
|
-
- schema
|
|
10
|
-
- stored procedures
|
|
11
|
-
|
|
12
|
-
It shares the Fui MCP workspace, so existing connections work immediately.
|
|
13
|
-
|
|
14
|
-
Design: [docs/specs/2026-09-28-fui-cli-v1-design.md](docs/specs/2026-09-28-fui-cli-v1-design.md)
|
|
3
|
+
A command-line tool for the FUI low-code platform: projects, modules, components, imports, users, rights, database connections, SQL, schema and stored procedures. It works with AI agents (Claude Code, Codex, Antigravity) and replaces the Fui MCP server.
|
|
15
4
|
|
|
16
5
|
## Install
|
|
17
6
|
|
|
@@ -52,115 +41,90 @@ bun add -g @fui-org/fui-cli
|
|
|
52
41
|
fui --version
|
|
53
42
|
```
|
|
54
43
|
|
|
55
|
-
This puts `fui` on your `PATH`, in `~/.bun/bin` on macOS and Linux and in `%USERPROFILE%\.bun\bin` on Windows.
|
|
44
|
+
This puts `fui` on your `PATH`, in `~/.bun/bin` on macOS and Linux and in `%USERPROFILE%\.bun\bin` on Windows.
|
|
56
45
|
|
|
57
|
-
|
|
58
|
-
bunx --package @fui-org/fui-cli fui --help
|
|
59
|
-
```
|
|
46
|
+
Already use Node.js 22 or later? `npm install -g @fui-org/fui-cli` works too. Also install Node.js 22+ on a Bun-only machine, because `fui` starts through `node`. Postgres and MySQL connections need Bun.
|
|
60
47
|
|
|
61
|
-
|
|
48
|
+
### 3. Set up
|
|
62
49
|
|
|
63
|
-
|
|
64
|
-
- Turn it off with `fui config set auto-update off` or `FUI_AUTO_UPDATE=0`.
|
|
65
|
-
- A `bun link` checkout or a compiled binary never replaces itself; `fui update` prints the install command instead.
|
|
50
|
+
Ask your FUI administrator for the API address and your API token, then:
|
|
66
51
|
|
|
67
|
-
|
|
52
|
+
```bash
|
|
53
|
+
fui config set api-base https://<fui-api-host>
|
|
54
|
+
printf %s "$FUI_TOKEN" | fui config set api-token -
|
|
55
|
+
fui project list
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
The token is read from stdin, so it never lands in your shell history. `fui config` shows the current settings.
|
|
68
59
|
|
|
69
|
-
|
|
60
|
+
For real-browser checks (`fui module simulate --render`, `fui component preview`), install Playwright once:
|
|
70
61
|
|
|
71
62
|
```bash
|
|
72
|
-
bun install
|
|
73
|
-
bun link
|
|
63
|
+
bun add -g playwright && bunx playwright install chromium
|
|
74
64
|
```
|
|
75
65
|
|
|
76
|
-
|
|
66
|
+
## Updates
|
|
77
67
|
|
|
78
|
-
|
|
68
|
+
`fui` updates itself in the background, at most once an hour, and prints one line after an update. `fui update` updates now, and `fui update --check` only reports. Turn it off with `fui config set auto-update off`.
|
|
79
69
|
|
|
80
|
-
|
|
81
|
-
- `bun run build:bin` writes `dist/fui`, a standalone executable that runs without Bun installed.
|
|
82
|
-
|
|
83
|
-
### Release
|
|
70
|
+
## Use with an AI agent
|
|
84
71
|
|
|
85
|
-
|
|
72
|
+
`fui` installs two skills for each AI agent it finds, and refreshes them after every update:
|
|
86
73
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
bun pm version patch --no-git-tag-version
|
|
90
|
-
bun publish --otp <code>
|
|
91
|
-
```
|
|
74
|
+
- `fui` teaches the agent the commands and safety rules. `fui skill` prints it.
|
|
75
|
+
- `fui-skill` holds the FUI domain rules: module.json, components, tAPI and stored procedures, design systems.
|
|
92
76
|
|
|
93
|
-
|
|
77
|
+
| Agent | Skills folder |
|
|
78
|
+
| ----------- | ------------------------------ |
|
|
79
|
+
| Claude Code | `~/.claude/skills` |
|
|
80
|
+
| Codex | `~/.agents/skills` |
|
|
81
|
+
| Antigravity | `~/.gemini/antigravity/skills` |
|
|
94
82
|
|
|
95
|
-
|
|
83
|
+
Installed an agent later? The next `fui` run adds its skills. To install by hand:
|
|
96
84
|
|
|
97
85
|
```bash
|
|
98
|
-
fui skill install
|
|
86
|
+
fui skill install [--agent claude,codex,antigravity|all]
|
|
99
87
|
```
|
|
100
88
|
|
|
101
|
-
This writes `~/.claude/skills/fui/SKILL.md`, which teaches the agent the commands, output format, exit codes and safety rules. `fui skill` prints the same guide.
|
|
102
|
-
|
|
103
89
|
## Quick tour
|
|
104
90
|
|
|
105
91
|
```bash
|
|
92
|
+
fui --help
|
|
93
|
+
fui module get /my-project/my-module
|
|
94
|
+
fui module validate
|
|
106
95
|
fui db list
|
|
107
|
-
fui query "SELECT TOP 5 * FROM tblX" --db
|
|
96
|
+
fui query "SELECT TOP 5 * FROM tblX" --db my-project/docs
|
|
108
97
|
fui schema --search student
|
|
109
98
|
fui sp get spAPI_Student_Select
|
|
110
|
-
fui sp deploy spAPI_Student_Select
|
|
111
99
|
fui file status
|
|
112
100
|
```
|
|
113
101
|
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
`fui` ports Fui MCP 1.4.0 tool by tool. The spec is [docs/specs/2026-09-28-fui-cli-v2-parity-design.md](docs/specs/2026-09-28-fui-cli-v2-parity-design.md).
|
|
117
|
-
|
|
118
|
-
- **Source of truth:** `@fui-org/fui-mcp@1.4.0` is pinned as a dev dependency.
|
|
119
|
-
- **Parity tests:** `test/parity/` runs its real tool handlers next to `fui` on twin workspaces. They compare the HTTP requests, the files written and the outcome byte for byte.
|
|
120
|
-
- **What stays identical:** guards, confirmations, reading and pulling.
|
|
121
|
-
- **What changes:** output is terse, and limits that exist only for the context window can be lifted with flags.
|
|
122
|
-
|
|
123
|
-
Commands already ported, and the MCP tools still to come, are listed in the `fui` skill (`fui skill`).
|
|
102
|
+
`fui <command> --help` shows the options of one command.
|
|
124
103
|
|
|
125
104
|
## Workspace location
|
|
126
105
|
|
|
127
|
-
`fui`
|
|
128
|
-
|
|
129
|
-
1. `--workdir <dir>`
|
|
130
|
-
2. `FUI_MCP_WORKDIR` env var
|
|
131
|
-
3. `fui config set workdir <dir>`, saved in `~/.config/fui/config.json` (respects `XDG_CONFIG_HOME`)
|
|
132
|
-
4. `FUI_MCP_WORKDIR` of the Fui MCP server in `~/.claude.json` (project scope first, then user scope; respects `CLAUDE_CONFIG_DIR`)
|
|
133
|
-
5. `~/.fui-mcp/workspaces`
|
|
106
|
+
`fui` keeps projects in `~/.fui-mcp/workspaces`, the same folder Fui MCP uses. To use another folder:
|
|
134
107
|
|
|
135
108
|
```bash
|
|
136
|
-
fui config # effective value and where it came from
|
|
137
109
|
fui config set workdir ~/work/fui
|
|
138
|
-
fui config unset workdir
|
|
139
110
|
```
|
|
140
111
|
|
|
141
|
-
##
|
|
142
|
-
|
|
143
|
-
A dbToken is Base64 of a connection string. The engine is detected from the token:
|
|
144
|
-
|
|
145
|
-
| Connection string | Engine | Transport |
|
|
146
|
-
| --------------------------------------------- | --------------- | ------------------------------------------- |
|
|
147
|
-
| `Server=...; Database=...; UID=...; PWD=...;` | MSSQL | tAPI over HTTPS, the same path Fui MCP uses |
|
|
148
|
-
| `postgres://...` | Postgres | direct, through `Bun.SQL` |
|
|
149
|
-
| `mysql://...`, `mariadb://...` | MySQL / MariaDB | direct, through `Bun.SQL` |
|
|
150
|
-
| `sqlite://...`, `file:...` | SQLite | direct, through `Bun.SQL` |
|
|
112
|
+
## Database connections
|
|
151
113
|
|
|
152
114
|
Secrets are read only from stdin (`-`) or from an env var (`--*-env VAR`):
|
|
153
115
|
|
|
154
116
|
```bash
|
|
155
|
-
printf %s "$TOKEN" | fui db add docs -p
|
|
117
|
+
printf %s "$TOKEN" | fui db add docs -p my-project --token - --api-domain tapi.example.edu.vn
|
|
156
118
|
fui db add local -p demo --conn-env PG_URL
|
|
119
|
+
fui db list
|
|
157
120
|
```
|
|
158
121
|
|
|
159
|
-
|
|
122
|
+
A connection is an MSSQL string (through tAPI) or a `postgres://`, `mysql://` or `sqlite://` URL.
|
|
123
|
+
|
|
124
|
+
## Uninstall
|
|
160
125
|
|
|
161
126
|
```bash
|
|
162
|
-
bun
|
|
163
|
-
bun run typecheck
|
|
164
|
-
bun run lint
|
|
165
|
-
bun run format:check
|
|
127
|
+
bun remove -g @fui-org/fui-cli
|
|
166
128
|
```
|
|
129
|
+
|
|
130
|
+
With npm: `npm uninstall -g @fui-org/fui-cli`.
|