romearchive
v1.0.3
Published
CLI tool for pulling and pushing RomeArchive amendments
Readme
amend — RomeArchive CLI
CLI tool for pulling and pushing article amendments to a RomeArchive server.
Install
npm install -g romearchive
# or from the packages/amend directory:
npm install -g .
# or link for development:
npm linkUsage
Authenticate
amend auth ra_yourApiTokenHere
amend auth # check status
amend auth logout # remove tokenGenerate an API token on the Settings page.
Pull an article
amend pull https://www.romearchive.com/articles/<id>.amendmentDownloads amendment.toml and article.md to the current directory.
Commit changes locally
# edit article.md, then:
amend commit -m "Fixed typo in introduction"Records a local snapshot of article.md (content hash + message) in amendment.toml. If you've pushed before, the amendment ID is preserved so the next push will update the same amendment.
Push changes
amend pushIf a previous push stored an amendment ID in amendment.toml, push updates that existing amendment. Otherwise it creates a new one. After success, the amendment ID is saved back so subsequent commit/push cycles stay linked to the same amendment.
File format
amendment.toml
[article]
id = "abc123"
title = "My Article"
slug = "my-article"
tags = ["tag1", "tag2"]
version = 5
status = "published"
[author]
id = "user123"
displayName = "Author Name"
[remote]
url = "https://www.romearchive.com/articles/view?id=abc123"
amendmentUrl = "https://www.romearchive.com/articles/my-article.amendment"article.md
Raw markdown body of the article. Edit this file, then run amend push.
Environment
ROMEARCHIVE_URL— override server URL (default:https://www.romearchive.com)
