Skip to content

ixchio/tas

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

18 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

TAS β€” Telegram as Storage

πŸ“¦ TAS β€” Telegram as Storage

Turn Telegram into your personal encrypted cloud drive.
Free forever. Zero-knowledge. No credit card. No limits.

CI npm version Downloads License: MIT GitHub Stars

Quick Start β€’ Why TAS β€’ Features β€’ Security β€’ Docs β€’ Contributing



The Problem

Google Drive scans your files. Dropbox costs $12/mo. iCloud locks you into Apple. Every "free" cloud storage either reads your data, charges you money, or caps your storage.

Meanwhile, Telegram gives every user unlimited storage with a bot API β€” and nobody's using it.

The Solution

TAS compresses, encrypts, and uploads your files to your own private Telegram bot chat. Your password never leaves your machine. Telegram only sees encrypted noise. You get a real CLI-powered cloud drive β€” with mount, sync, share, and search β€” for $0/month, forever.

  Your Machine                          Telegram Cloud
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”               β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                  β”‚   Compress    β”‚                      β”‚
β”‚   tas push       │──→ Encrypt ──→│  πŸ”’ Encrypted Blobs  β”‚
β”‚   tas mount      │──→ Chunk   ──→│  πŸ”’ Private Bot Chat β”‚
β”‚   tas sync       β”‚               β”‚  πŸ”’ Your Data, Safe  β”‚
β”‚                  β”‚   Decrypt    β”‚                      β”‚
β”‚   tas pull       │←── Decomp ←──│  ← Download on demandβ”‚
β”‚                  β”‚               β”‚                      β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜               β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
     SQLite Index                     Unlimited & Free

⚑ Quick Start

Three commands. Two minutes. Zero cost.

npm install -g @nightowne/tas-cli

tas init              # Connect your Telegram bot (guided wizard)
tas push secret.pdf   # Upload β€” encrypted, compressed, done
tas pull secret.pdf   # Download β€” decrypted, verified, instant

That's it. You now have encrypted cloud storage.


πŸ’‘ Why TAS

vs. Google Drive

  • ❌ Google scans & indexes your files
  • ❌ 15 GB free tier
  • ❌ No encryption at rest (by you)

vs. Dropbox

  • ❌ $12/mo for 2 TB
  • ❌ Can access your data
  • ❌ No CLI-first experience

vs. Mega / pCloud

  • ❌ Freemium with tight caps
  • ❌ Closed source encryption
  • ❌ Can't self-host or script

TAS gives you

  • βœ… $0/month β€” forever, no caps
  • βœ… Zero-knowledge β€” only you can decrypt
  • βœ… AES-256-GCM β€” military-grade encryption
  • βœ… Mount as folder β€” FUSE filesystem
  • βœ… Auto-sync β€” Dropbox-style folder sync
  • βœ… Share links β€” expiring, download-limited
  • βœ… CLI-first β€” cron, Docker, CI/CD ready
  • βœ… Open source β€” audit every line

πŸ”₯ Features

πŸ—‚οΈ Mount as a Local Folder

Drag and drop files into Telegram storage like it's a regular drive.

tas mount ~/cloud        # Mount your Telegram storage
# Now use Finder, Explorer, or any app β€” files sync to Telegram
tas unmount ~/cloud

Requires libfuse β€” apt install fuse libfuse-dev on Linux, brew install macfuse on macOS.

πŸ”„ Auto-Sync Folders

Dropbox-style: register a folder, and TAS watches for changes and uploads automatically.

tas sync add ~/Documents    # Register a folder
tas sync start              # Watch & auto-upload changes
tas sync pull               # Download everything back
tas sync status             # See what's synced

πŸ”— Share with Expiring Links

Generate one-time download links with a sleek dark-themed download page. Files are decrypted on-the-fly β€” the link holder never sees your password.

tas share create report.pdf --expire 1h --max-downloads 3
# β†’ http://localhost:3000/d/a1b2c3d4...

tas share list              # See active shares
tas share revoke a1b2c3d4   # Revoke anytime

🏷️ Tags & Search

Organize and find files instantly.

tas tag add report.pdf work Q4
tas search "report"          # Search by filename
tas search -t work           # Search by tag

🩺 Self-Diagnostics

One command to check if everything is healthy.

tas doctor
# βœ“ Node.js 20.11.0
# βœ“ Config v2 (encrypted token)
# βœ“ Database: 42 files, 1.3 GB total
# βœ“ Disk space: 50 GB free (32% used)
# βœ“ Encryption: AES-256-GCM, PBKDF2-SHA512 600,000 iterations
# ✨ All systems go!

πŸ€– Built for Automation

First-class JSON output, environment variable support, and zero interactivity mode.

export TAS_PASSWORD="your-password"     # Skip prompts
export TAS_DATA_DIR="/custom/path"      # Custom data location

tas push backup.tar.gz                  # Non-interactive upload
tas list --json | jq '.[].filename'     # Pipe to jq
tas status --json                       # Machine-readable status

# Works with: cron β€’ GitHub Actions β€’ Docker β€’ systemd β€’ any CI/CD

πŸ›‘οΈ Security

TAS implements zero-knowledge encryption β€” we can't read your data, Telegram can't read your data, nobody can read your data without your password.

