129 lines
2.4 KiB
Markdown
129 lines
2.4 KiB
Markdown
# AccuPedia Bootstrap Orchestration CLI — Full Legacy-Compatible Surface
|
|
|
|
This CLI is now the canonical public entry point for:
|
|
|
|
```text
|
|
auth
|
|
content
|
|
media
|
|
commerce
|
|
validate
|
|
all
|
|
```
|
|
|
|
The `content` and `media` commands preserve the legacy option surface while
|
|
running against the four-schema architecture.
|
|
|
|
## Content
|
|
|
|
Equivalent to the legacy content CLI:
|
|
|
|
```bash
|
|
python -m bootstrap content --config ./config.json --modules-root ./modules
|
|
```
|
|
|
|
Fine-grained examples:
|
|
|
|
```bash
|
|
python -m bootstrap content --config ./config.json --modules-root ./modules --module-code M0001
|
|
```
|
|
|
|
```bash
|
|
python -m bootstrap content --config ./config.json --modules-root ./modules --module-code M0001 --template-code M0001_CT0003
|
|
```
|
|
|
|
```bash
|
|
python -m bootstrap content --config ./config.json --modules-root ./modules --module-code M0001 --template-code M0001_CT0003 --content-code LU-1
|
|
```
|
|
|
|
Supported content options:
|
|
|
|
```text
|
|
--config
|
|
--modules-root
|
|
--module-code repeatable
|
|
--template-code repeatable
|
|
--content-code repeatable
|
|
--seed-search-facets-only
|
|
--seed-search-facet-only retained alias
|
|
--skip-search-facets
|
|
--publish-content
|
|
--continue-on-error
|
|
--created-by
|
|
```
|
|
|
|
Legacy validation rules are preserved exactly.
|
|
|
|
The old `--schema` option is deliberately not exposed. Four-schema production
|
|
ownership is fixed and content seeders own the `content` schema.
|
|
|
|
## Media
|
|
|
|
Equivalent to the legacy media CLI:
|
|
|
|
```bash
|
|
python -m bootstrap media --manifest ./media.json --media-root ./images
|
|
```
|
|
|
|
Supported options:
|
|
|
|
```text
|
|
--manifest
|
|
--media-root
|
|
--validate-only
|
|
--dry-run
|
|
--force-reupload
|
|
```
|
|
|
|
The original MinIO environment contract is preserved:
|
|
|
|
```text
|
|
MINIO_ENDPOINT
|
|
MINIO_ACCESS_KEY
|
|
MINIO_SECRET_KEY
|
|
MINIO_BUCKET
|
|
MINIO_SECURE
|
|
```
|
|
|
|
Media exit semantics are preserved:
|
|
|
|
```text
|
|
0 = success
|
|
2 = media report not OK
|
|
```
|
|
|
|
## Global options
|
|
|
|
```text
|
|
--database-url
|
|
--log-level
|
|
```
|
|
|
|
`--database-url` defaults to `DATABASE_URL`.
|
|
|
|
## Full bootstrap
|
|
|
|
The `all` command uses explicit prefixes to prevent ambiguity:
|
|
|
|
```bash
|
|
python -m bootstrap all --content-config ./config.json --content-modules-root ./modules --media-manifest ./media.json --media-media-root ./images
|
|
```
|
|
|
|
Content selectors under `all` use `--content-*`; media controls use `--media-*`.
|
|
|
|
Execution order:
|
|
|
|
```text
|
|
auth
|
|
↓
|
|
content
|
|
↓
|
|
media
|
|
↓
|
|
commerce
|
|
↓
|
|
validate
|
|
```
|
|
|
|
No single global transaction is introduced.
|