sft3
v1.0.0
Published
An S3-like wrapper backed by SFTP. Simple, lightweight object storage for servers with SFTP access.
Maintainers
Readme
🌐 sft3
SFTP + S3-style storage API
sft3 is a lightweight Node.js/TypeScript library that turns any SFTP server into a simple, S3-like object storage system.
Perfect for:
- Self-hosted storage
- Cheap shared hosting
- Internal tools
- Replacing S3 for small workflows
- CLI automation
✨ Features
putObject(key, body)— uploadgetObject(key)— downloadlistObjects(prefix)— list folders/keysdeleteObject(key)- Handles nested directories automatically
- Works with Streams, Buffers, and strings
- Built-in CLI for upload/download/list
📦 Install
Local
npm install sft3Global (CLI)
npm install -g sft3🚀 Usage (Node.js / TypeScript)
import { SFT3Client } from "sft3";
const client = new SFT3Client({
host: "your.server.com",
username: "user",
password: "pass",
});
await client.connect();
await client.putObject({
key: "uploads/hello.txt",
body: "Hello from sft3!"
});
const file = await client.getObject({ key: "uploads/hello.txt" });
console.log(file.toString());
await client.disconnect();🖥 CLI Usage
Upload
sft3 upload ./local.txt uploads/remote.txt \
--host example.com \
--username user \
--password passDownload
sft3 download uploads/remote.txt local.txt \
--host example.com \
--username user
List
sft3 list uploads \
--host example.com \
--username user🧪 Testing
npm testLicense
MIT