Layer Implementation Why It Matters
Cipher AES-256-GCM Same cipher used by governments & banks
Key Derivation PBKDF2-SHA512, 600k iterations OWASP 2025 compliant β€” brute-force resistant
Salt 32 bytes, cryptographically random Unique per file β€” no rainbow tables
IV 12 bytes, cryptographically random Unique per file β€” no pattern analysis
Auth Tag 16 bytes GCM authentication Tamper detection β€” any bit flip = rejected
Bot Token Encrypted at rest (AES-256-GCM) Even your config file is protected
Password Hash PBKDF2-based verification Your password hash is computationally expensive to crack
Integrity SHA-256 verified on every download Bit-perfect downloads, guaranteed
Share Server XSS-safe, RFC 6266 headers Hardened against injection attacks

What Telegram Sees

πŸ“¦ a7f3b2c1e9d4.tas β€” 12.4 MB β€” application/octet-stream

That's it. An opaque encrypted blob. No filename, no content, no metadata. Just noise.


πŸ”„ Reliability

Built like professional backup tools (inspired by restic, rclone, borg):

Feature Details
Exponential Backoff Auto-retry with jitter on Telegram 429 errors and network timeouts
Rate Limiting Built-in 1 msg/sec limiter β€” never hits Telegram's rate limits
Integrity Verification SHA-256 hash check after every single download
Resume Uploads Interrupted? Run tas resume to pick up where you left off
Graceful Shutdown SIGINT/SIGTERM handled cleanly β€” zero data corruption risk
Self-Diagnostics tas doctor validates your entire setup in seconds

πŸ“‹ CLI Reference

Core Commands
tas init                    # πŸš€ Interactive setup wizard
tas push <file>             # ⬆️  Upload (encrypt + compress + upload)
tas pull <file|hash>        # ⬇️  Download (download + decrypt + verify)
tas list [-l] [--json]      # πŸ“‹ List all files
tas delete <file|hash>      # πŸ—‘οΈ  Remove from index (--hard to delete from Telegram)
tas status [--json]         # πŸ“Š Storage stats
tas search <query>          # πŸ” Find files by name or tag
tas resume                  # πŸ”„ Resume interrupted uploads
tas verify                  # βœ… Verify all files exist & are intact
tas doctor                  # 🩺 System health check
Mount & Sync
# FUSE Mount (use Telegram like a local folder)
tas mount <path>            # Mount
tas unmount <path>          # Unmount

# Folder Sync (Dropbox-style auto-upload)
tas sync add <folder>       # Register a folder to sync
tas sync start              # Start watching for changes
tas sync pull               # Download all synced files
tas sync status             # Show sync status
Share & Tags
# Temporary Share Links
tas share create <file> [--expire 24h] [--max-downloads 3]
tas share list              # Active shares
tas share revoke <token>    # Revoke a share link

# File Tags
tas tag add <file> <tags...>
tas tag remove <file> <tags...>
tas tag list [tag]          # List tags or files with a specific tag

πŸ—οΈ Architecture

src/
β”œβ”€β”€ cli.js              # Commander-based CLI β€” all commands
β”œβ”€β”€ index.js            # Streaming upload/download pipeline
β”œβ”€β”€ crypto/
β”‚   └── encryption.js   # AES-256-GCM + PBKDF2-SHA512 key derivation
β”œβ”€β”€ db/
β”‚   └── index.js        # SQLite index (files, chunks, tags, shares, sync)
β”œβ”€β”€ telegram/
β”‚   └── client.js       # Bot API wrapper β€” retry, rate-limit, streaming
β”œβ”€β”€ fuse/
β”‚   └── mount.js        # FUSE filesystem β€” mount Telegram as a folder
β”œβ”€β”€ share/
β”‚   └── server.js       # HTTP server β€” expiring download links
β”œβ”€β”€ sync/
β”‚   └── sync.js         # Folder watcher β€” Dropbox-style auto-sync
└── utils/
    β”œβ”€β”€ compression.js   # Smart gzip (skips already-compressed formats)
    β”œβ”€β”€ chunker.js       # 49MB chunking with custom WAS1 file headers
    β”œβ”€β”€ progress.js      # Terminal progress bar with speed + ETA
    β”œβ”€β”€ throttle.js      # Bandwidth limiter (stream transform)
    β”œβ”€β”€ branding.js      # ASCII art + formatting
    └── cli-helpers.js   # Password management + config resolution

Tech stack: Node.js Β· better-sqlite3 Β· node-telegram-bot-api Β· fuse-native Β· Commander Β· Chalk Β· Ora Β· Inquirer


⚠️ Good to Know

πŸ“Œ Not a backup solution Telegram can delete content. Use TAS alongside proper backups, not instead of them.
πŸ“Œ 49 MB chunks Files are automatically split due to Telegram Bot API limits. Fully transparent.
πŸ“Œ Single-user Designed for personal use. Not multi-tenant.
πŸ“Œ FUSE = Linux/macOS Mount feature requires libfuse. CLI works everywhere Node.js runs.
πŸ“Œ No versioning (yet) Overwriting a file replaces the previous version.

πŸ› οΈ Development

git clone https://github.com/ixchio/tas
cd tas && npm install
npm test  # 43 tests, all passing

PRs welcome. See CONTRIBUTING.md for guidelines.


🌟 Contributing

TAS is open source and we love contributions:


πŸ“„ License

MIT β€” use it, fork it, ship it, sell it. Do whatever you want.


Built with β˜• and stubbornness by @ixchio
If TAS saved you money, consider giving it a ⭐

About

Telegram as Storage - free encrypted cloud storage. Mount Telegram as a folder.

Topics

Resources

License

Contributing

Security policy

Stars

Watchers

Forks

Sponsor this project

Packages

 
 
 

Contributors