Skip to main content

Update and version history

To update an existing document, use the post ID:

opendocs update revised-doc.md --post-id abc123

How to find the post ID

Use:

opendocs list --json

or:

opendocs get abc123

What update changes

The current CLI update flow can change:

  • raw Markdown content
  • title
  • visibility
  • tags

It keeps the same canonical URL, so existing readers do not need a new link.

Update flags

FlagMeaning
--post-id <postId>Required. The post to update
--title <title>Override the title
--visibility <visibility>private, workspace, or public
--tags <tags>Comma-separated tags
--confirm-publicRequired when moving to public
--jsonGlobal flag for machine-readable output

Example

opendocs update release-plan.md \
--post-id abc123 \
--visibility workspace \
--tags roadmap,release \
--json

Example response:

{
"postId": "abc123",
"versionId": "ver_456",
"versionNumber": 4,
"slug": "release-plan",
"title": "Release plan",
"visibility": "workspace"
}

Version history

Each successful update creates a new server-side version number.

That means:

  • the URL remains stable
  • the current reader view points to the latest version
  • historical versions are preserved internally

The public CLI today is focused on update and pull workflows rather than a full rollback command, so version history is primarily something OpenDocs stores and tracks for you.

  1. Find the post with opendocs list --json
  2. Pull the current content if needed:
opendocs pull abc123 --stdout
  1. Edit locally
  2. Run opendocs update ... --post-id abc123