OCFT - OpenClaw File Transfer
by @stormixus
P2P file transfer between AI agents via message channels. Supports chunked transfer, IPFS fallback for large files, and trusted peer management.
clawhub install ocftπ About This Skill
name: ocft description: P2P file transfer between AI agents via message channels. Supports chunked transfer, IPFS fallback for large files, and trusted peer management. homepage: https://github.com/stormixus/ocft
OCFT - OpenClaw File Transfer Protocol
P2P file transfer between AI agents via message channels.
When to Use
Use this skill when:
Installation
npm install -g ocft
Quick Start
# Initialize your node (generates unique ID and secret)
ocft initView your status
ocft statusExport your connection info to share with peers
ocft exportAdd a trusted peer
ocft add-peer --name "Friend"Or import from URI
ocft import ocft://eyJub2RlSWQ...
CLI Commands
Core Commands
| Command | Description |
|---------|-------------|
| ocft init | Initialize node with unique ID and secret |
| ocft status | Show node status and configuration |
| ocft show-secret | Display full secret (careful!) |
| ocft export | Export connection info as URI |
| ocft import | Import peer from ocft:// URI |
| ocft verify | Verify if a secret matches yours |
Peer Management
| Command | Description |
|---------|-------------|
| ocft add-peer | Add a trusted peer |
| ocft remove-peer | Remove a trusted peer |
| ocft list-peers | List all trusted peers |
| ocft extend-peer | Extend a peer's trust expiry |
| ocft set-ttl | Set default secret TTL (0 = no expiry) |
Configuration
| Command | Description |
|---------|-------------|
| ocft set-download | Set download directory |
| ocft set-max-size | Set max file size (e.g., 100MB, 1GB) |
IPFS Fallback (for large files)
| Command | Description |
|---------|-------------|
| ocft ipfs-enable | Enable IPFS fallback for large files |
| ocft ipfs-disable | Disable 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
Protocol
OCFT messages use a πOCFT: prefix with Base64-encoded JSON, allowing file transfers over any text-based channel.
Limitations
set-max-size)Links
β‘ When to Use
π‘ Examples
# Initialize your node (generates unique ID and secret)
ocft initView your status
ocft statusExport your connection info to share with peers
ocft exportAdd a trusted peer
ocft add-peer --name "Friend"Or import from URI
ocft import ocft://eyJub2RlSWQ...
βοΈ Configuration
| Command | Description |
|---------|-------------|
| ocft set-download | Set download directory |
| ocft set-max-size | Set max file size (e.g., 100MB, 1GB) |
IPFS Fallback (for large files)
| Command | Description |
|---------|-------------|
| ocft ipfs-enable | Enable IPFS fallback for large files |
| ocft ipfs-disable | Disable 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 |