返回顶部
f

ftp-clientFTP客户端

FTP/FTPS client skill. Connect to FTP servers and perform file operations (list, upload, download, delete, move, copy, mkdir, read). Supports FTP and FTPS (explicit/implicit TLS).

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 0.1.0
安全检测
已通过
266
下载量
免费
免费
0
收藏
概述
安装方式
版本历史

ftp-client

FTP 客户端

适用于OpenClaw的全功能FTP/FTPS客户端技能。可直接连接远程FTP服务器并管理文件。

环境变量

在OpenClaw技能管理面板中设置 FTP_CONNECTION。格式(逗号分隔,最后3个字段可选):

host:port,username,password,active/passive,ftp/ftps,explicit/implicit

示例:

ftp.example.com:21,myuser,mypassword
ftp.example.com:21,myuser,mypassword,passive
ftp.example.com:990,myuser,mypassword,passive,ftps,implicit

字段定义:

  • - 字段1(必填):host:port — FTP服务器地址和端口
  • 字段2(必填):username — FTP登录用户名
  • 字段3(必填):password — FTP登录密码
  • 字段4(可选):active 或 passive — 连接模式(默认:passive)
  • 字段5(可选):ftp 或 ftps — 协议(默认:ftp)
  • 字段6(可选):explicit 或 implicit — FTPS的TLS模式(默认:不使用;仅当字段5为ftps时有效)

注意: 如果密码包含逗号,请用 %2C(URL编码)替换。解析器会自动解码。

列出目录

bash
node {baseDir}/scripts/list.mjs
node {baseDir}/scripts/list.mjs /remote/path
node {baseDir}/scripts/list.mjs / --long

选项:

  • - --long 或 -l:显示详细文件信息(大小、日期、权限)

下载文件

bash
node {baseDir}/scripts/download.mjs /remote/file.txt
node {baseDir}/scripts/download.mjs /remote/file.txt --out /local/path/file.txt
node {baseDir}/scripts/download.mjs /remote/dir --dir

选项:

  • - --out <路径> 或 -o <路径>:本地目标路径(默认:临时目录)
  • --dir 或 -d:递归下载整个目录

上传文件

bash
node {baseDir}/scripts/upload.mjs /local/file.txt
node {baseDir}/scripts/upload.mjs /local/file.txt --to /remote/path/file.txt
node {baseDir}/scripts/upload.mjs /local/dir --dir --to /remote/dir

选项:

  • - --to <路径> 或 -t <路径>:远程目标路径(默认:FTP根目录 /)
  • --dir 或 -d:递归上传整个目录

删除文件或目录

bash
node {baseDir}/scripts/delete.mjs /remote/file.txt
node {baseDir}/scripts/delete.mjs /remote/dir --dir

选项:

  • - --dir 或 -d:递归删除目录(包括所有内容)

移动/重命名

bash
node {baseDir}/scripts/move.mjs /remote/old-name.txt /remote/new-name.txt
node {baseDir}/scripts/move.mjs /remote/file.txt /remote/subdir/file.txt

复制文件

bash
node {baseDir}/scripts/copy.mjs /remote/source.txt /remote/dest.txt

FTP协议本身不支持复制操作。此功能会将文件下载到临时位置,然后重新上传。

创建目录

bash
node {baseDir}/scripts/mkdir.mjs /remote/new-dir
node {baseDir}/scripts/mkdir.mjs /remote/path/to/deep/dir

按需创建目录及其所有中间目录。

读取文件内容

bash
node {baseDir}/scripts/read.mjs /remote/file.txt
node {baseDir}/scripts/read.mjs /remote/file.txt --encoding utf8

选项:

  • - --encoding <编码>:文件编码(默认:utf8)。支持:utf8、ascii、latin1、base64

文件信息(大小、日期)

bash
node {baseDir}/scripts/info.mjs /remote/file.txt

返回文件大小和最后修改日期。

注意事项

  • - 需要 node 环境,并使用 basic-ftp npm 包(通过 package.json 自动安装)。
  • 使用前请设置 FTP_CONNECTION 环境变量。
  • 对于大多数NAT/防火墙场景,建议使用被动模式。
  • 对于FTPS,该技能支持显式(通常端口21)和隐式(通常端口990)TLS。
  • 大文件传输时会显示进度输出。

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 ftp-client-1776385622 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 ftp-client-1776385622 技能

通过命令行安装

skillhub install ftp-client-1776385622

下载

⬇ 下载 ftp-client v0.1.0(免费)

文件大小: 9.24 KB | 发布时间: 2026-4-17 14:53

v0.1.0 最新 2026-4-17 14:53
Initial release of ftp-client — a full-featured FTP/FTPS client skill.

- Connect to remote FTP servers using FTP or FTPS (explicit/implicit TLS) with flexible config.
- List, upload, download, delete, move, copy, and create directories on FTP servers.
- Supports both file and recursive directory operations.
- Provides progress reporting for large file transfers.
- Includes commands for file info and reading file content.
- Requires setting the FTP_CONNECTION environment variable.

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部