|
2 | 2 |
|
3 | 3 | <div align="center"> |
4 | 4 |
|
5 | | -[](LICENSE) |
6 | | -[](https://www.npmjs.com/package/cloudsync-cli) |
7 | | -[](https://github.com/Tech4File/cloudsync-cli/actions) |
| 5 | +[](https://www.npmjs.com/package/cloudsync-cli) |
| 6 | +[](https://github.com/Tech4File/cloudsync-cli/packages) |
| 7 | +[](https://github.com/Tech4File/cloudsync-cli/releases) |
| 8 | +[](LICENSE) |
| 9 | +[](https://nodejs.org/) |
| 10 | +[](https://github.com/Tech4File/cloudsync-cli/actions) |
8 | 11 |
|
9 | | -**Secure, Git-like version control CLI for synchronizing files between local and remote environments over encrypted SSH tunnels.** |
| 12 | +**An open-source, Git-like version control CLI for secure cloud-to-local synchronization via encrypted SSH tunnels.** |
| 13 | + |
| 14 | +*"Your configs, your cloud, your rules — no public repos required."* |
10 | 15 |
|
11 | 16 | </div> |
12 | 17 |
|
13 | 18 | --- |
14 | 19 |
|
15 | | -## What is CloudSync-CLI? |
16 | | - |
17 | | -CloudSync-CLI is a cross-platform command-line tool that brings Git-like version control (stage, commit, history, diff, rollback) to configuration files and sensitive data — syncing them directly between machines over encrypted tunnels without ever touching a public repository. |
| 20 | +## 🚀 Quick Installation |
18 | 21 |
|
19 | | -**10 transport protocols.** **Git-like VCS.** **Zero public exposure.** |
20 | | - |
21 | | ---- |
| 22 | +### Option 1: Install via npm (Global CLI) |
| 23 | +```bash |
| 24 | +npm install -g cloudsync-cli |
| 25 | +``` |
22 | 26 |
|
23 | | -## Repository Structure |
| 27 | +### Option 2: Install via GitHub Packages (GPR) |
| 28 | +```bash |
| 29 | +npm install -g @tech4file/cloudsync-cli --registry=https://npm.pkg.github.com |
| 30 | +``` |
24 | 31 |
|
25 | | -| Path | Description | |
26 | | -|---|---| |
27 | | -| `cloudsync-cli/` | The npm package — CLI source, commands, transport engine, VCS | |
28 | | -| `.github/workflows/ci.yml` | CI pipeline — tests on Ubuntu (18/20/22) + Windows + macOS | |
29 | | -| `.github/workflows/release.yml` | Auto-release on tag push — builds Win/Mac/Linux binaries + npm + GPR | |
| 32 | +### Option 3: Download Standalone Binaries (Windows / Linux / macOS) |
| 33 | +Download single-executable binaries directly from the latest [GitHub Releases](https://github.com/Tech4File/cloudsync-cli/releases): |
| 34 | +- 🪟 `cloudsync.exe` / `cloudsync-windows-x64.zip` (Windows) |
| 35 | +- 🐧 `cloudsync` (Linux x64) |
| 36 | +- 🍏 `cloudsync` (macOS x64 / ARM64) |
30 | 37 |
|
31 | 38 | --- |
32 | 39 |
|
33 | | -## Quick Start |
| 40 | +## 📋 Quick Start |
34 | 41 |
|
35 | 42 | ```bash |
36 | | -npm install -g cloudsync-cli |
37 | | -cloudsync init --host your-server.com --user username |
| 43 | +# 1. Initialize configuration |
| 44 | +cloudsync init --host your-server.com --user username --port 22 |
| 45 | + |
| 46 | +# 2. Stage files for version control |
38 | 47 | cloudsync stage .env config.json |
39 | | -cloudsync commit "Update config" |
40 | | -cloudsync upload --include .env --exclude node_modules |
41 | | -cloudsync --help |
| 48 | + |
| 49 | +# 3. Commit staged changes locally |
| 50 | +cloudsync commit "Update database config" |
| 51 | + |
| 52 | +# 4. Securely upload to remote target |
| 53 | +cloudsync upload --profile default |
| 54 | + |
| 55 | +# 5. Check operational health & network connectivity |
| 56 | +cloudsync doctor |
42 | 57 | ``` |
43 | 58 |
|
44 | | -Full docs: [cloudsync-cli/README.md](cloudsync-cli/README.md) |
| 59 | +Full documentation & CLI command reference: [cloudsync-cli/README.md](cloudsync-cli/README.md) |
45 | 60 |
|
46 | 61 | --- |
47 | 62 |
|
48 | | -## Automated CI/CD |
| 63 | +## 📁 Repository Structure |
49 | 64 |
|
50 | | -| Trigger | What Happens | |
| 65 | +| Path | Description | |
51 | 66 | |---|---| |
52 | | -| Push to `main` / PR | `ci.yml` — tests Ubuntu (18/20/22) + Windows + macOS + security | |
53 | | -| Push version tag `v1.0.6` | `release.yml` — tests → builds EXEs → npm publish → GPR publish → GitHub Release | |
| 67 | +| [`cloudsync-cli/`](cloudsync-cli/) | The npm package directory containing CLI source, commands, transport engine, and VCS modules. | |
| 68 | +| [`.github/workflows/ci.yml`](.github/workflows/ci.yml) | Continuous Integration matrix testing Node 18, 20, 22 on Ubuntu, Windows, and macOS. | |
| 69 | +| [`.github/workflows/release.yml`](.github/workflows/release.yml) | Automated build & publication pipeline — produces standalone binaries, releases to npmjs, publishes to GitHub Packages (GPR), and creates GitHub Releases. | |
| 70 | + |
| 71 | +--- |
54 | 72 |
|
55 | | -**No `npm publish` locally. Everything automated.** |
| 73 | +## ⚙️ Automated CI/CD Pipeline |
| 74 | + |
| 75 | +| Pipeline | Trigger | Automated Operations | |
| 76 | +|---|---|---| |
| 77 | +| **CI Matrix** (`ci.yml`) | Push / PR to `main` | Runs multi-OS test matrix across Node.js 18, 20, and 22. | |
| 78 | +| **Release Pipeline** (`release.yml`) | Push to `main` | Runs test suite $\rightarrow$ builds bundles $\rightarrow$ compiles standalone EXEs/binaries $\rightarrow$ publishes to npmjs $\rightarrow$ publishes to GPR $\rightarrow$ generates GitHub Release with SHA-256 checksums. | |
56 | 79 |
|
57 | 80 | --- |
58 | 81 |
|
59 | | -## Development |
| 82 | +## 🛡️ Security & Hardening Highlights |
60 | 83 |
|
61 | | -```bash |
62 | | -git clone https://github.com/Tech4File/cloudsync-cli.git |
63 | | -cd cloudsync-cli/cloudsync-cli |
64 | | -npm install && npm test |
65 | | -``` |
| 84 | +- **Zero-Dependency Security Core**: Hardened with prototype pollution protection (`safeJsonParse`), path traversal filtering (`safePath`), and SSRF-safe hostname validation. |
| 85 | +- **Encrypted SSH Channels**: Native `ssh2` transport layer supporting keypair auth, custom ports, and SCP/SFTP/RSYNC protocols. |
| 86 | +- **HTTP Share Server Security**: Built-in HTTP sharing with rate limiting (60 req/min), CORS restriction, and security headers (`CSP`, `X-Frame-Options: DENY`, `X-Content-Type-Options: nosniff`). |
| 87 | + |
| 88 | +--- |
| 89 | + |
| 90 | +## 📄 License |
66 | 91 |
|
67 | | -## License |
| 92 | +Distributed under the **MIT License**. See [LICENSE](LICENSE) for details. |
68 | 93 |
|
69 | | -MIT — [LICENSE](LICENSE) | [Security policy](cloudsync-cli/SECURITY.md) | [Contributing](cloudsync-cli/CONTRIBUTING.md) |
| 94 | +Security Policy: [SECURITY.md](cloudsync-cli/SECURITY.md) | Contributing Guidelines: [CONTRIBUTING.md](cloudsync-cli/CONTRIBUTING.md) |
0 commit comments