← 返回
AI智能

OCFT - OpenClaw File Transfer

P2P file transfer between AI agents via message channels. Supports chunked transfer, IPFS fallback for large files, and trusted peer management.
AI代理间基于消息通道的P2P文件传输。支持分块传输、大文件IPFS回退及可信节点管理。
stormixus
AI智能 clawhub v1.1.2 1 版本 99317.7 Key: 无需
★ 1
Stars
📥 3,037
下载
💾 3
安装
1
版本
#latest

概述

OCFT - OpenClaw File Transfer Protocol

P2P file transfer between AI agents via message channels.

When to Use

Use this skill when:

  • Transferring files between AI agents over chat channels
  • Setting up peer-to-peer file sharing with trusted agents
  • Sending files through Telegram, Discord, Slack, or any text-based channel
  • Need chunked transfer with integrity verification
  • Transferring large files using IPFS fallback

Installation

npm install -g ocft

Quick Start

# Initialize your node (generates unique ID and secret)
ocft init

# View your status
ocft status

# Export your connection info to share with peers
ocft export

# Add a trusted peer
ocft add-peer <nodeId> <secret> --name "Friend"

# Or import from URI
ocft import ocft://eyJub2RlSWQ...

CLI Commands

Core Commands

CommandDescription
----------------------
ocft initInitialize node with unique ID and secret
ocft statusShow node status and configuration
ocft show-secretDisplay full secret (careful!)
ocft exportExport connection info as URI
ocft import Import peer from ocft:// URI
ocft verify Verify if a secret matches yours

Peer Management

CommandDescription
----------------------
ocft add-peer Add a trusted peer
ocft remove-peer Remove a trusted peer
ocft list-peersList all trusted peers
ocft extend-peer Extend a peer's trust expiry
ocft set-ttl Set default secret TTL (0 = no expiry)

Configuration

CommandDescription
----------------------
ocft set-download Set download directory
ocft set-max-size Set max file size (e.g., 100MB, 1GB)

IPFS Fallback (for large files)

CommandDescription
----------------------
ocft ipfs-enableEnable IPFS fallback for large files
ocft ipfs-disableDisable IPFS fallback
ocft set-ipfs-provider Set provider: pinata, filebase, kubo
ocft set-ipfs-key Set IPFS API key
ocft set-kubo-url Set Kubo node API URL
ocft set-ipfs-threshold Size threshold for IPFS (e.g., 50MB)
ocft set-ipfs-gateway Set custom public IPFS gateway

Features

  • 🔗 Message-based: Transfer files through existing chat channels
  • 📦 Chunked transfer: Split large files into small pieces (48KB chunks)
  • Integrity verification: SHA-256 hash for chunks and files
  • 🤝 Request/Accept: Explicit acceptance or auto-accept policy
  • 🔒 Security: Trusted peer whitelist with secrets
  • Secret TTL: Set expiry time for trust relationships
  • 🔄 Resume: Resume interrupted transfers from last chunk
  • 🌐 IPFS Fallback: Use IPFS for files exceeding chunk threshold

Protocol

OCFT messages use a 🔗OCFT: prefix with Base64-encoded JSON, allowing file transfers over any text-based channel.

Limitations

  • Chunk size: 48KB (safe for Base64 in messages)
  • Default max file size: 100MB (configurable via set-max-size)
  • Designed for text-based channels
  • IPFS fallback requires provider setup (Pinata, Filebase, or local Kubo)

Links

  • GitHub: https://github.com/stormixus/ocft
  • npm: https://www.npmjs.com/package/ocft

版本历史

共 1 个版本

  • v1.1.2 当前
    2026-03-28 12:31 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

ai-intelligence

Self-Improving + Proactive Agent

ivangdavila
自我反思+自我批评+自我学习+自组织记忆。智能体评估自身工作、发现错误并持续改进。
★ 1,349 📥 317,700
ai-intelligence

ontology

oswalpalash
类型化知识图谱,用于结构化智能体记忆与可组合技能。支持创建/查询实体(人员、项目、任务、事件、文档)及关联...
★ 709 📥 243,531
ai-intelligence

Proactive Agent

halthelobster
将AI智能体从任务执行者升级为主动预判需求、持续优化的智能伙伴。集成WAL协议、工作缓冲区、自主定时任务及实战验证模式。Hal Stack核心组件 🦞
★ 833 📥 212,782