WisyLink CLI (npm package)

CLI command reference aligned with the official WisyLink HTTP API.

Sections

Official CLI contract for WisyLink API operations.

#Availability

Examplebash
npm i -g @wisylink/cli

#Authentication

CLI requests use the same API key auth as the HTTP API.

Set your API key:

Examplebash
export WISYLINK_API_KEY="your_api_key"

Or pass per command:

Examplebash
wisylink links get 67e6f6e6c5a91e4d2d9b0a77 --api-key "your_api_key"

#Global Flags

FlagTypeDescription
--api-key <value>stringOverrides WISYLINK_API_KEY
--timeout <ms>numberRequest timeout (1000..120000)
--helpbooleanShow command help
--versionbooleanShow installed CLI version

#Rules

RuleValue
File id format24-char hex
Link id format24-char hex
Max file_ids per link request10
Prompt max length5000 chars
Link statusespending, generating, completed

#Commands

CLI command reference grouped by resource. Each command maps directly to an HTTP API endpoint.

#Files

Upload, inspect, and delete file assets that can be attached to link generation.

#Upload File

CLIwisylink files upload <path>

Maps to chunk upload flow:

  • POST /files
  • POST /files/chunks?id=...

CLI uploads in <=4 MB chunks automatically (up to 25 MB total file size). The final chunk is sent with last=true.

Example:

Example
wisylink files upload "./asset.png"
bash

Success output:

Examplejson
{
  "id": "67e6f6e6c5a91e4d2d9b0a11",
  "ok": true
}

#Get File

CLIwisylink files get <id>

Maps to GET /files/:id.

Example:

Example
wisylink files get 67e6f6e6c5a91e4d2d9b0a11
bash

#Delete File

CLIwisylink files delete <id>

Maps to DELETE /files/:id.

Example:

Example
wisylink files delete 67e6f6e6c5a91e4d2d9b0a11
bash

Success output:

Examplejson
{
  "ok": true
}

Create, read, update, and delete links backed by the WisyLink API.

CLIwisylink links create --type <type> --prompt <prompt>

Maps to POST /links.

Rules:

  • New links are created with status: pending.

Arguments:

FlagTypeRequiredRules
--typestringYesimage, audio, video, pdf, page
--promptstringYes1..5000 chars
--hostedbooleanNoDefaults to false
--privatebooleanNoDefaults to false
--file-idstringNoRepeatable flag, max 10 total

Example:

Example
wisylink links create \
  --type "video" \
  --prompt "Create a short product trailer with energetic pacing." \
  --hosted true \
  --private true \
  --file-id 67e6f6e6c5a91e4d2d9b0a11 \
  --file-id 67e6f6e6c5a91e4d2d9b0a22
bash

Success output:

Examplejson
{
  "id": "67e6f6e6c5a91e4d2d9b0a77",
  "shared_url": "https://wisylink.com/67e6f6e6c5a91e4d2d9b0a77",
  "status": "pending",
  "created_at": 1762432496000,
  "updated_at": 1762432496000
}
CLIwisylink links get <id>

Maps to GET /links/:id. Response includes type, prompt, hosted, private, status, meta (title, description, cover, duration), outputs, file_ids, timestamps, and shared_url. meta is present only when status is completed; meta.duration is included only for audio and video types.

Example:

Example
wisylink links get 67e6f6e6c5a91e4d2d9b0a77
bash
CLIwisylink links update <id>

Maps to PATCH /links/:id.

Arguments:

FlagTypeRequiredRules
--promptstringNo1..5000 chars
--hostedbooleanNotrue / false
--privatebooleanNotrue / false
--file-idstringNoRepeatable flag, full replacement when sent

Rules:

  • Provide at least one updatable flag.
  • If --file-id is sent, it replaces the full attachment set.
  • To keep existing attachments, include them again in the same update command.
  • Hosted links cost 1 credit/day; hosted + private links cost 2 credits/day.

Example:

Example
wisylink links update 67e6f6e6c5a91e4d2d9b0a77 \
  --prompt "Create a 20-second trailer, emphasize motion graphics." \
  --hosted false \
  --private true \
  --file-id 67e6f6e6c5a91e4d2d9b0a22
bash
CLIwisylink links delete <id>

Maps to DELETE /links/:id.

Example:

Example
wisylink links delete 67e6f6e6c5a91e4d2d9b0a77
bash

Success output:

Examplejson
{
  "ok": true
}

#Output

All command outputs are root-level JSON objects aligned with API responses.