vanish

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Vanish CLI

Vanish CLI

Upload files to get temporary public URLs. Install with
npm i -g vanish-cli
or use
npx vanish-cli
.
上传文件以获取临时公共URL。可通过
npm i -g vanish-cli
安装,或直接使用
npx vanish-cli

Upload

上传

bash
vanish screenshot.png                    # shorthand for vanish upload
vanish upload file1.png file2.jpg        # multiple files
vanish upload image.png --md             # markdown: ![image.png](url)
vanish upload data.json --json           # JSON: { url, id, filename, size, expires }
vanish upload file.png --no-clipboard    # don't copy URL to clipboard
Use
npx vanish-cli
instead of
vanish
when not globally installed.
  • Default output is the public URL, automatically copied to clipboard.
  • --md
    produces
    ![filename](url)
    — use when embedding in PR descriptions, issues, or markdown files.
  • --json
    returns
    { url, id, filename, size, expires }
    — use when metadata is needed.
bash
vanish screenshot.png                    # vanish upload的简写
vanish upload file1.png file2.jpg        # 上传多个文件
vanish upload image.png --md             # markdown: ![image.png](url)
vanish upload data.json --json           # JSON: { url, id, filename, size, expires }
vanish upload file.png --no-clipboard    # 不将URL复制到剪贴板
若未全局安装,请使用
npx vanish-cli
替代
vanish
命令。
  • 默认输出为公共URL,会自动复制到剪贴板。
  • --md
    参数会生成
    ![filename](url)
    格式——适用于在PR描述、Issue或Markdown文件中嵌入内容时使用。
  • --json
    参数会返回
    { url, id, filename, size, expires }
    格式——需要元数据时使用。

Tier Limits

套餐限制

TierRetentionMax SizeRate Limit
Anonymous (no login)48 hours2 MB10/hour
Free (
vanish login
)
30 days2 MB50/hour
Pro (
vanish upgrade
)
Unlimited1 GB200/hour
Blocked extensions:
.exe
,
.bat
,
.cmd
,
.com
,
.msi
,
.scr
,
.sh
,
.bash
,
.ps1
,
.psm1
.
套餐保留时长最大文件大小请求频率限制
匿名(无需登录)48小时2 MB10次/小时
免费版(需
vanish login
登录)
30天2 MB50次/小时
专业版(
vanish upgrade
升级)
永久1 GB200次/小时
禁止上传的文件扩展名:
.exe
,
.bat
,
.cmd
,
.com
,
.msi
,
.scr
,
.sh
,
.bash
,
.ps1
,
.psm1

Account Commands

账户命令

bash
vanish login       # GitHub OAuth (opens browser, saves key)
vanish whoami      # show username and tier
vanish logout      # remove saved API key
vanish upgrade     # open Stripe checkout for Pro (2 EUR/month)
bash
vanish login       # GitHub OAuth授权(打开浏览器,保存密钥)
vanish whoami      # 显示用户名和当前套餐
vanish logout      # 删除已保存的API密钥
vanish upgrade     # 打开Stripe结账页面升级专业版(2欧元/月)

Upload Management (requires login)

上传管理(需登录)

bash
vanish ls             # list uploads (table: ID | Filename | Size | Expires | URL)
vanish ls --json      # list as JSON array
vanish rm <id>        # delete upload by ID
vanish rm id1 id2     # delete multiple
bash
vanish ls             # 列出所有上传文件(表格格式:ID | 文件名 | 大小 | 过期时间 | URL)
vanish ls --json      # 以JSON数组格式列出
vanish rm <id>        # 根据ID删除指定上传文件
vanish rm id1 id2     # 批量删除多个上传文件

Configuration

配置

Config file:
~/.config/vanish/config.json
(keys:
api_key
,
api_url
). Env vars:
VANISH_API_KEY
,
VANISH_API_URL
. Default API:
https://vanish.sh
. Priority: env vars > config file > defaults.
配置文件路径:
~/.config/vanish/config.json
(包含配置项:
api_key
api_url
)。 环境变量:
VANISH_API_KEY
,
VANISH_API_URL
。 默认API地址:
https://vanish.sh
。 优先级:环境变量 > 配置文件 > 默认值。