npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

koishi-plugin-get-image-link-debug

v0.1.3

Published

🖼️ 从聊天会话提取图片链接并生成下载命令

Downloads

403

Readme

🖼️ koishi-plugin-get-image-link-debug

npm npm-download

GitHub Gitee

Koishi Forum

QQ群

一个简洁的 Koishi 调试插件,用于提取消息中的图片或 mface 原始链接,并生成 wget、curl 下载命令。

🚀 使用方法

默认命令为 get-link,别名为 gl。可以回复带图片的消息、将图片附在命令后,或只发送命令后在 30 秒内按提示发送图片。

gl                         # 输出图片链接
gl -w image.png            # 生成 wget 下载命令
gl --wget image.png        # wget 的长选项写法
gl -c image.png            # 生成 curl 下载命令
gl --curl image.png        # curl 的长选项写法

生成的下载命令示例:

wget -O "image.png" "https://example.com/image.png"
curl -o "image.png" "https://example.com/image.png"

📸 效果预览

在聊天会话中回复图片并执行命令,机器人会返回可直接使用的下载命令:

在聊天会话中获取下载命令

将命令粘贴到终端,即可把图片下载到当前文件夹:

在终端中下载图片

⚙️ 配置项

| 配置项 | 默认值 | 说明 | | --- | --- | --- | | commandName | get-link | 命令名称 | | commandAlias | gl | 命令别名 | | enableRegisterCommand | true | 是否注册命令 | | enableQuote | true | 回复结果时是否引用原消息 | | enableCodeBlock | false | 是否用代码块包裹下载命令 |

⚠️ 注意事项

  • wget 和 curl 选项只生成命令行指令,不会由机器人执行下载。
  • 消息中有多张图片时,普通模式会输出全部链接,下载命令使用第一张图片。
  • 平台提供的临时图片链接可能会过期,请及时使用。

🧰 wget 与 curl 命令行工具

本插件只生成下载命令,不会替用户安装工具或执行下载。请根据自己的终端环境准备 wget 或 curl。

🪟 Windows

Windows 10/11 通常自带 curl.exe;wget 与可选的新版 curl 均可通过 Scoop 安装。PowerShell 建议显式使用 .exe,避免命令别名干扰。

Windows PowerShell 5.1 默认将 wgetcurl 设为 Invoke-WebRequest 的别名;PowerShell 7 通常会直接解析真实程序。原生下载写法为 Invoke-WebRequest -Uri "URL" -OutFile "image.png"

scoop update; if ($?) { scoop install wget }
scoop install curl # 可选,系统自带 curl.exe 时通常无需安装
Get-Command wget,curl -All
wget.exe --version
curl.exe --version

以上指令请在 PowerShell 中执行。

在 CMD 中使用 where 查看可执行文件路径;PowerShell 应使用上面的 Get-Command,或显式调用 where.exe

where wget
where curl
wget --version
curl --version

以上指令请在 CMD 中执行。

🐧 Linux / WSL

| 发行版 | 安装命令 | | --- | --- | | Debian / Ubuntu 系 | sudo apt update && sudo apt install -y wget curl | | Fedora / RHEL 系 | sudo dnf makecache && sudo dnf install -y wget curl | | Arch Linux 系 | sudo pacman -Syu --needed wget curl | | Arch Linux 系(paru) | paru -Syu --needed wget curl | | Alpine Linux | sudo apk update && sudo apk add wget curl |

WSL 直接使用所安装发行版对应的命令;&& 会在前置刷新成功后继续安装。paru 适合已经安装 AUR helper 的环境,官方仓库包优先使用 pacman;Arch 系的 -Syu 会同步索引并完整升级系统,避免使用可能导致部分升级的 -Sy

🍎 macOS

macOS 自带 curl,通常只需执行 brew update && brew install wgetbrew install curl 可安装较新版本,但该包通常为 keg-only,不会自动替换系统 curl。

📱 Android / Termux

Termux 使用 pkg update && pkg install wget curl

✅ 验证安装

以下命令适用于 Linux、macOS 和 Android / Termux;若精简系统未提供 which,请使用 command -v

command -v wget
command -v curl
which wget
which curl
wget --version
curl --version