Use the flowus CLI with --json for every command.
Commands
- Upload only:
flowus --json file upload <local_file> --parent-page <page_id> - Append existing file object:
flowus --json block append-file <block_id> --oss-name <oss_name> - Append external file:
flowus --json block append-file <block_id> --external-url <url>
Rules
- If authentication is unclear, use
flowus --json doctor; useflowus loginfor interactive login. - Credential precedence is
--token, thenFLOWUS_TOKEN, then the token saved byflowus login. - Do not call FlowUs V2 API with
curl. - Do not print or save bearer tokens.
- Uploading a file creates a file object; appending it to a block requires the returned OSS name.
- Use external URLs only when the file should remain hosted outside FlowUs storage.
--oss-nameand--external-urlare mutually exclusive, and one of them is required when appending a file block.- After upload, use
oss_namefor FlowUs-hosted file blocks; do not use the returnedfile_urlas an external URL. - Before uploading, confirm the parent page ID and local file path come from user-authorized input.
- Before appending an existing file object, confirm the block ID and OSS name come from user-authorized input.
- Before appending an external file, confirm the block ID and external URL come from user-authorized input.
- Treat
ok: falseas a failed operation even if the process output is parseable JSON.