New:Introducing Socket Scanning for VS Code Marketplace Extensions.Learn more →
Get Started

@wan27/cli

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@wan27/cli

Generate images and videos with your wan2-7.io account from the terminal or any MCP client

latest
Source
npmnpm
Version
0.1.3
Version published
Weekly downloads
80
-86.58%
Maintainers
1
Weekly downloads
 
Created
Source

Wan27 MCP and CLI — AI Image and Video Generation

Generate images and videos from your terminal or AI assistant with your wan2-7.io account. MCP and CLI spend the same credit balance as the website, at the same prices. Credits are topped up on the website.

Access requires an active paid subscription. Credit packs alone, free accounts and unpaid trials do not qualify. A subscription with auto-renew turned off keeps access until its paid period ends. Upgrade at https://wan2-7.io/pricing/.

Node 22+, macOS or Linux (including WSL).

Install

npm install -g @wan27/cli

Use

wan27 auth login
wan27 account
wan27 models
wan27 estimate --input request.json
wan27 create --input request.json --wait
wan27 download <taskId> --output result.mp4
wan27 auth logout

request.json examples:

{"modelId":"wan27-text-to-video","prompt":"A paper boat on a rainy street","durationSeconds":5,"resolution":"720p"}
{"modelId":"wan2.7-image","prompt":"A paper crane on a desk","resolution":"2K"}

For image-to-video, upload the first frame and pass its URL:

wan27 upload frame.png        # {"url":"https://..."}
{"modelId":"wan27-image-to-video","prompt":"The crane takes off","imageUrl":"https://..."}

wan27 model <modelId> prints every option and its JSON Schema.

create prints a request ID on stderr. Re-running it with --request-id <id> after a network error returns the same task and is never charged twice. Failed tasks are refunded automatically. A wait timeout only stops waiting; the task keeps running.

Credentials are stored in the macOS Keychain, or with --credential-store file in a private file (directory 0700, file 0600). WAN27_CONFIG_DIR changes that directory. WAN27_ACCESS_TOKEN accepts a pre-issued API token for automation. Logging out revokes this connection; changing your website password revokes every connection.

Connect an assistant (local MCP)

Sign in once with wan27 auth login, then register the stdio server:

codex mcp add wan27 -- wan27 mcp
claude mcp add wan27 -- wan27 mcp

Tools: account_status, list_models, get_model, estimate_generation, generate_image, generate_video, list_tasks, get_task.

After signing in, clients that accept JSON configuration can launch the same stdio server with npx:

{
  "mcpServers": {
    "wan27": {
      "command": "npx",
      "args": ["-y", "@wan27/cli", "mcp"]
    }
  }
}

Read account status and estimate the cost before generating. Image and video generation spend your website credits.

Documentation and support

Develop

From the repository root:

pnpm install
node packages/cli/scripts/build.mjs
node --test packages/cli/test/*.test.mjs
node packages/cli/dist/cli.mjs --help

The server side is src/agent/ (REST /api/v1, MCP /api/mcp) and src/lib/agent-auth/ (OAuth). Generation goes through the same submit services as the website (src/generation/submit/).

Keywords

wan27

FAQs

Package last updated on 12 Oct 2026

Related posts