Skip to content

docs shortcut help flags don't match runtime behavior in v1.0.38 #1049

@Moskize91

Description

@Moskize91

Summary

On @larksuite/cli v1.0.38, several shortcut --help pages advertise flags that do not match the actual accepted runtime flags.

This caused repeated validation failures during real usage because the documented flag shape and the executable flag shape diverged.

Environment

  • Package: @larksuite/cli
  • Version: 1.0.38
  • OS: macOS

Mismatches observed

1. docs +create --help shows --markdown, but runtime requires --doc-format markdown --content ...

lark-cli docs +create --help advertises:

  • --markdown string

But invoking docs +create with --markdown fails at runtime with:

  • --content is required

In practice, the working form was:

lark-cli docs +create \
  --profile runtime-bot \
  --as bot \
  --api-version v2 \
  --wiki-node "$ROOT_NODE_TOKEN" \
  --title "$REPORT_DATE" \
  --doc-format markdown \
  --content "$MARKDOWN_CONTENT"

2. docs +update --help shows --mode, but runtime requires --command overwrite

lark-cli docs +update --help advertises:

  • --mode string

But invoking docs +update using the documented shape failed with:

  • --command is required

In practice, the working form was:

lark-cli docs +update \
  --profile runtime-bot \
  --as bot \
  --api-version v2 \
  --doc "$DOC_TOKEN" \
  --command overwrite \
  --doc-format markdown \
  --content "$MARKDOWN_CONTENT"

Also, using --command replace_all failed validation; accepted values included overwrite, append, etc.

3. wiki +node-delete uses --node-token, not --token

This one is smaller, but worth calling out because wiki +node-get uses --token, while wiki +node-delete expects:

  • --node-token

That inconsistency makes it easy to carry the wrong mental model between adjacent wiki commands.

Expected behavior

Either:

  1. the --help output should reflect the real accepted flags and values, or
  2. compatibility aliases should be added so the documented flags also work.

For the docs shortcuts, the current divergence between --help and runtime behavior is especially confusing for both humans and AI agents.

Why this matters

This came up in a real automation path, not a synthetic test. The main issue was not that the commands were hard to use, but that the advertised invocation shape was accepted as authoritative and then failed with validation errors.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions