Skip to content

Commit bbbc142

Browse files
committed
docs(cli): narrow v1 to auth/content/config; defer maintenance/backup/export to v3
Per user direction, the v1 surface drops the maintenance, backup, and export/import command groups. They are now scheduled in the v3 roadmap. v2 retains AI module commands, comment moderation, markdown bridge.
1 parent 8061c8d commit bbbc142

1 file changed

Lines changed: 29 additions & 44 deletions

File tree

docs/superpowers/specs/2026-05-14-mx-core-cli-design.md

Lines changed: 29 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
- Status: Draft (awaiting approval)
44
- Author: Innei
55
- Date: 2026-05-14
6-
- Scope: v1 (content / config / maintenance / backup). v2 items are listed in roadmap only.
6+
- Scope: v1 — auth, content (post / note / page / category / topic), config. v2 (AI) and v3 (maintenance / backup / export-import) are listed in roadmap only.
77

88
## 1. Goals & Non-Goals
99

@@ -12,15 +12,18 @@
1212
- Ship a single-user, self-host-oriented CLI that lets the site owner — or an AI agent acting on their behalf — manage a deployed mx-core instance from anywhere.
1313
- Authenticate via OIDC Device Authorization Grant (RFC 8628) against the mx-core server's Better Auth.
1414
- Provide first-class authoring ergonomics centred on Lexical content, using `@haklex/rich-litexml` as the editing format so humans and AI agents both author in LiteXML XML instead of raw Lexical JSON.
15-
- Cover four command domains in v1: content (post / note / page / category / topic), configuration (option), maintenance (cache / search / data-jobs / health), and backup (dump / restore / export / import).
15+
- Cover three command domains in v1: auth (device login / logout / whoami / status), content (post / note / page / category / topic), configuration (option).
1616
- Be scriptable: every field exposed as a flag, every output renderable as `--json`, exit codes meaningful.
1717

1818
### Non-Goals (v1)
1919

20-
- Multi-instance profiles (`mxs use <site>`) — single API URL only, deferred to v2.
20+
- Multi-instance profiles (`mxs use <site>`) — single API URL only, deferred to v3.
2121
- AI commands (`mxs ai summary regen`, translation, insights) — deferred to v2 roadmap.
2222
- Comment moderation (`mxs comment ...`) — v2.
23-
- Observability (`mxs logs tail`, `mxs metrics`) — v2.
23+
- Maintenance (cache / search / data-jobs / health) — v3.
24+
- Backup (dump / restore / download) — v3.
25+
- Export / import of content as files — v3.
26+
- Observability (`mxs logs tail`, `mxs metrics`) — v3.
2427
- Markdown → Lexical conversion. Markdown posts stay markdown; LiteXML round-trip only applies when the server's `contentFormat = lexical`.
2528
- OS keychain integration; v1 stores credentials in `~/.config/mxs/credentials.json` (mode 0600) with env override.
2629

@@ -56,12 +59,6 @@
5659
│ category/{list,get,create,update,delete}.ts │
5760
│ topic/{list,get,create,update,delete}.ts │
5861
│ config/{list,get,set,edit}.ts │
59-
│ cache/{clear,stats}.ts │
60-
│ search/{reindex,status}.ts │
61-
│ job/{list,run}.ts │
62-
│ health.ts │
63-
│ backup/{create,list,download,restore}.ts │
64-
│ export.ts, import.ts │
6562
│ │ │
6663
│ core/ │
6764
│ api-client.ts — wraps @mx-space/api-client │
@@ -271,36 +268,6 @@ mxs config set <key> <value> [--type=json|string|number|bool]
271268
mxs config edit # pull full options as YAML, $EDITOR, diff + push
272269
```
273270

274-
### 4.6 Maintenance
275-
276-
```
277-
mxs cache clear [--scope=all|view|post|note|page|aggregate]
278-
mxs cache stats
279-
mxs search reindex # full rebuild
280-
mxs search status
281-
mxs job list # list data-jobs (apps/core maintenance/jobs)
282-
mxs job run <name>
283-
mxs health # extended /health
284-
```
285-
286-
### 4.7 Backup
287-
288-
```
289-
mxs backup create [--output ./backup.tar.gz]
290-
mxs backup list
291-
mxs backup download <id> [--output <path>]
292-
mxs backup restore <id-or-file> [--force]
293-
```
294-
295-
### 4.8 Export / Import (content only)
296-
297-
```
298-
mxs export <dir> [--type=post,note,page] [--format=markdown|litexml]
299-
mxs import <dir> [--type=post] [--update-existing]
300-
```
301-
302-
Each item exported as `<dir>/<type>/<slug>.xml` (or `.md`). Import reads filenames as slug hint; envelope `<meta>` takes precedence.
303-
304271
## 5. Content Conversion Flow
305272

306273
### 5.1 Write (`create` / `edit` with `--file` or `--content`)
@@ -685,15 +652,33 @@ Documented in `packages/cli/test/manual.md`:
685652
- `docs/CODEMAPS/cli.md` (if codemap discipline applies): generated map of `packages/cli/src/`.
686653
- Update `apps/core/readme.md` with new auth header rule (§10).
687654

688-
## 13. v2 Roadmap (declared, not built)
655+
## 13. Roadmap (declared, not built)
689656

690-
To be captured in `packages/cli/ROADMAP.md`:
657+
To be captured in `packages/cli/ROADMAP.md`.
658+
659+
### v2
691660

692661
- **AI module commands**: `mxs ai summary regen <id>`, `mxs ai translate <id> --to ja`, `mxs ai insights refresh`, `mxs ai tokens`. Depends on existing `apps/core/src/modules/ai`.
693-
- **Multi-profile**: `mxs use <name>`, `~/.config/mxs/profiles.json`, profile-scoped credentials.
694-
- **Observability**: `mxs logs tail`, `mxs metrics`.
695662
- **Comment moderation**: `mxs comment list / approve / reject / delete`.
696663
- **Markdown ↔ Lexical bridge**: contingent on haklex adding markdown → Lexical reader.
664+
665+
### v3
666+
667+
- **Maintenance**:
668+
- `mxs cache clear [--scope=all|view|post|note|page|aggregate]`, `mxs cache stats`
669+
- `mxs search reindex`, `mxs search status`
670+
- `mxs job list`, `mxs job run <name>` (data-jobs from `apps/core/src/maintenance/jobs`)
671+
- `mxs health`
672+
- **Backup**:
673+
- `mxs backup create [--output <path>]`
674+
- `mxs backup list`
675+
- `mxs backup download <id> [--output <path>]`
676+
- `mxs backup restore <id-or-file> [--force]`
677+
- **Export / import (content)**:
678+
- `mxs export <dir> [--type=post,note,page] [--format=markdown|litexml]`
679+
- `mxs import <dir> [--type=post] [--update-existing]`
680+
- **Multi-profile**: `mxs use <name>`, `~/.config/mxs/profiles.json`, profile-scoped credentials.
681+
- **Observability**: `mxs logs tail`, `mxs metrics`.
697682
- **OS keychain storage**: keytar / libsecret integration once monorepo Node version stabilises.
698683
- **`mxs init`**: bootstrap a fresh mx-core deployment via compose.
699684

0 commit comments

Comments
 (0)