Skip to content

wisylink/cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WisyLink CLI

npm version npm downloads license

Official CLI contract for WisyLink API operations.

Built with ❤️ by our team

Availability

npm i -g @wisylink/cli

Authentication

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

Set your API key:

export WISYLINK_API_KEY="your_api_key"

Or pass per command:

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

Global Flags

Flag Type Description
--api-key <value> string Overrides WISYLINK_API_KEY
--timeout <ms> number Request timeout (1000..120000)
--help boolean Show command help
--version boolean Show installed CLI version

Rules

Rule Value
File id format 24-char hex
Link id format 24-char hex
Max file_ids per link request 10
Message max length 5000 chars

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

(wisylink files upload )

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:

wisylink files upload "./asset.png"
import { CreateWisyLinkClient } from "@wisylink/cli";

const client = CreateWisyLinkClient({ apiKey: "<api-key>" });
const file = await client.uploadFile("./asset.png");
console.log(file);

Success output:

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

Get File

(wisylink files get )

Maps to GET /files/:id.

Example:

wisylink files get 67e6f6e6c5a91e4d2d9b0a11
import { CreateWisyLinkClient } from "@wisylink/cli";

const client = CreateWisyLinkClient({ apiKey: "<api-key>" });
const file = await client.getFile("<file-id>");
console.log(file);

Delete File

(wisylink files delete )

Maps to DELETE /files/:id.

Example:

wisylink files delete 67e6f6e6c5a91e4d2d9b0a11
import { CreateWisyLinkClient } from "@wisylink/cli";

const client = CreateWisyLinkClient({ apiKey: "<api-key>" });
const result = await client.deleteFile("<file-id>");
console.log(result);

Success output:

{
  "ok": true
}

Links

Create links by chatting with Wisy, then list, read, and delete them.

Chat

(wisylink chat --message [--file-id ...] [--link-id ])

Maps to POST /chat. Omit --link-id to start a new link; pass it to continue an existing one — conversation history is kept server-side per link.

Arguments:

Flag Type Required Rules
--message string Yes 1..5000 chars
--file-id string No Repeatable flag, max 10 total
--link-id string No 24-char hex; continue an existing link

Example:

wisylink chat \
  --message "Build a landing page for a specialty coffee shop called Ember." \
  --file-id 67e6f6e6c5a91e4d2d9b0a11
import { CreateWisyLinkClient } from "@wisylink/cli";

const client = CreateWisyLinkClient({ apiKey: "<api-key>" });
const result = await client.chat({
  message: "Build a landing page for a specialty coffee shop called Ember.",
  fileIds: ["<file-id>"],
  // linkId: "<link-id>",   // continue an existing link
});
console.log(result);

Success output:

{
  "id": "67e6f6e6c5a91e4d2d9b0a77",
  "url": "https://67e6f6e6c5a91e4d2d9b0a77.wisylink.com",
  "status": "building",
  "answer": "On it — building your coffee shop landing page now.",
  "created_at": 1762432496000,
  "updated_at": 1762432496000
}

answer is Wisy's short reply; the hosted url goes live once the build finishes.

List Links

(wisylink links list [--page ] [--limit ])

Maps to GET /links. Pages through your links, newest first.

Flag Type Required Rules
--page number No 1-based page number (default 1)
--limit number No Items per page, 1..100 (default 20)

Example:

wisylink links list --page 1 --limit 20
import { CreateWisyLinkClient } from "@wisylink/cli";

const client = CreateWisyLinkClient({ apiKey: "<api-key>" });
const page = await client.listLinks({ page: 1, limit: 20 });
console.log(page.items);

Success output:

{
  "items": [
    {
      "id": "67e6f6e6c5a91e4d2d9b0a77",
      "url": "https://67e6f6e6c5a91e4d2d9b0a77.wisylink.com",
      "status": "completed",
      "meta": { "title": "Ember", "description": "Specialty coffee shop landing page." },
      "file_ids": ["67e6f6e6c5a91e4d2d9b0a11"],
      "created_at": 1762432496000,
      "updated_at": 1762432596000
    }
  ],
  "page": 1,
  "limit": 20,
  "total": 1,
  "total_pages": 1,
  "has_prev": false,
  "has_next": false
}

Get Link

(wisylink links get )

Maps to GET /links/:id. Response includes id, url (the hosted page), status, meta (title, description), file_ids, and timestamps.

Example:

wisylink links get 67e6f6e6c5a91e4d2d9b0a77
import { CreateWisyLinkClient } from "@wisylink/cli";

const client = CreateWisyLinkClient({ apiKey: "<api-key>" });
const link = await client.getLink("<link-id>");
console.log(link);

Delete Link

(wisylink links delete )

Maps to DELETE /links/:id.

Example:

wisylink links delete 67e6f6e6c5a91e4d2d9b0a77
import { CreateWisyLinkClient } from "@wisylink/cli";

const client = CreateWisyLinkClient({ apiKey: "<api-key>" });
const result = await client.deleteLink("<link-id>");
console.log(result);

Success output:

{
  "ok": true
}

Output

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

Security Notes

  • Your API key is read from WISYLINK_API_KEY or --api-key and is never echoed, logged, or written to any output stream.
  • All requests go over HTTPS to https://wisylink.com/api.
  • Command output is JSON-only; no debug traces, stack frames, or credential leaks are printed.
  • Keep your API key out of shell history and version control. Use an environment variable or a secret manager.

About

Installable command-line tool for the same operations as the API, using a simple "wisylink <command>" workflow.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages