コンテンツにスキップ

bee document edit

Edit a document

Update the title or emoji, or replace the entire document body. Pass an empty value to clear a field. Use --body-file - to read the body from stdin.

The body is the Pandoc Markdown that bee document view --json plain returns, which keeps the document structure in attributes such as {#H-1}. Edit that Markdown and send it back, keeping the attributes you do not mean to change: a heading sent without its ID loses it, which breaks links to it. Backlog applies only the difference, so untouched parts and people editing in the browser are not disturbed.

Terminal window
bee document edit [flags] <DOCUMENT>
DOCUMENT
Document ID
-t, --title <text>
New title of the document
--emoji <emoji>
New emoji for the document
-b, --body <text>
New Markdown body of the document
--body-file <path>
Read the new Markdown body from a file or stdin
--json <fields>
Output as JSON (optionally filter by field names, comma-separated)
-s, --space <hostname>
Space hostname (e.g. xxx.backlog.com, or your own domain)
-y, --yes
Skip confirmation prompt

Update the title

Terminal window
bee document edit 12345 -t "Meeting Notes"

Remove the emoji

Terminal window
bee document edit 12345 --emoji ""

Save the body as Markdown to edit locally

Terminal window
bee document view 12345 --json plain | jq -r .plain > notes.md

Replace the body with the edited file

Terminal window
bee document edit 12345 --body-file notes.md
BACKLOG_SPACE
Space hostname (e.g. xxx.backlog.com, or your own domain)
BACKLOG_API_KEY
Authenticate with an API key
BACKLOG_SPACE
Space hostname