@nightowne/tas-cli 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +174 -0
- package/package.json +57 -0
- package/src/cli.js +1010 -0
- package/src/crypto/encryption.js +116 -0
- package/src/db/index.js +356 -0
- package/src/fuse/mount.js +516 -0
- package/src/index.js +219 -0
- package/src/sync/sync.js +297 -0
- package/src/telegram/client.js +131 -0
- package/src/utils/branding.js +94 -0
- package/src/utils/chunker.js +155 -0
- package/src/utils/compression.js +84 -0
- package/systemd/README.md +32 -0
- package/systemd/tas-sync.service +21 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 ixchio
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
# ๐ฆ TAS - Use Telegram as Your Cloud Storage
|
|
2
|
+
|
|
3
|
+
> **Free. Encrypted. Unlimited.** Stop paying for cloud storage.
|
|
4
|
+
|
|
5
|
+
```
|
|
6
|
+
โโโโโโโโโ โโโโโโ โโโโโโโโ
|
|
7
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
8
|
+
โโโ โโโโโโโโโโโโโโโโ
|
|
9
|
+
โโโ โโโโโโโโโโโโโโโโ
|
|
10
|
+
โโโ โโโ โโโโโโโโโโโ
|
|
11
|
+
โโโ โโโ โโโโโโโโโโโ
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
I got tired of paying $10/month for cloud storage. So I built this.
|
|
15
|
+
|
|
16
|
+
**TAS turns your Telegram bot into unlimited cloud storage.** Files are encrypted with AES-256 before upload โ not even Telegram can read them.
|
|
17
|
+
|
|
18
|
+
The killer feature? **Mount it as a folder.** Drag and drop files like it's Google Drive, but it's actually your private Telegram chat.
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## โก TL;DR
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
npm install -g @nightowne/tas-cli
|
|
26
|
+
tas init
|
|
27
|
+
tas mount ~/cloud
|
|
28
|
+
# Now use ~/cloud like any folder. Files go to Telegram.
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
## ๐ค Why?
|
|
34
|
+
|
|
35
|
+
| | TAS | Google Drive | Dropbox |
|
|
36
|
+
|---|:---:|:---:|:---:|
|
|
37
|
+
| **Price** | Free forever | $10/mo after 15GB | $12/mo after 2GB |
|
|
38
|
+
| **Storage** | Unlimited | Limited | Limited |
|
|
39
|
+
| **E2E Encrypted** | โ
| โ | โ |
|
|
40
|
+
| **Mounts as folder** | โ
| โ | โ |
|
|
41
|
+
| **Your data, your control** | โ
| โ | โ |
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
45
|
+
## ๐ Quick Start
|
|
46
|
+
|
|
47
|
+
### 1. Get a Telegram Bot (30 seconds)
|
|
48
|
+
- Message [@BotFather](https://t.me/BotFather) on Telegram
|
|
49
|
+
- Send `/newbot`, pick a name
|
|
50
|
+
- Copy the token
|
|
51
|
+
|
|
52
|
+
### 2. Install & Setup
|
|
53
|
+
```bash
|
|
54
|
+
npm install -g tas-cli
|
|
55
|
+
tas init
|
|
56
|
+
# Paste token, set password, message your bot
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
### 3. Use It
|
|
60
|
+
```bash
|
|
61
|
+
# Upload files
|
|
62
|
+
tas push secret.pdf
|
|
63
|
+
|
|
64
|
+
# Mount as a folder (the magic โจ)
|
|
65
|
+
tas mount ~/cloud
|
|
66
|
+
cp anything.zip ~/cloud/ # uploads to Telegram
|
|
67
|
+
open ~/cloud/secret.pdf # downloads from Telegram
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
---
|
|
71
|
+
|
|
72
|
+
## ๏ฟฝ The Folder Thing
|
|
73
|
+
|
|
74
|
+
This is the part that makes TAS different. Run `tas mount ~/cloud` and you get a folder that:
|
|
75
|
+
|
|
76
|
+
- **Looks normal** in your file manager
|
|
77
|
+
- **Drag & drop** = upload to Telegram
|
|
78
|
+
- **Open files** = download from Telegram
|
|
79
|
+
- **Delete files** = removes from Telegram
|
|
80
|
+
|
|
81
|
+
It's like Dropbox, except free and you own your data.
|
|
82
|
+
|
|
83
|
+
```bash
|
|
84
|
+
$ ls ~/cloud
|
|
85
|
+
secret.pdf photos.zip notes.txt
|
|
86
|
+
|
|
87
|
+
$ cp newfile.doc ~/cloud/
|
|
88
|
+
# Compresses โ Encrypts โ Uploads to Telegram
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
---
|
|
92
|
+
|
|
93
|
+
## ๐ท๏ธ Organize with Tags
|
|
94
|
+
|
|
95
|
+
```bash
|
|
96
|
+
tas tag add report.pdf work finance
|
|
97
|
+
tas tag list work # shows all "work" files
|
|
98
|
+
tas tag remove report.pdf finance
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
---
|
|
102
|
+
|
|
103
|
+
## ๐ Auto-Sync Folders
|
|
104
|
+
|
|
105
|
+
Dropbox-style sync. Any changes in the folder โ auto-upload to Telegram.
|
|
106
|
+
|
|
107
|
+
```bash
|
|
108
|
+
tas sync add ~/Documents/work
|
|
109
|
+
tas sync start
|
|
110
|
+
# Now any file changes auto-sync to Telegram
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
Two-way sync:
|
|
114
|
+
```bash
|
|
115
|
+
tas sync pull # Download everything from Telegram โ local
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
---
|
|
119
|
+
|
|
120
|
+
## ๏ฟฝ๏ธ Security
|
|
121
|
+
|
|
122
|
+
- **AES-256-GCM** encryption
|
|
123
|
+
- **PBKDF2** key derivation (100k iterations)
|
|
124
|
+
- **Random IV** per file
|
|
125
|
+
- Password never stored (only hash for verification)
|
|
126
|
+
|
|
127
|
+
Your files are encrypted **before** they leave your computer. Telegram sees gibberish.
|
|
128
|
+
|
|
129
|
+
---
|
|
130
|
+
|
|
131
|
+
## ๐ All Commands
|
|
132
|
+
|
|
133
|
+
```bash
|
|
134
|
+
tas init # Setup
|
|
135
|
+
tas push <file> # Upload
|
|
136
|
+
tas pull <file> # Download
|
|
137
|
+
tas list # List files
|
|
138
|
+
tas delete <file> # Remove
|
|
139
|
+
tas mount <folder> # ๐ฅ Mount as folder
|
|
140
|
+
tas unmount <folder> # Unmount
|
|
141
|
+
tas tag add/remove/list # Tags
|
|
142
|
+
tas sync add/start/pull # Folder sync
|
|
143
|
+
tas verify # Check file integrity
|
|
144
|
+
tas status # Stats
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
---
|
|
148
|
+
|
|
149
|
+
## โ๏ธ Auto-Start on Boot
|
|
150
|
+
|
|
151
|
+
Want sync running 24/7? Check out [systemd/README.md](systemd/README.md) for the setup.
|
|
152
|
+
|
|
153
|
+
---
|
|
154
|
+
|
|
155
|
+
## ๐งช Development
|
|
156
|
+
|
|
157
|
+
```bash
|
|
158
|
+
git clone https://github.com/ixchio/tas
|
|
159
|
+
cd tas
|
|
160
|
+
npm install
|
|
161
|
+
npm test # 28 tests
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
---
|
|
165
|
+
|
|
166
|
+
## ๐ License
|
|
167
|
+
|
|
168
|
+
MIT โ do whatever you want.
|
|
169
|
+
|
|
170
|
+
---
|
|
171
|
+
|
|
172
|
+
**Made because cloud storage shouldn't cost money.** โ๏ธ
|
|
173
|
+
|
|
174
|
+
If this saved you some subscription fees, star the repo โญ
|
package/package.json
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@nightowne/tas-cli",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "๐ฆ Telegram as Storage - Free encrypted cloud storage via Telegram. Mount Telegram as a folder!",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "src/index.js",
|
|
7
|
+
"bin": {
|
|
8
|
+
"tas": "./src/cli.js"
|
|
9
|
+
},
|
|
10
|
+
"scripts": {
|
|
11
|
+
"start": "node src/cli.js",
|
|
12
|
+
"init": "node src/cli.js init",
|
|
13
|
+
"test": "node --test tests/",
|
|
14
|
+
"prepublishOnly": "npm test"
|
|
15
|
+
},
|
|
16
|
+
"keywords": [
|
|
17
|
+
"telegram",
|
|
18
|
+
"storage",
|
|
19
|
+
"cloud",
|
|
20
|
+
"encryption",
|
|
21
|
+
"backup",
|
|
22
|
+
"sync",
|
|
23
|
+
"fuse",
|
|
24
|
+
"mount",
|
|
25
|
+
"free-storage",
|
|
26
|
+
"file-manager",
|
|
27
|
+
"cli"
|
|
28
|
+
],
|
|
29
|
+
"author": "ixchio",
|
|
30
|
+
"license": "MIT",
|
|
31
|
+
"repository": {
|
|
32
|
+
"type": "git",
|
|
33
|
+
"url": "git+https://github.com/ixchio/tas.git"
|
|
34
|
+
},
|
|
35
|
+
"homepage": "https://github.com/ixchio/tas#readme",
|
|
36
|
+
"bugs": {
|
|
37
|
+
"url": "https://github.com/ixchio/tas/issues"
|
|
38
|
+
},
|
|
39
|
+
"files": [
|
|
40
|
+
"src/",
|
|
41
|
+
"systemd/",
|
|
42
|
+
"README.md",
|
|
43
|
+
"LICENSE"
|
|
44
|
+
],
|
|
45
|
+
"dependencies": {
|
|
46
|
+
"node-telegram-bot-api": "^0.66.0",
|
|
47
|
+
"commander": "^12.1.0",
|
|
48
|
+
"better-sqlite3": "^11.6.0",
|
|
49
|
+
"fuse-native": "^2.2.6",
|
|
50
|
+
"ora": "^8.1.1",
|
|
51
|
+
"chalk": "^5.3.0",
|
|
52
|
+
"inquirer": "^12.2.0"
|
|
53
|
+
},
|
|
54
|
+
"engines": {
|
|
55
|
+
"node": ">=18.0.0"
|
|
56
|
+
}
|
|
57
|
+
}
|