@carllee1983/dbcli 1.31.0 → 1.37.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/.agents/plugins/marketplace.json +21 -0
- package/.claude-plugin/plugin.json +9 -0
- package/.codex-plugin/plugin.json +41 -0
- package/.cursor/rules/dbcli.mdc +541 -0
- package/.cursor/skills/dbcli/SKILL.md +106 -0
- package/.cursor/skills/dbcli/reference.md +2232 -0
- package/.cursor-plugin/plugin.json +36 -0
- package/.github/skills/dbcli/SKILL.md +541 -0
- package/.github/skills/dbcli/reference.md +2232 -0
- package/CHANGELOG.md +81 -0
- package/README.md +38 -1
- package/README.zh-TW.md +37 -1
- package/assets/SKILL.md +86 -2
- package/assets/SKILL.zh-TW.md +71 -3
- package/assets/reference.md +286 -1
- package/assets/tasks/audit-permissions.md +35 -0
- package/assets/tasks/connection-health.md +37 -0
- package/assets/tasks/migration-review.md +41 -0
- package/assets/tasks/pr-database-review.md +38 -0
- package/assets/tasks/safe-backfill-verify.md +63 -0
- package/assets/tasks/safe-backfill.md +42 -0
- package/assets/tasks/schema-drift-review.md +37 -0
- package/assets/tasks/slow-endpoint-investigation.md +40 -0
- package/dist/cli.mjs +55833 -63508
- package/dist/core.mjs +1 -1
- package/gemini-extension.json +6 -0
- package/package.json +18 -5
- package/plugins/dbcli-agent/.codex-plugin/plugin.json +40 -0
- package/plugins/dbcli-agent/INSTALL.md +241 -0
- package/plugins/dbcli-agent/README.md +89 -0
- package/plugins/dbcli-agent/scripts/install-dbcli.sh +15 -0
- package/plugins/dbcli-agent/scripts/install-skills.sh +83 -0
- package/plugins/dbcli-agent/skills/dbcli/SKILL.md +541 -0
- package/plugins/dbcli-agent/skills/dbcli/reference.md +2232 -0
- package/skills/dbcli/SKILL.md +541 -0
- package/skills/dbcli/reference.md +2232 -0
package/dist/core.mjs
CHANGED
|
@@ -21987,7 +21987,7 @@ function redactSensitive(text) {
|
|
|
21987
21987
|
return text.replace(/\b(password|token|apiKey|secret|key|token|auth|credential|pass|pwd|sid)([:=]|\s+)([^\s"';,]+)/gi, "$1$2<redacted>");
|
|
21988
21988
|
}
|
|
21989
21989
|
function redactSql(sql) {
|
|
21990
|
-
const redacted = sql.replace(/(['"])(?:(?!\1|\\).|\\.)*\1/g, "'?'").replace(/\b\d+(\.\d+)?\b/g, "0");
|
|
21990
|
+
const redacted = sql.replace(/\$(\w*)\$[\s\S]*?\$\1\$/g, "'?'").replace(/(['"])(?:(?!\1|\\).|\\.)*\1/g, "'?'").replace(/\b\d+(\.\d+)?\b/g, "0");
|
|
21991
21991
|
return redactSensitive(redacted);
|
|
21992
21992
|
}
|
|
21993
21993
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@carllee1983/dbcli",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.37.0",
|
|
4
4
|
"description": "Database CLI for AI agents",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"publishConfig": {
|
|
@@ -44,6 +44,15 @@
|
|
|
44
44
|
"files": [
|
|
45
45
|
"dist/",
|
|
46
46
|
"assets/",
|
|
47
|
+
"plugins/",
|
|
48
|
+
"skills/",
|
|
49
|
+
".codex-plugin/",
|
|
50
|
+
".claude-plugin/",
|
|
51
|
+
".cursor-plugin/",
|
|
52
|
+
".agents/",
|
|
53
|
+
".cursor/",
|
|
54
|
+
".github/skills/",
|
|
55
|
+
"gemini-extension.json",
|
|
47
56
|
"README.md",
|
|
48
57
|
"CHANGELOG.md",
|
|
49
58
|
"LICENSE"
|
|
@@ -53,15 +62,19 @@
|
|
|
53
62
|
"build": "bun run scripts/build.ts",
|
|
54
63
|
"prepublishOnly": "bun run build",
|
|
55
64
|
"release:check": "bash scripts/release-check.sh",
|
|
65
|
+
"plugin:sync": "bun run scripts/sync-plugin-assets.ts --write",
|
|
66
|
+
"plugin:check": "bun run scripts/sync-plugin-assets.ts",
|
|
56
67
|
"test": "bun test",
|
|
57
68
|
"test:unit": "bun test tests/unit tests/core",
|
|
58
69
|
"test:integration": "bun test tests/integration",
|
|
59
70
|
"test:docker": "docker compose -f docker-compose.test.yml up -d --wait && bun test tests/integration/adapters; docker compose -f docker-compose.test.yml down",
|
|
60
71
|
"docs:check": "bun run scripts/check-user-docs.ts",
|
|
72
|
+
"skill:check": "bun run scripts/check-skill-parity.ts",
|
|
73
|
+
"platform:check": "bun run scripts/check-platform-parity.ts",
|
|
61
74
|
"typecheck": "tsc --noEmit --pretty false",
|
|
62
75
|
"test:perf": "bun test ./tests/perf/*.bench.ts",
|
|
63
|
-
"lint": "eslint src tests --ext .ts --max-warnings=0",
|
|
64
|
-
"lint:fix": "eslint src tests --ext .ts --fix --max-warnings=0",
|
|
76
|
+
"lint": "eslint src tests scripts --ext .ts --max-warnings=0",
|
|
77
|
+
"lint:fix": "eslint src tests scripts --ext .ts --fix --max-warnings=0",
|
|
65
78
|
"format": "prettier --write \"src/**/*.ts\" \"tests/**/*.ts\""
|
|
66
79
|
},
|
|
67
80
|
"dependencies": {
|
|
@@ -82,7 +95,7 @@
|
|
|
82
95
|
},
|
|
83
96
|
"devDependencies": {
|
|
84
97
|
"@eslint/js": "^9.39.4",
|
|
85
|
-
"@happy-dom/global-registrator": "^20.
|
|
98
|
+
"@happy-dom/global-registrator": "^20.10.6",
|
|
86
99
|
"@inquirer/prompts": "^8.4.3",
|
|
87
100
|
"@testing-library/react": "^16.3.2",
|
|
88
101
|
"@types/bun": "latest",
|
|
@@ -92,7 +105,7 @@
|
|
|
92
105
|
"autoprefixer": "^10.5.0",
|
|
93
106
|
"dts-bundle-generator": "^9.5.1",
|
|
94
107
|
"eslint": "^10.4.0",
|
|
95
|
-
"happy-dom": "^20.
|
|
108
|
+
"happy-dom": "^20.10.6",
|
|
96
109
|
"postcss": "^8.5.14",
|
|
97
110
|
"prettier": "^3.8.3",
|
|
98
111
|
"tailwindcss": "3.4.1",
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "dbcli-agent",
|
|
3
|
+
"version": "1.31.0",
|
|
4
|
+
"description": "Database CLI skill and command reference for AI agents",
|
|
5
|
+
"author": {
|
|
6
|
+
"name": "Carl Lee",
|
|
7
|
+
"url": "https://github.com/CarlLee1983"
|
|
8
|
+
},
|
|
9
|
+
"homepage": "https://github.com/CarlLee1983/dbcli",
|
|
10
|
+
"repository": "https://github.com/CarlLee1983/dbcli",
|
|
11
|
+
"license": "MIT",
|
|
12
|
+
"keywords": [
|
|
13
|
+
"database",
|
|
14
|
+
"cli",
|
|
15
|
+
"ai-agent",
|
|
16
|
+
"postgresql",
|
|
17
|
+
"mysql",
|
|
18
|
+
"mongodb",
|
|
19
|
+
"redis",
|
|
20
|
+
"elasticsearch"
|
|
21
|
+
],
|
|
22
|
+
"skills": "./skills/",
|
|
23
|
+
"interface": {
|
|
24
|
+
"displayName": "dbcli Agent",
|
|
25
|
+
"shortDescription": "Use dbcli safely from Codex.",
|
|
26
|
+
"longDescription": "Installs the dbcli agent skill and reference guide so Codex can inspect schemas, query databases, respect blacklist boundaries, and recover from database errors through the dbcli command workflow.",
|
|
27
|
+
"developerName": "Carl Lee",
|
|
28
|
+
"category": "Productivity",
|
|
29
|
+
"capabilities": [
|
|
30
|
+
"Database",
|
|
31
|
+
"Local CLI",
|
|
32
|
+
"Agent Skill"
|
|
33
|
+
],
|
|
34
|
+
"defaultPrompt": [
|
|
35
|
+
"Inspect my database with dbcli.",
|
|
36
|
+
"Show schema safely with dbcli.",
|
|
37
|
+
"Diagnose a dbcli query failure."
|
|
38
|
+
]
|
|
39
|
+
}
|
|
40
|
+
}
|
|
@@ -0,0 +1,241 @@
|
|
|
1
|
+
# dbcli Agent Plugin Installation
|
|
2
|
+
|
|
3
|
+
This repo follows the same installation shape as
|
|
4
|
+
`DietrichGebert/ponytail`: the repository root contains the plugin metadata, a
|
|
5
|
+
marketplace file, and portable agent skill/rule copies.
|
|
6
|
+
|
|
7
|
+
## What Gets Installed
|
|
8
|
+
|
|
9
|
+
The canonical skill files are:
|
|
10
|
+
|
|
11
|
+
- `skills/dbcli/SKILL.md`
|
|
12
|
+
- `skills/dbcli/reference.md`
|
|
13
|
+
|
|
14
|
+
The skill tells agents how to use dbcli safely, including permission checks,
|
|
15
|
+
blacklist rules, schema confirmation, dry runs, recovery envelopes, and the
|
|
16
|
+
`bunx @carllee1983/dbcli <command>` fallback when `dbcli` is not globally
|
|
17
|
+
installed.
|
|
18
|
+
|
|
19
|
+
## Claude Code
|
|
20
|
+
|
|
21
|
+
In Claude Code:
|
|
22
|
+
|
|
23
|
+
```text
|
|
24
|
+
/plugin marketplace add CarlLee1983/dbcli
|
|
25
|
+
/plugin install dbcli-agent@dbcli-agent
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
Start a new Claude Code session after install so the skill is reloaded.
|
|
29
|
+
|
|
30
|
+
## GitHub Copilot CLI
|
|
31
|
+
|
|
32
|
+
From a shell:
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
copilot plugin marketplace add CarlLee1983/dbcli
|
|
36
|
+
copilot plugin install dbcli-agent@dbcli-agent
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
In an interactive Copilot CLI session, use the slash equivalents:
|
|
40
|
+
|
|
41
|
+
```text
|
|
42
|
+
/plugin marketplace add CarlLee1983/dbcli
|
|
43
|
+
/plugin install dbcli-agent@dbcli-agent
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
For instruction-only project fallback, this repo also ships:
|
|
47
|
+
|
|
48
|
+
```text
|
|
49
|
+
.github/skills/dbcli/SKILL.md
|
|
50
|
+
.github/skills/dbcli/reference.md
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
## Codex
|
|
54
|
+
|
|
55
|
+
From a shell:
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
codex plugin marketplace add CarlLee1983/dbcli
|
|
59
|
+
codex
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
Then open `/plugins`, select the dbcli Agent marketplace, and install
|
|
63
|
+
`dbcli-agent`. Start a new thread after install.
|
|
64
|
+
|
|
65
|
+
The same marketplace install also applies to the Codex desktop app after it
|
|
66
|
+
reloads plugin metadata.
|
|
67
|
+
|
|
68
|
+
## Antigravity CLI
|
|
69
|
+
|
|
70
|
+
Antigravity (`agy`) can install from the GitHub repository URL:
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
agy plugin install https://github.com/CarlLee1983/dbcli
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
The repo also includes `gemini-extension.json`, matching the extension layout
|
|
77
|
+
used by Gemini/Antigravity-style agents.
|
|
78
|
+
|
|
79
|
+
## Cursor
|
|
80
|
+
|
|
81
|
+
Cursor can install plugins from Cursor Agent chat when the plugin is available
|
|
82
|
+
in Cursor's plugin marketplace:
|
|
83
|
+
|
|
84
|
+
```text
|
|
85
|
+
/add-plugin dbcli-agent
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
Or search for `dbcli-agent` in Cursor's plugin marketplace.
|
|
89
|
+
|
|
90
|
+
This repository includes Cursor plugin metadata at:
|
|
91
|
+
|
|
92
|
+
```text
|
|
93
|
+
.cursor-plugin/plugin.json
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
For Cursor marketplace review/indexing:
|
|
97
|
+
|
|
98
|
+
1. Push this repository to GitHub and keep it public.
|
|
99
|
+
2. Keep the single-plugin layout at the repository root:
|
|
100
|
+
`.cursor-plugin/plugin.json` plus `skills/dbcli/`.
|
|
101
|
+
3. Confirm the manifest name is lowercase kebab-case (`dbcli-agent`) and that
|
|
102
|
+
`category`, `tags`, `homepage`, `repository`, and `skills` are present.
|
|
103
|
+
4. Submit the repository URL to the Cursor plugin team for review/indexing.
|
|
104
|
+
The Cursor plugin template currently points submitters to the Cursor
|
|
105
|
+
community Slack or `kniparko@anysphere.com`.
|
|
106
|
+
5. After indexing, users can install from Cursor Agent chat with
|
|
107
|
+
`/add-plugin dbcli-agent` or by searching the Cursor plugin marketplace.
|
|
108
|
+
|
|
109
|
+
The repo also keeps an instruction-file fallback for projects that want to
|
|
110
|
+
vendor the dbcli rule and reference directly.
|
|
111
|
+
|
|
112
|
+
### Fallback A: from an existing dbcli checkout
|
|
113
|
+
|
|
114
|
+
Run this from the target project where Cursor should see dbcli:
|
|
115
|
+
|
|
116
|
+
```bash
|
|
117
|
+
DBCLI_REPO=/path/to/dbcli
|
|
118
|
+
mkdir -p .cursor/rules .cursor/skills/dbcli
|
|
119
|
+
cp "$DBCLI_REPO/.cursor/rules/dbcli.mdc" .cursor/rules/dbcli.mdc
|
|
120
|
+
cp "$DBCLI_REPO/.cursor/skills/dbcli/reference.md" .cursor/skills/dbcli/reference.md
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
### Fallback B: clone dbcli first
|
|
124
|
+
|
|
125
|
+
```bash
|
|
126
|
+
git clone https://github.com/CarlLee1983/dbcli.git /tmp/dbcli-agent-plugin
|
|
127
|
+
cd /path/to/your/project
|
|
128
|
+
mkdir -p .cursor/rules .cursor/skills/dbcli
|
|
129
|
+
cp /tmp/dbcli-agent-plugin/.cursor/rules/dbcli.mdc .cursor/rules/dbcli.mdc
|
|
130
|
+
cp /tmp/dbcli-agent-plugin/.cursor/skills/dbcli/reference.md .cursor/skills/dbcli/reference.md
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
### Fallback C: from this repo checkout
|
|
134
|
+
|
|
135
|
+
When your shell is already inside the dbcli checkout, the local installer writes
|
|
136
|
+
the Cursor files into the current working directory:
|
|
137
|
+
|
|
138
|
+
```bash
|
|
139
|
+
plugins/dbcli-agent/scripts/install-skills.sh cursor
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
Open or reload the target project in Cursor after installing fallback files.
|
|
143
|
+
Cursor should read:
|
|
144
|
+
|
|
145
|
+
```text
|
|
146
|
+
.cursor/rules/dbcli.mdc
|
|
147
|
+
.cursor/skills/dbcli/reference.md
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
## Local Checkout Installer
|
|
151
|
+
|
|
152
|
+
If you are working from a checkout and want to install the skill into all
|
|
153
|
+
supported local targets at once:
|
|
154
|
+
|
|
155
|
+
```bash
|
|
156
|
+
plugins/dbcli-agent/scripts/install-skills.sh all
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
Single-target installs:
|
|
160
|
+
|
|
161
|
+
```bash
|
|
162
|
+
plugins/dbcli-agent/scripts/install-skills.sh codex
|
|
163
|
+
plugins/dbcli-agent/scripts/install-skills.sh claude
|
|
164
|
+
plugins/dbcli-agent/scripts/install-skills.sh copilot
|
|
165
|
+
plugins/dbcli-agent/scripts/install-skills.sh antigravity
|
|
166
|
+
plugins/dbcli-agent/scripts/install-skills.sh agy
|
|
167
|
+
plugins/dbcli-agent/scripts/install-skills.sh cursor
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
`agy` is an alias for `antigravity`.
|
|
171
|
+
|
|
172
|
+
Install targets:
|
|
173
|
+
|
|
174
|
+
| Target | Installed files |
|
|
175
|
+
| --- | --- |
|
|
176
|
+
| Codex | `~/.codex/skills/dbcli/SKILL.md` and `reference.md` |
|
|
177
|
+
| Claude Code | `~/.claude/skills/dbcli/SKILL.md` and `reference.md` |
|
|
178
|
+
| GitHub Copilot CLI | `.github/skills/dbcli/SKILL.md` and `reference.md` |
|
|
179
|
+
| Antigravity | `~/.gemini/antigravity-cli/skills/dbcli/SKILL.md` and `reference.md` |
|
|
180
|
+
| Cursor | `.cursor/rules/dbcli.mdc` and `.cursor/skills/dbcli/reference.md` |
|
|
181
|
+
|
|
182
|
+
## Optional: Install the dbcli CLI
|
|
183
|
+
|
|
184
|
+
The skill can run dbcli through `bunx`, so a global CLI install is not required.
|
|
185
|
+
For a persistent `dbcli` executable in `PATH`, run:
|
|
186
|
+
|
|
187
|
+
```bash
|
|
188
|
+
plugins/dbcli-agent/scripts/install-dbcli.sh
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
The installer prefers Bun:
|
|
192
|
+
|
|
193
|
+
```bash
|
|
194
|
+
bun install -g @carllee1983/dbcli
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
If Bun is unavailable but npm exists, it falls back to:
|
|
198
|
+
|
|
199
|
+
```bash
|
|
200
|
+
npm install -g @carllee1983/dbcli
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
## Verify Installation
|
|
204
|
+
|
|
205
|
+
For local script installs, check the files for the targets you installed:
|
|
206
|
+
|
|
207
|
+
```bash
|
|
208
|
+
test -f ~/.codex/skills/dbcli/SKILL.md
|
|
209
|
+
test -f ~/.claude/skills/dbcli/SKILL.md
|
|
210
|
+
test -f ~/.gemini/antigravity-cli/skills/dbcli/SKILL.md
|
|
211
|
+
test -f .github/skills/dbcli/SKILL.md
|
|
212
|
+
test -f .cursor/rules/dbcli.mdc
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
For marketplace installs, open a new agent session and confirm the `dbcli`
|
|
216
|
+
skill is listed or can be invoked by a database task.
|
|
217
|
+
|
|
218
|
+
## Keep Plugin Assets In Sync
|
|
219
|
+
|
|
220
|
+
The portable copies are generated from:
|
|
221
|
+
|
|
222
|
+
- `assets/SKILL.md`
|
|
223
|
+
- `assets/reference.md`
|
|
224
|
+
|
|
225
|
+
After editing either source file, refresh and check every copy:
|
|
226
|
+
|
|
227
|
+
```bash
|
|
228
|
+
bun run plugin:sync
|
|
229
|
+
bun run plugin:check
|
|
230
|
+
```
|
|
231
|
+
|
|
232
|
+
## Troubleshooting
|
|
233
|
+
|
|
234
|
+
If an agent cannot run `dbcli`, first check whether Bun is available:
|
|
235
|
+
|
|
236
|
+
```bash
|
|
237
|
+
bunx @carllee1983/dbcli --version
|
|
238
|
+
```
|
|
239
|
+
|
|
240
|
+
If that works, the skill can use dbcli without a global install. If it fails,
|
|
241
|
+
install Bun or use the persistent CLI installer above.
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
# dbcli Agent Plugin
|
|
2
|
+
|
|
3
|
+
Agent skill bundle for dbcli.
|
|
4
|
+
|
|
5
|
+
Full installation instructions: [INSTALL.md](./INSTALL.md).
|
|
6
|
+
|
|
7
|
+
This repo can be installed like the Ponytail plugin. Use the command set for
|
|
8
|
+
your agent:
|
|
9
|
+
|
|
10
|
+
## Claude Code
|
|
11
|
+
|
|
12
|
+
```text
|
|
13
|
+
/plugin marketplace add CarlLee1983/dbcli
|
|
14
|
+
/plugin install dbcli-agent@dbcli-agent
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Codex
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
codex plugin marketplace add CarlLee1983/dbcli
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Then open `/plugins` and install `dbcli-agent`.
|
|
24
|
+
|
|
25
|
+
## GitHub Copilot CLI
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
copilot plugin marketplace add CarlLee1983/dbcli
|
|
29
|
+
copilot plugin install dbcli-agent@dbcli-agent
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## Antigravity CLI
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
agy plugin install https://github.com/CarlLee1983/dbcli
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## Cursor
|
|
39
|
+
|
|
40
|
+
In Cursor Agent chat:
|
|
41
|
+
|
|
42
|
+
```text
|
|
43
|
+
/add-plugin dbcli-agent
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Or search for `dbcli-agent` in Cursor's plugin marketplace. Fallback copy
|
|
47
|
+
instructions are in [INSTALL.md](./INSTALL.md#cursor).
|
|
48
|
+
|
|
49
|
+
Cursor marketplace review/indexing requires the GitHub repository URL and the
|
|
50
|
+
root `.cursor-plugin/plugin.json`; submission steps are documented in
|
|
51
|
+
[INSTALL.md](./INSTALL.md#cursor).
|
|
52
|
+
|
|
53
|
+
Installing it as a plugin makes the `dbcli` skill available from
|
|
54
|
+
`skills/dbcli/SKILL.md`, with the full command reference next to it.
|
|
55
|
+
|
|
56
|
+
The same bundled skill files can also be installed into Claude Code,
|
|
57
|
+
Antigravity, and Cursor without requiring a global `dbcli` install:
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
plugins/dbcli-agent/scripts/install-skills.sh all
|
|
61
|
+
plugins/dbcli-agent/scripts/install-skills.sh codex
|
|
62
|
+
plugins/dbcli-agent/scripts/install-skills.sh claude
|
|
63
|
+
plugins/dbcli-agent/scripts/install-skills.sh antigravity
|
|
64
|
+
plugins/dbcli-agent/scripts/install-skills.sh agy
|
|
65
|
+
plugins/dbcli-agent/scripts/install-skills.sh cursor
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
Install targets:
|
|
69
|
+
|
|
70
|
+
- Codex: `~/.codex/skills/dbcli/`
|
|
71
|
+
- Claude Code: `~/.claude/skills/dbcli/`
|
|
72
|
+
- Antigravity: `~/.gemini/antigravity-cli/skills/dbcli/`
|
|
73
|
+
- Cursor: `.cursor/rules/dbcli.mdc` plus `.cursor/skills/dbcli/reference.md`
|
|
74
|
+
|
|
75
|
+
The skill uses `dbcli` when it is already installed and falls back to
|
|
76
|
+
`bunx @carllee1983/dbcli <command>` when the executable is not on `PATH`.
|
|
77
|
+
|
|
78
|
+
For a persistent global CLI, run:
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
plugins/dbcli-agent/scripts/install-dbcli.sh
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
The plugin skill files are copied from `assets/SKILL.md` and
|
|
85
|
+
`assets/reference.md`. Refresh them with:
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
bun run plugin:sync
|
|
89
|
+
```
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
set -euo pipefail
|
|
3
|
+
|
|
4
|
+
if command -v bun >/dev/null 2>&1; then
|
|
5
|
+
bun install -g @carllee1983/dbcli
|
|
6
|
+
exit 0
|
|
7
|
+
fi
|
|
8
|
+
|
|
9
|
+
if command -v npm >/dev/null 2>&1; then
|
|
10
|
+
npm install -g @carllee1983/dbcli
|
|
11
|
+
exit 0
|
|
12
|
+
fi
|
|
13
|
+
|
|
14
|
+
echo "Install Bun or npm first, then run: bun install -g @carllee1983/dbcli" >&2
|
|
15
|
+
exit 1
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
set -euo pipefail
|
|
3
|
+
|
|
4
|
+
script_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
5
|
+
plugin_root="$(cd "${script_dir}/.." && pwd)"
|
|
6
|
+
skill_dir="${plugin_root}/skills/dbcli"
|
|
7
|
+
skill_file="${skill_dir}/SKILL.md"
|
|
8
|
+
reference_file="${skill_dir}/reference.md"
|
|
9
|
+
|
|
10
|
+
usage() {
|
|
11
|
+
cat <<'EOF'
|
|
12
|
+
Usage:
|
|
13
|
+
install-skills.sh [all|codex|claude|copilot|antigravity|agy|cursor]
|
|
14
|
+
|
|
15
|
+
Installs the bundled dbcli skill files into agent-specific locations:
|
|
16
|
+
codex ~/.codex/skills/dbcli/
|
|
17
|
+
claude ~/.claude/skills/dbcli/
|
|
18
|
+
copilot ./.github/skills/dbcli/
|
|
19
|
+
antigravity ~/.gemini/antigravity-cli/skills/dbcli/
|
|
20
|
+
cursor ./.cursor/rules/dbcli.mdc + ./.cursor/skills/dbcli/reference.md
|
|
21
|
+
|
|
22
|
+
Default: all
|
|
23
|
+
EOF
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
copy_pair() {
|
|
27
|
+
local target_dir="$1"
|
|
28
|
+
mkdir -p "${target_dir}"
|
|
29
|
+
cp "${skill_file}" "${target_dir}/SKILL.md"
|
|
30
|
+
cp "${reference_file}" "${target_dir}/reference.md"
|
|
31
|
+
printf 'installed %s\n' "${target_dir}"
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
install_cursor() {
|
|
35
|
+
mkdir -p ".cursor/rules" ".cursor/skills/dbcli"
|
|
36
|
+
cp "${skill_file}" ".cursor/rules/dbcli.mdc"
|
|
37
|
+
cp "${reference_file}" ".cursor/skills/dbcli/reference.md"
|
|
38
|
+
printf 'installed %s\n' ".cursor/rules/dbcli.mdc"
|
|
39
|
+
printf 'installed %s\n' ".cursor/skills/dbcli/reference.md"
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
install_platform() {
|
|
43
|
+
local platform="$1"
|
|
44
|
+
case "${platform}" in
|
|
45
|
+
codex)
|
|
46
|
+
copy_pair "${HOME}/.codex/skills/dbcli"
|
|
47
|
+
;;
|
|
48
|
+
claude)
|
|
49
|
+
copy_pair "${HOME}/.claude/skills/dbcli"
|
|
50
|
+
;;
|
|
51
|
+
copilot)
|
|
52
|
+
copy_pair ".github/skills/dbcli"
|
|
53
|
+
;;
|
|
54
|
+
antigravity|agy)
|
|
55
|
+
copy_pair "${HOME}/.gemini/antigravity-cli/skills/dbcli"
|
|
56
|
+
;;
|
|
57
|
+
cursor)
|
|
58
|
+
install_cursor
|
|
59
|
+
;;
|
|
60
|
+
all)
|
|
61
|
+
install_platform codex
|
|
62
|
+
install_platform claude
|
|
63
|
+
install_platform copilot
|
|
64
|
+
install_platform antigravity
|
|
65
|
+
install_platform cursor
|
|
66
|
+
;;
|
|
67
|
+
-h|--help|help)
|
|
68
|
+
usage
|
|
69
|
+
;;
|
|
70
|
+
*)
|
|
71
|
+
printf 'Unknown platform: %s\n\n' "${platform}" >&2
|
|
72
|
+
usage >&2
|
|
73
|
+
exit 2
|
|
74
|
+
;;
|
|
75
|
+
esac
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
if [[ ! -f "${skill_file}" || ! -f "${reference_file}" ]]; then
|
|
79
|
+
printf 'Missing bundled skill files under %s\n' "${skill_dir}" >&2
|
|
80
|
+
exit 1
|
|
81
|
+
fi
|
|
82
|
+
|
|
83
|
+
install_platform "${1:-all}"
|