riverbankcms
v0.20.0
Published
Riverbank CMS command-line tools for SDK site developers
Maintainers
Readme
Riverbank CMS CLI
The riverbankcms command manages content and configuration for Riverbank CMS SDK sites.
Install it explicitly alongside @riverbankcms/sdk in an SDK site. The SDK no
longer provides a CLI binary or management transport implementation:
npm install --save-dev riverbankcms
npm install @riverbankcms/sdkRun pnpm exec riverbankcms --help for the available commands. CLI releases
are independent from SDK releases. Generated sites derive the CLI dependency
range from this package's release contract; update controlled consumers through
the release coordinator rather than copying a version here.
Safety notes: --verify-noop is an applied-write check and cannot be combined
with --dry-run. Remote writes in JSON output or a non-interactive terminal
must include --yes; otherwise the CLI refuses before loading or mutating the
target.
Media conflict behavior
Media replacement flags have been removed. --overwrite-media and
--force-update-asset are rejected during option parsing. When the same bytes
or identifier already belong to another asset, keep the existing asset, choose
a new identifier, or delete and upload the asset again in the dashboard.
Every persisted media asset now has a canonical, site-unique identifier. Backup restore preserves an existing asset's identifier and rejects an archive that tries to replace it.
Media library commands
Linked SDK projects can manage library assets by stable identifier:
riverbankcms media add ./hero.jpg --env local
riverbankcms media list --search hero --env both
riverbankcms media download hero --output ./downloads --env remote
riverbankcms media delete hero --dry-run --env both
riverbankcms media delete hero --yes --env bothmedia add accepts explicit regular files only. For multiple files, identifiers
come from filenames; --identifier and --title are single-file options. Add
and delete preflight every selected environment before mutation, and delete
refuses assets still referenced by content. media download preserves the
stored safe filename, refuses overwrites unless --overwrite is present, and
uses local/ and remote/ subdirectories for --env both.
These commands manage library records and bytes. They do not rewrite media references inside pages, entries, blocks, or other content.
Account site backups
Signed-in account owners can export a safe-profile backup and import it as a new, independent site without linking a project:
riverbankcms sites export my-site --account-env staging
riverbankcms sites import my-site-backup.zip --account-env localExports include media and exclude memberships, access, and credentials. The
default filename is <site-slug>-backup.zip; existing files require
--overwrite. Imports are limited to 100 MB, show the server preview before a
single confirmation, always create a fresh site identity, and never run
riverbankcms link automatically. Use --yes for JSON or non-interactive
imports.
Entry links and singleton identifiers
Entry fields with type: 'link' use the same link objects as blocks:
{
"buttonLink": { "kind": "page", "identifier": "start-a-project" },
"subLinkLink": { "kind": "external", "href": "https://example.com" }
}Use kind: 'url' with href for a relative URL such as /contact.
Legacy URL strings are normalized to that object when read or published.
SDK inferred link fields use LinkValue | null; new content should use objects.
A singleton has one entry. Config sync creates it with identifier
<content-type-key>-singleton. Run riverbankcms pull entries <content-type-key>
(with --env=remote for the remote environment) and edit the resulting file.
Use the pulled identifier in both the JSON identifier and any identifier
argument to riverbankcms push entries. Push does not retarget another identifier:
a mismatch fails with a message naming the existing singleton identifier, before
writing the entry. A filename alone does not rename an entry.
