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.
- pgroonga Extension: Required for file search within Postgres.
- Telegram API: App ID and Hash from my.telegram.org.
Installation
1. Database Setup
Ensure Postgres is running and the
pgroonga extension is installed.
CODEBLOCK0
2. Configure
Run the setup script to generate
config/config.toml:
CODEBLOCK1
3. Start Server
CODEBLOCK2
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). - INLINECODE5 : Your Telegram session hash (found in the
teldrive.sessions table).
Commands
CODEBLOCK3
Directory Structure
- -
bin/: Teldrive binary. - INLINECODE8 : Configuration templates and generated config.
- INLINECODE9 : Setup, management, and client scripts.
- INLINECODE10 : Application logs.
Telegram 云存储(Teldrive 版)
该技能运行 Teldrive,这是一个强大的工具,用于整理 Telegram 文件并提供高速 API/UI 进行访问。
功能特性
- - 无限存储:使用 Telegram 作为后端。
- 高性能:使用 Go 语言编写,针对速度进行了优化。
- UI 与 API:包含 Web 界面和 REST API。
- AI 原生客户端:包含用于基于代理的文件操作的 client.py。
致谢
本技能是对
divyam234 开发的
Teldrive 的封装。核心引擎的所有功劳归功于原作者。
环境要求
- 1. PostgreSQL 数据库:建议使用 17+ 版本。
- pgroonga 扩展:用于在 Postgres 中进行文件搜索。
- Telegram API:从 my.telegram.org 获取应用 ID 和哈希值。
安装指南
1. 数据库设置
确保 Postgres 正在运行,并且已安装 pgroonga 扩展。
sql
CREATE DATABASE teldrive;
\c teldrive
CREATE EXTENSION IF NOT EXISTS pgroonga;
2. 配置
运行设置脚本以生成 config/config.toml:
bash
./scripts/setup.sh
3. 启动服务器
bash
./scripts/manage.sh start
代理使用方式
该技能包含一个用于编程访问的 Python 客户端。
环境变量
- - TELDRIVETOKEN:您的 JWT 令牌(登录后可从 UI 或 config/token.txt 获取)。
- TELDRIVESESSION_HASH:您的 Telegram 会话哈希值(可在 teldrive.sessions 表中找到)。
命令
bash
列出文件
python3 scripts/client.py list /
上传文件
python3 scripts/client.py upload local_file.txt /remote/path
下载文件
python3 scripts/client.py download
id> localsave_path
目录结构
- - bin/:Teldrive 二进制文件。
- config/:配置模板和生成的配置文件。
- scripts/:设置、管理和客户端脚本。
- logs/:应用程序日志。