360 Secure SkillHub
360 安全技能中心

Telegram Cloud Storage

该 Skill 封装 Teldrive,把 Telegram 作为后端存储,提供本地 Web UI 与 REST API,并附带 Python 客户端脚本执行上传、下载、列目录等操作。需要 PostgreSQL 17+(含 pgroonga)与 Telegram API 凭据,并通过脚本下载二进制、生成配置、启动服务。

oki3505f
oki3505f
热度 97.83
最近更新 2026-05-17 11:20:27
分类:自动化依赖:代码执行 / 读写文件 / 第三方 API应用场景:自动化脚本 / 工作流 / API 集成

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add telegram-cloud-storage
Metadata
name
telegram-cloud-storage
description
A high-performance Telegram Cloud Storage solution using Teldrive. Turns Telegram into an unlimited cloud drive with a local API/UI.
metadata
{"openclaw":{"requires":{"bins":["teldrive"]},"install":[{"id":"binary","kind":"exec","command":"./scripts/install_binary.sh","label":"Download Teldrive Binary"}]}}

Telegram Cloud Storage (Teldrive Edition)

This skill runs Teldrive, a powerful utility that organizes Telegram files and provides a high-speed API/UI for accessing them.

Features

  • Unlimited Storage: Uses Telegram as a backend.
  • High Performance: Written in Go, optimized for speed.
  • UI & API: Includes a web interface and REST API.
  • AI-Native Client: Includes client.py for agent-based file operations.

Credits

This skill is a wrapper for Teldrive by divyam234. All credit for the core engine goes to the original authors.

Requirements

  1. PostgreSQL Database: Version 17+ recommended.
  2. pgroonga Extension: Required for file search within Postgres.
  3. Telegram API: App ID and Hash from my.telegram.org.

Installation

1. Database Setup

Ensure Postgres is running and the pgroonga extension is installed.

CREATE DATABASE teldrive;
\c teldrive
CREATE EXTENSION IF NOT EXISTS pgroonga;

2. Configure

Run the setup script to generate config/config.toml:

./scripts/setup.sh

3. Start Server

./scripts/manage.sh start

Agent Usage

The skill includes a Python client for programmatic access.

Environment Variables

  • TELDRIVE_TOKEN: Your JWT token (get this from the UI or config/token.txt after login).
  • TELDRIVE_SESSION_HASH: Your Telegram session hash (found in the teldrive.sessions table).

Commands

# List files
python3 scripts/client.py list /

# Upload a file
python3 scripts/client.py upload local_file.txt /remote/path

# Download a file
python3 scripts/client.py download <file_id> local_save_path

Directory Structure

  • bin/: Teldrive binary.
  • config/: Configuration templates and generated config.
  • scripts/: Setup, management, and client scripts.
  • logs/: Application logs.