@fui-org/fui-cli 1.0.5 → 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 +39 -88
- package/dist/fui.js +206 -196
- package/package.json +9 -7
- package/skills/fui/SKILL.md +62 -37
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,128 +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.
|
|
66
|
-
|
|
67
|
-
Remove with `bun remove -g @fui-org/fui-cli`.
|
|
68
|
-
|
|
69
|
-
### From source
|
|
50
|
+
Ask your FUI administrator for the API address and your API token, then:
|
|
70
51
|
|
|
71
52
|
```bash
|
|
72
|
-
|
|
73
|
-
|
|
53
|
+
fui config set api-base https://<fui-api-host>
|
|
54
|
+
printf %s "$FUI_TOKEN" | fui config set api-token -
|
|
55
|
+
fui project list
|
|
74
56
|
```
|
|
75
57
|
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
### Build outputs
|
|
79
|
-
|
|
80
|
-
- `bun run build` writes `dist/fui.js`, a single minified bundle for Bun. This is the file the npm package ships; `prepack` runs it automatically.
|
|
81
|
-
- `bun run build:bin` writes `dist/fui`, a standalone executable that runs without Bun installed.
|
|
82
|
-
|
|
83
|
-
### Release
|
|
58
|
+
The token is read from stdin, so it never lands in your shell history. `fui config` shows the current settings.
|
|
84
59
|
|
|
85
|
-
|
|
60
|
+
For real-browser checks (`fui module simulate --render`, `fui component preview`), install Playwright once:
|
|
86
61
|
|
|
87
62
|
```bash
|
|
88
|
-
bun
|
|
89
|
-
bun pm version patch --no-git-tag-version
|
|
90
|
-
bun publish --otp <code>
|
|
63
|
+
bun add -g playwright && bunx playwright install chromium
|
|
91
64
|
```
|
|
92
65
|
|
|
93
|
-
|
|
66
|
+
## Updates
|
|
94
67
|
|
|
95
|
-
|
|
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`.
|
|
96
69
|
|
|
97
|
-
|
|
70
|
+
## Use with an AI agent
|
|
98
71
|
|
|
99
|
-
|
|
100
|
-
- `fui-skill/` is the FUI domain skill from Fui MCP 1.4.0, unchanged: module.json, components, tAPI and SP references, design systems.
|
|
72
|
+
`fui` installs two skills for each AI agent it finds, and refreshes them after every update:
|
|
101
73
|
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
| Claude Code | `~/.claude` (or `CLAUDE_CONFIG_DIR`) | `~/.claude/skills` |
|
|
105
|
-
| Codex | `~/.codex` (or `CODEX_HOME`) | `~/.agents/skills` |
|
|
106
|
-
| Antigravity | `~/.gemini/antigravity` | `~/.gemini/antigravity/skills` |
|
|
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.
|
|
107
76
|
|
|
108
|
-
|
|
77
|
+
| Agent | Skills folder |
|
|
78
|
+
| ----------- | ------------------------------ |
|
|
79
|
+
| Claude Code | `~/.claude/skills` |
|
|
80
|
+
| Codex | `~/.agents/skills` |
|
|
81
|
+
| Antigravity | `~/.gemini/antigravity/skills` |
|
|
109
82
|
|
|
110
|
-
|
|
83
|
+
Installed an agent later? The next `fui` run adds its skills. To install by hand:
|
|
111
84
|
|
|
112
85
|
```bash
|
|
113
|
-
fui skill install [--agent claude,codex,antigravity|all]
|
|
86
|
+
fui skill install [--agent claude,codex,antigravity|all]
|
|
114
87
|
```
|
|
115
88
|
|
|
116
89
|
## Quick tour
|
|
117
90
|
|
|
118
91
|
```bash
|
|
92
|
+
fui --help
|
|
93
|
+
fui module get /my-project/my-module
|
|
94
|
+
fui module validate
|
|
119
95
|
fui db list
|
|
120
|
-
fui query "SELECT TOP 5 * FROM tblX" --db
|
|
96
|
+
fui query "SELECT TOP 5 * FROM tblX" --db my-project/docs
|
|
121
97
|
fui schema --search student
|
|
122
98
|
fui sp get spAPI_Student_Select
|
|
123
|
-
fui sp deploy spAPI_Student_Select
|
|
124
99
|
fui file status
|
|
125
100
|
```
|
|
126
101
|
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
`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).
|
|
130
|
-
|
|
131
|
-
- **Source of truth:** `@fui-org/fui-mcp@1.4.0` is pinned as a dev dependency.
|
|
132
|
-
- **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.
|
|
133
|
-
- **What stays identical:** guards, confirmations, reading and pulling.
|
|
134
|
-
- **What changes:** output is terse, and limits that exist only for the context window can be lifted with flags.
|
|
135
|
-
|
|
136
|
-
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.
|
|
137
103
|
|
|
138
104
|
## Workspace location
|
|
139
105
|
|
|
140
|
-
`fui`
|
|
141
|
-
|
|
142
|
-
1. `--workdir <dir>`
|
|
143
|
-
2. `FUI_MCP_WORKDIR` env var
|
|
144
|
-
3. `fui config set workdir <dir>`, saved in `~/.config/fui/config.json` (respects `XDG_CONFIG_HOME`)
|
|
145
|
-
4. `FUI_MCP_WORKDIR` of the Fui MCP server in `~/.claude.json` (project scope first, then user scope; respects `CLAUDE_CONFIG_DIR`)
|
|
146
|
-
5. `~/.fui-mcp/workspaces`
|
|
106
|
+
`fui` keeps projects in `~/.fui-mcp/workspaces`, the same folder Fui MCP uses. To use another folder:
|
|
147
107
|
|
|
148
108
|
```bash
|
|
149
|
-
fui config # effective value and where it came from
|
|
150
109
|
fui config set workdir ~/work/fui
|
|
151
|
-
fui config unset workdir
|
|
152
110
|
```
|
|
153
111
|
|
|
154
|
-
##
|
|
155
|
-
|
|
156
|
-
A dbToken is Base64 of a connection string. The engine is detected from the token:
|
|
157
|
-
|
|
158
|
-
| Connection string | Engine | Transport |
|
|
159
|
-
| --------------------------------------------- | --------------- | ------------------------------------------- |
|
|
160
|
-
| `Server=...; Database=...; UID=...; PWD=...;` | MSSQL | tAPI over HTTPS, the same path Fui MCP uses |
|
|
161
|
-
| `postgres://...` | Postgres | direct, through `Bun.SQL` |
|
|
162
|
-
| `mysql://...`, `mariadb://...` | MySQL / MariaDB | direct, through `Bun.SQL` |
|
|
163
|
-
| `sqlite://...`, `file:...` | SQLite | direct, through `Bun.SQL` |
|
|
112
|
+
## Database connections
|
|
164
113
|
|
|
165
114
|
Secrets are read only from stdin (`-`) or from an env var (`--*-env VAR`):
|
|
166
115
|
|
|
167
116
|
```bash
|
|
168
|
-
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
|
|
169
118
|
fui db add local -p demo --conn-env PG_URL
|
|
119
|
+
fui db list
|
|
170
120
|
```
|
|
171
121
|
|
|
172
|
-
|
|
122
|
+
A connection is an MSSQL string (through tAPI) or a `postgres://`, `mysql://` or `sqlite://` URL.
|
|
123
|
+
|
|
124
|
+
## Uninstall
|
|
173
125
|
|
|
174
126
|
```bash
|
|
175
|
-
bun
|
|
176
|
-
bun run typecheck
|
|
177
|
-
bun run lint
|
|
178
|
-
bun run format:check
|
|
127
|
+
bun remove -g @fui-org/fui-cli
|
|
179
128
|
```
|
|
129
|
+
|
|
130
|
+
With npm: `npm uninstall -g @fui-org/fui-cli`.
|