Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/groniz/groniz-cli/llms.txt

Use this file to discover all available pages before exploring further.

Before attaching any image or video to a post, you must upload the file through groniz upload. The command transfers the local file to Groniz’s media storage and returns a JSON object with id and path fields. The .path value is what you pass when creating a post. Raw local file paths and external URLs are rejected server-side with a 400 error.

groniz upload <file>

Uploads a local file and returns a JSON object containing the media ID and its hosted path.
file
string
required
Path to the local file to upload (relative or absolute).
groniz upload ./image.jpg
Example output
{
  "id": "img-abc123",
  "path": "https://api.groniz.com/uploads/photo.jpg"
}

Supported formats

TypeExtensions
Image.jpg, .png, .gif, .webp
Video.mp4
Passing a raw local file path (e.g. ./image.jpg) or an external URL directly in a post’s image array will be rejected with a 400 error. Always run groniz upload first and use the .path value returned in the response.

Using upload output in posts

The workflow is: upload the file, capture the .path (and optionally .id) from the response, then reference it in your groniz posts create call. Full workflow example
# 1. Upload the file and capture the response
UPLOAD=$(groniz upload ./photo.jpg)

# 2. Extract the path with jq
IMAGE_PATH=$(echo "$UPLOAD" | jq -r '.path')
IMAGE_ID=$(echo "$UPLOAD" | jq -r '.id')

# 3. Create the post with the uploaded media
groniz posts create \
  --content "Check out this photo!" \
  --integrations int_abc123 \
  --json "{
    \"content\": \"Check out this photo!\",
    \"images\": [{\"id\": \"$IMAGE_ID\", \"path\": \"$IMAGE_PATH\"}],
    \"integrationIds\": [\"int_abc123\"]
  }"
The image array format accepted by posts create in JSON mode:
[
  {
    "id": "img-abc123",
    "path": "https://api.groniz.com/uploads/photo.jpg"
  }
]
When uploading multiple files for a carousel or multi-image post, run groniz upload once per file and collect all returned objects into the images array before constructing the post payload.

groniz update

Updates the CLI binary to the latest available version.
groniz update

groniz update --check

Checks whether a newer version of the CLI is available without installing it. Exits with code 0 if the CLI is up to date, or code 10 if a newer version exists.
groniz update --check
echo "Exit code: $?"
# Exit code: 10  → update available
# Exit code: 0   → already up to date
Use groniz update --check in CI pipelines to gate workflows on a minimum CLI version. Check the exit code after the command and fail the job (or trigger an update step) when it returns 10. This prevents silent failures caused by agents running an outdated binary that lacks commands or fixes your workflow depends on.

Build docs developers (and LLMs) love