@dboio/cli 0.19.1 → 0.19.4
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/package.json +1 -1
- package/plugins/claude/dbo/.claude-plugin/plugin.json +14 -2
- package/plugins/claude/dbo/README.md +93 -0
- package/plugins/claude/dbo/commands/dbo.md +33 -41
- package/plugins/claude/dbo/hooks/hooks.json +11 -0
- package/plugins/claude/dbo/skills/white-paper/SKILL.md +225 -0
- package/plugins/claude/dbo/skills/white-paper/references/api-reference.md +172 -0
- package/plugins/claude/dbo/skills/white-paper/references/deploy-and-scripts.md +210 -0
- package/plugins/claude/dbo/skills/white-paper/references/template-syntax.md +178 -0
- package/plugins/claude/track/.claude-plugin/plugin.json +20 -0
- package/plugins/claude/track/README.md +135 -0
- package/plugins/claude/track/commands/install.md +96 -0
- package/plugins/claude/track/hooks/hooks.json +11 -0
- package/plugins/claude/track/skills/changelog/SKILL.md +87 -0
- package/src/commands/clone.js +24 -0
- package/plugins/claude/dbo/skills/cli/SKILL.md +0 -97
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: changelog
|
|
3
|
+
description: >-
|
|
4
|
+
Changelog and Track API logging instructions. Load this skill at SessionStart
|
|
5
|
+
or any time Claude needs to know when and how to write changelog.md entries
|
|
6
|
+
and submit log entries to the Track task_log API. Applies to all projects
|
|
7
|
+
unless the local CLAUDE.md explicitly opts out.
|
|
8
|
+
user-invokable: false
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# Changelog & Track Logging
|
|
12
|
+
|
|
13
|
+
Track all changes made by Claude across sessions. Log entries **after** making changes, not before.
|
|
14
|
+
|
|
15
|
+
## Opt-out
|
|
16
|
+
|
|
17
|
+
If the current project's CLAUDE.md (or any CLAUDE.md in the directory hierarchy) contains an explicit directive such as **"Do not write changelog entries or call the Track API for this project"** or **"Skip all changelog.md writes and Track API calls"**, honour it and do not log anything for that project. The local directive overrides these instructions.
|
|
18
|
+
|
|
19
|
+
## When to log
|
|
20
|
+
|
|
21
|
+
- **Always**: after writing or editing source files in any project
|
|
22
|
+
- **Additionally for DBO apps** (has `.dbo/` or `.app/config.json`): after pushing any asset to the server
|
|
23
|
+
|
|
24
|
+
## File location
|
|
25
|
+
|
|
26
|
+
- `<project-memory-dir>/changelog.md`
|
|
27
|
+
- The project memory directory is the per-project auto-memory path shown in the session context (e.g., `~/.claude/projects/<encoded-path>/memory/`)
|
|
28
|
+
- If `changelog.md` does not exist, create it with the header row before adding the first entry
|
|
29
|
+
|
|
30
|
+
## Format
|
|
31
|
+
|
|
32
|
+
```
|
|
33
|
+
| Date | Time | Asset Type | Name | UID | Description |
|
|
34
|
+
|------|------|-----------|------|-----|-------------|
|
|
35
|
+
| YYYY-MM-DD | HH:MM | type | Name | uid | Short description |
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
- **Date**: `YYYY-MM-DD`
|
|
39
|
+
- **Time**: `HH:MM` in the user's local timezone (24-hour format)
|
|
40
|
+
- **DBO projects**: Asset Type from `_entity` in the metadata JSON (output, content, entity, security, site, etc.)
|
|
41
|
+
- **Non-DBO projects**: Asset Type is the file role (e.g., view, model, controller, service, config). UID column can be left as `---`
|
|
42
|
+
- **Description**: 50–75 chars max, focus on *why* not *what*
|
|
43
|
+
|
|
44
|
+
## Track API — Remote task_log
|
|
45
|
+
|
|
46
|
+
In addition to the local `changelog.md`, write each log entry to the centralized Track `task_log` table via the REST API. This applies from **any project**, not just Track itself.
|
|
47
|
+
|
|
48
|
+
### Auth
|
|
49
|
+
|
|
50
|
+
- Cookie file: `~/.claude/track-cookies.txt`
|
|
51
|
+
- To log in: user runs `~/.claude/track-changelog` in a terminal
|
|
52
|
+
- Track domain: `beta-track.dbo.io`
|
|
53
|
+
|
|
54
|
+
### Session check (run once per session, before the first log entry)
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
curl -s -b ~/.claude/track-cookies.txt 'https://beta-track.dbo.io/api/o/asqor6nmxuiwqbhldlki7g'
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
- Returns a JSON array with `ContactID`, `FirstName`, etc. → session is valid; use the `ContactID` value for all log entries this session
|
|
61
|
+
- Returns `[]` → **not logged in**. Tell the user: "Track Access Denied. Run `~/.claude/track-changelog` and try again." Do NOT retry or attempt to log in on their behalf.
|
|
62
|
+
|
|
63
|
+
### Writing a log entry
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
curl -s -b ~/.claude/track-cookies.txt \
|
|
67
|
+
'https://beta-track.dbo.io/api/input/submit?_confirm=true' \
|
|
68
|
+
--data-urlencode 'RowID:add1;column:todoes.task_log.ContactID=<ContactID from session>' \
|
|
69
|
+
--data-urlencode 'RowID:add1;column:todoes.task_log.AssistantContactID=27' \
|
|
70
|
+
--data-urlencode 'RowID:add1;column:todoes.task_log.Date=_{now}' \
|
|
71
|
+
--data-urlencode 'RowID:add1;column:todoes.task_log.Summary=<summary, max 100 chars>' \
|
|
72
|
+
--data-urlencode 'RowID:add1;column:todoes.task_log.Description=<detailed description>'
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
Field notes:
|
|
76
|
+
- **ContactID**: from the session check response (the human user's ID)
|
|
77
|
+
- **AssistantContactID**: always `27` (Claude's fixed Contact ID in Track)
|
|
78
|
+
- **Date**: `_{now}` — the server resolves this to the current datetime
|
|
79
|
+
- **Summary**: short title of what was done, max 100 chars
|
|
80
|
+
- **Description**: detailed explanation of why/how the change was made; can be longer. ASCII only — no unicode arrows, emoji, or non-ASCII characters
|
|
81
|
+
- **TaskID**: include if the work relates to a known task: `--data-urlencode 'RowID:add1;column:todoes.task_log.TaskID=<id>'`
|
|
82
|
+
- **TimeID**: omit (a server trigger will associate it automatically)
|
|
83
|
+
|
|
84
|
+
### Error handling
|
|
85
|
+
|
|
86
|
+
- If the API returns `"Successful": false` or an HTTP error, write the entry to `changelog.md` anyway and warn the user about the Track API failure
|
|
87
|
+
- If the session expires mid-conversation (403 or `[]` on a subsequent check), tell the user to re-run `~/.claude/track-changelog`
|
package/src/commands/clone.js
CHANGED
|
@@ -19,6 +19,7 @@ import { runPendingMigrations } from '../lib/migrations.js';
|
|
|
19
19
|
import { upsertDeployEntry } from '../lib/deploy-config.js';
|
|
20
20
|
import { syncDependencies, parseDependenciesColumn } from '../lib/dependencies.js';
|
|
21
21
|
import { sep } from 'path';
|
|
22
|
+
import { installOrUpdateClaudeCommands } from './install.js';
|
|
22
23
|
|
|
23
24
|
/** True when cwd is inside app_dependencies/ (dependency checkout clone). */
|
|
24
25
|
function isDependencyCheckout() {
|
|
@@ -1480,6 +1481,29 @@ export async function performClone(source, options = {}) {
|
|
|
1480
1481
|
if (!options.pullMode) {
|
|
1481
1482
|
log.dim(' Run "dbo login" to authenticate, then "dbo push" to deploy changes');
|
|
1482
1483
|
}
|
|
1484
|
+
|
|
1485
|
+
// Offer to install Claude Code plugins on fresh clone (not pull, not dependency checkout)
|
|
1486
|
+
if (!options.pullMode && !isDependencyCheckout()) {
|
|
1487
|
+
const pluginsDir = join(process.cwd(), '.claude', 'plugins');
|
|
1488
|
+
let pluginsAlreadyInstalled = false;
|
|
1489
|
+
try {
|
|
1490
|
+
const entries = await readdir(pluginsDir);
|
|
1491
|
+
pluginsAlreadyInstalled = entries.length > 0;
|
|
1492
|
+
} catch { /* directory doesn't exist */ }
|
|
1493
|
+
|
|
1494
|
+
if (!pluginsAlreadyInstalled) {
|
|
1495
|
+
const inquirer = (await import('inquirer')).default;
|
|
1496
|
+
const { install } = await inquirer.prompt([{
|
|
1497
|
+
type: 'confirm',
|
|
1498
|
+
name: 'install',
|
|
1499
|
+
message: 'Install Claude Code plugins for this project? (adds /dbo and /track commands)',
|
|
1500
|
+
default: true,
|
|
1501
|
+
}]);
|
|
1502
|
+
if (install) {
|
|
1503
|
+
await installOrUpdateClaudeCommands({ local: true });
|
|
1504
|
+
}
|
|
1505
|
+
}
|
|
1506
|
+
}
|
|
1483
1507
|
}
|
|
1484
1508
|
|
|
1485
1509
|
/**
|
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: cli
|
|
3
|
-
description: Run DBO.io CLI commands for local file sync, project management, and deployment (push/pull/clone/add/rm/diff/build/deploy). NOT for direct API operations — use docs/ for that.
|
|
4
|
-
allowed-tools: Read, Write, Glob, Bash(git status:*), Bash(git branch:*), Bash(git diff:*), Bash(ls:*), Bash(dbo init:*), Bash(dbo login:*), Bash(dbo status:*), Bash(dbo deploy:*), Bash(dbo add:*), Bash(dbo clone:*), Bash(dbo push:*), Bash(dbo pull:*), Bash(dbo diff:*), Bash(dbo rm:*), Bash(dbo mv:*), Bash(dbo run:*), Bash(dbo install:*), Bash(git stash:*), Bash(grep:*), Bash(which dbo:*)
|
|
5
|
-
user-invokable: true
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
# DBO CLI Skill
|
|
9
|
-
|
|
10
|
-
Run `dbo` CLI commands for local file sync, project management, and deployment.
|
|
11
|
-
|
|
12
|
-
## When to use this skill
|
|
13
|
-
|
|
14
|
-
Use this skill when the user wants to:
|
|
15
|
-
- Run a local workflow command (push, pull, clone, add, rm, diff, build, deploy)
|
|
16
|
-
- Set up a project (`dbo init`, `dbo login`, `dbo clone`)
|
|
17
|
-
- Deploy files to the server (`dbo push`, `dbo deploy`)
|
|
18
|
-
|
|
19
|
-
## When NOT to use this skill
|
|
20
|
-
|
|
21
|
-
Do NOT use this skill for direct API operations. The following CLI commands are thin wrappers around REST endpoints — use the `docs/` reference instead for the canonical API syntax:
|
|
22
|
-
- `dbo input` wraps `POST /api/input/submit` — use `docs/dbo-cheat-sheet.md`
|
|
23
|
-
- `dbo output` wraps `GET /api/output/` — use `docs/dbo-output-query.md`
|
|
24
|
-
- `dbo content` wraps `GET /api/content/` — use `docs/dbo-cheat-sheet.md`
|
|
25
|
-
- `dbo media` wraps `GET /api/media/` — use `docs/dbo-cheat-sheet.md`
|
|
26
|
-
- `dbo upload` wraps `POST /api/upload/submit` — use `docs/dbo-cheat-sheet.md`
|
|
27
|
-
- `dbo message` wraps `GET /api/message/` — use `docs/dbo-cheat-sheet.md`
|
|
28
|
-
- `dbo cache` wraps `/api/cache/` — use `docs/dbo-cheat-sheet.md`
|
|
29
|
-
|
|
30
|
-
Also do NOT use this skill for:
|
|
31
|
-
- **Entity schemas / column names** — use `docs/dbo-core-entities.md`
|
|
32
|
-
- **Token/tag syntax** (`#{...}`, `<#_embed>`, etc.) — use `docs/dbo-cheat-sheet.md`
|
|
33
|
-
- **Building server-side templates or content records** — use `docs/`
|
|
34
|
-
|
|
35
|
-
All doc files are bundled in the `docs/` subdirectory of this plugin (copied during npm publish). When working in the repo, the API docs are at the repo root `docs/` and the CLI README is at `tools/cli/README.md`.
|
|
36
|
-
|
|
37
|
-
For detailed CLI command flags, options, and behavior — read `docs/dbo-cli-readme.md`.
|
|
38
|
-
|
|
39
|
-
## Running commands
|
|
40
|
-
|
|
41
|
-
**If `$ARGUMENTS` is empty**, show the command table and guide interactively.
|
|
42
|
-
|
|
43
|
-
**If `$ARGUMENTS` is provided**, check if command exists in the command table in the available commands (use best guess, eg: initialize => init), then on match run the command:**:
|
|
44
|
-
|
|
45
|
-
```bash
|
|
46
|
-
dbo $ARGUMENTS
|
|
47
|
-
```
|
|
48
|
-
|
|
49
|
-
## Command overview
|
|
50
|
-
|
|
51
|
-
These are the local workflow commands this skill covers:
|
|
52
|
-
|
|
53
|
-
| Command | Description |
|
|
54
|
-
|---------|-------------|
|
|
55
|
-
| `init` | Initialize .dbo/ configuration |
|
|
56
|
-
| `login` / `logout` | Authenticate / clear session |
|
|
57
|
-
| `status` | Show config, domain, session info |
|
|
58
|
-
| `clone` | Clone an app to local project |
|
|
59
|
-
| `pull` | Pull records to local files |
|
|
60
|
-
| `push` | Push local changes (default: current dir) |
|
|
61
|
-
| `add` | Add a new file to DBO.io |
|
|
62
|
-
| `diff` | Compare local vs server |
|
|
63
|
-
| `rm` | Remove file, stage server deletion |
|
|
64
|
-
| `deploy` | Deploy via .dbo/deploy_config.json manifest |
|
|
65
|
-
| `build` | Run build hooks (.dbo/scripts.json) |
|
|
66
|
-
| `run` | Run named script (.dbo/scripts.json) |
|
|
67
|
-
| `install` | Install/upgrade CLI, plugins (alias: `i`) |
|
|
68
|
-
|
|
69
|
-
## Common workflows
|
|
70
|
-
|
|
71
|
-
```bash
|
|
72
|
-
# Setup
|
|
73
|
-
dbo init --domain my-domain.com --app myapp --clone
|
|
74
|
-
dbo login
|
|
75
|
-
|
|
76
|
-
# Edit and push
|
|
77
|
-
dbo push # push all changes in current dir
|
|
78
|
-
dbo push lib/bins/app/assets/ # push specific directory
|
|
79
|
-
dbo push colors.css # push single file
|
|
80
|
-
|
|
81
|
-
# Build and push (with script hooks)
|
|
82
|
-
dbo build # run build hooks only
|
|
83
|
-
dbo push # build + push (hooks run automatically)
|
|
84
|
-
dbo push --no-build # push without build phase
|
|
85
|
-
dbo push --no-scripts # push without any hooks
|
|
86
|
-
|
|
87
|
-
# Pull
|
|
88
|
-
dbo pull -e content --filter 'AppID=10100'
|
|
89
|
-
|
|
90
|
-
# Add new files
|
|
91
|
-
dbo add assets/css/newstyle.css
|
|
92
|
-
dbo add . # scan for un-added files
|
|
93
|
-
|
|
94
|
-
# Compare and merge
|
|
95
|
-
dbo diff # compare all local vs server
|
|
96
|
-
dbo diff -y # auto-accept all server changes
|
|
97
|
-
```
|