Skip to main content

Object Commands

The liorans3 object (alias: obj) command group provides complete object lifecycle operations.


1. liorans3 object list <bucket> (alias: ls)​

Lists objects in a bucket with cursor-based pagination.

Syntax​

liorans3 object list <bucket> [options]
liorans3 object ls <bucket> [options]

Options​

  • -p, --prefix <prefix>: Filter objects matching a key prefix.
  • -l, --limit <number>: Page size limit (1..1000, default: 100).
  • -c, --cursor <cursor>: Pagination cursor from previous page.
  • -a, --all: Automatically traverse all pages.

Example Output​

KEY SIZE TYPE MODIFIED
documents/2026-report.pdf 1.42 MiB application/pdf 10/1/2026, 6:00:00 PM
images/logo.png 48.29 KiB image/png 10/1/2026, 6:02:00 PM

2. liorans3 object stat <bucket> <key> (aliases: head, info)​

Queries object metadata without downloading the body (HTTP HEAD).

Syntax​

liorans3 object stat <bucket> <key>
liorans3 object head <bucket> <key>

Example Output​

Object: assets/images/logo.png
Content-Type: image/png
Content-Length: 48.29 KiB (49449 bytes)
SHA-256: 8f4e2d83b16954b52...
ETag: "8f4e2d83b16954b52..."
Last-Modified: 2026-10-01T12:00:00.000Z
Accept-Ranges: bytes

3. liorans3 object put <bucket> <key> [file]​

Uploads an object from a local file or standard input.

Syntax​

liorans3 object put <bucket> <key> [file] [options]

Options​

  • --content-type <type>: Explicit MIME content type.
  • --key <customKey>: Explicit key override.
  • --stdin: Read data payload from standard input.

Examples​

# Upload local file
liorans3 object put assets logo.png ./logo.png --content-type image/png

# Pipe data from standard input
echo "Configuration payload" | liorans3 object put assets config.txt --stdin

Example Output​

Uploaded 'logo.png' (48.29 KiB in 6ms, 8.05 MB/s, SHA-256: 8f4e2d83b16954b52...)

4. liorans3 object get <bucket> <key> [destination]​

Downloads an object to a local file.

Syntax​

liorans3 object get <bucket> <key> [destination] [options]

Options​

  • -r, --resume: Resume a partially downloaded file using HTTP Range headers.
  • --range <range>: Request specific byte range (e.g. 0-1023).

Example​

liorans3 object get assets logo.png ./downloaded-logo.png

5. liorans3 object cat <bucket> <key>​

Streams raw object bytes directly to standard output without headers or formatting:

liorans3 object cat assets config.json | jq .

6. liorans3 object range <bucket> <key>​

Downloads a specific byte slice of an object:

Syntax​

liorans3 object range <bucket> <key> [options]

Options​

  • --start <number>: Starting byte offset.
  • --end <number>: Ending byte offset (inclusive).
  • --suffix <number>: Suffix byte length from end of file.
  • -o, --output <path>: Output file path (defaults to streaming to stdout).

Example​

# Download first 1024 bytes to file
liorans3 object range assets dataset.tar --start 0 --end 1023 -o header.bin

7. liorans3 object presign <bucket> <key>​

Generates an expiring HMAC-SHA256 signed URL:

Syntax​

liorans3 object presign <bucket> <key> [options]

Options​

  • -m, --method <method>: HTTP method: GET, PUT, or HEAD (default: GET).
  • -e, --expires <seconds>: Expiration duration in seconds (default: 3600).

Example​

liorans3 object presign assets logo.png --method GET --expires 7200

Example Output​

Presigned GET URL (expires in 7200s):
http://127.0.0.1:27118/api/v1/buckets/assets/objects/logo.png?expires=1798765432&signature=a9f8...

8. liorans3 object optimize <bucket> <key>​

Transforms, converts, or resizes an image stored on the server:

Options​

  • --width <pixels>: Target width in pixels.
  • --height <pixels>: Target height in pixels.
  • --format <fmt>: Target format (webp, jpeg, png).
  • --quality <q>: Compression quality (1..100).
  • --fit <fit>: Fit mode: fit, fill, exact, thumbnail.
  • --target-key <target>: Custom destination key for variant.
  • --replace-original: Overwrite source object in place.

Example​

liorans3 object optimize assets hero.jpg --width 1200 --height 630 --format webp --quality 85

9. liorans3 object rm <bucket> <key> (alias: delete)​

Permanently removes an object from a bucket:

liorans3 object rm assets logo.png

Output:

Deleted object 'logo.png' from bucket 'assets'.