Skip to content

Commit a1e4d32

Browse files
Jonathan D.A. Jewellclaude
andcommitted
Initial release: Ada TUI for rclone cloud mount configuration
Features: - TUI and CLI modes for selecting VFS cache modes - Writes mode as default (prevents Dropbox rate limiting) - Rate limiting settings (--tpslimit 4) - Wolfi container with nerdctl compose - Optional aria2 acceleration profile - SDP/VPN integration with WireGuard - cicada integration for post-quantum identity Supports: Dropbox, Google Drive, OneDrive 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
0 parents  commit a1e4d32

17 files changed

Lines changed: 1128 additions & 0 deletions

‎.github/workflows/ci.yml‎

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# SPDX-License-Identifier: AGPL-3.0-or-later
2+
name: CI
3+
4+
on:
5+
push:
6+
branches: [main]
7+
pull_request:
8+
branches: [main]
9+
10+
permissions: read-all
11+
12+
jobs:
13+
build:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
17+
18+
- name: Install GNAT
19+
run: |
20+
sudo apt-get update
21+
sudo apt-get install -y gnat gprbuild
22+
23+
- name: Build
24+
run: |
25+
mkdir -p obj bin
26+
gprbuild -P cloud_sync_tuner.gpr
27+
28+
- name: Upload binary
29+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
30+
with:
31+
name: cloud_sync_tuner
32+
path: bin/cloud_sync_tuner
33+
34+
container:
35+
runs-on: ubuntu-latest
36+
steps:
37+
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
38+
39+
- name: Build container (Alpine fallback)
40+
run: |
41+
docker build -f Containerfile.alpine-fallback -t cloud-sync-tuner:test .

‎.gitignore‎

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Build artifacts
2+
obj/
3+
bin/
4+
*.o
5+
*.ali
6+
7+
# Editor
8+
*~
9+
*.swp
10+
.vscode/
11+
.idea/
12+
13+
# Output
14+
output/
15+
16+
# OS
17+
.DS_Store
18+
Thumbs.db

‎Containerfile‎

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
# SPDX-License-Identifier: AGPL-3.0-or-later
2+
# Cloud Sync Tuner - Wolfi-based container
3+
# Build with: nerdctl build -t cloud-sync-tuner .
4+
5+
# Stage 1: Build environment (Wolfi with GNAT)
6+
FROM cgr.dev/chainguard/wolfi-base:latest AS builder
7+
8+
# Install build dependencies
9+
RUN apk add --no-cache \
10+
gcc \
11+
gnat \
12+
gprbuild \
13+
make \
14+
git
15+
16+
WORKDIR /build
17+
18+
# Copy source files
19+
COPY src/ src/
20+
COPY cloud_sync_tuner.gpr .
21+
22+
# Build the application
23+
RUN mkdir -p obj bin && \
24+
gprbuild -P cloud_sync_tuner.gpr -XBUILD_MODE=release
25+
26+
# Stage 2: Runtime environment (minimal Wolfi)
27+
FROM cgr.dev/chainguard/wolfi-base:latest AS runtime
28+
29+
# Install runtime dependencies only
30+
RUN apk add --no-cache \
31+
rclone \
32+
fuse3 \
33+
libgcc
34+
35+
# Create non-root user
36+
RUN adduser -D -h /home/tuner tuner
37+
USER tuner
38+
WORKDIR /home/tuner
39+
40+
# Copy binary from builder
41+
COPY --from=builder /build/bin/cloud_sync_tuner /usr/local/bin/
42+
43+
# Copy default config template
44+
COPY --chown=tuner:tuner config/ /home/tuner/.config/cloud-sync-tuner/
45+
46+
# Volume for output service files
47+
VOLUME ["/home/tuner/output"]
48+
49+
# Default to interactive TUI mode
50+
ENTRYPOINT ["/usr/local/bin/cloud_sync_tuner"]
51+
52+
# Health check
53+
HEALTHCHECK --interval=30s --timeout=3s \
54+
CMD ["/usr/local/bin/cloud_sync_tuner", "--version"] || exit 1
55+
56+
LABEL org.opencontainers.image.title="Cloud Sync Tuner" \
57+
org.opencontainers.image.description="TUI for managing rclone cloud mount configurations" \
58+
org.opencontainers.image.source="https://github.com/hyperpolymath/cloud-sync-tuner" \
59+
org.opencontainers.image.licenses="AGPL-3.0-or-later" \
60+
org.opencontainers.image.vendor="hyperpolymath"

‎Containerfile.alpine-fallback‎

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# SPDX-License-Identifier: AGPL-3.0-or-later
2+
# Cloud Sync Tuner - Alpine fallback (if Wolfi lacks GNAT)
3+
# Build with: nerdctl build -f Containerfile.alpine-fallback -t cloud-sync-tuner .
4+
5+
# Stage 1: Build with Alpine (has GNAT in testing)
6+
FROM alpine:edge AS builder
7+
8+
# Enable testing repo for GNAT
9+
RUN echo "@testing https://dl-cdn.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories
10+
11+
RUN apk add --no-cache \
12+
gcc-gnat@testing \
13+
gprbuild@testing \
14+
musl-dev \
15+
make
16+
17+
WORKDIR /build
18+
COPY src/ src/
19+
COPY cloud_sync_tuner.gpr .
20+
21+
RUN mkdir -p obj bin && \
22+
gprbuild -P cloud_sync_tuner.gpr
23+
24+
# Stage 2: Runtime on Wolfi (secure, minimal)
25+
FROM cgr.dev/chainguard/wolfi-base:latest
26+
27+
RUN apk add --no-cache \
28+
rclone \
29+
fuse3 \
30+
libgcc \
31+
gcompat
32+
33+
RUN adduser -D -h /home/tuner tuner
34+
USER tuner
35+
WORKDIR /home/tuner
36+
37+
COPY --from=builder /build/bin/cloud_sync_tuner /usr/local/bin/
38+
COPY --chown=tuner:tuner config/ /home/tuner/.config/cloud-sync-tuner/
39+
40+
VOLUME ["/home/tuner/output"]
41+
ENTRYPOINT ["/usr/local/bin/cloud_sync_tuner"]
42+
43+
LABEL org.opencontainers.image.title="Cloud Sync Tuner" \
44+
org.opencontainers.image.source="https://github.com/hyperpolymath/cloud-sync-tuner" \
45+
org.opencontainers.image.licenses="AGPL-3.0-or-later"

‎ECOSYSTEM.scm‎

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
; SPDX-License-Identifier: AGPL-3.0-or-later
2+
; Cloud Sync Tuner - Ecosystem Position
3+
4+
(ecosystem
5+
(version . "1.0")
6+
(name . "cloud-sync-tuner")
7+
(type . "tool")
8+
(purpose . "Configure rclone cloud mounts with rate limiting")
9+
10+
(position-in-ecosystem
11+
(layer . "configuration")
12+
(domain . "cloud-storage"))
13+
14+
(related-projects
15+
((name . "laminar")
16+
(relationship . "sibling-standard")
17+
(description . "Cloud-to-cloud streaming transfers")
18+
(integration . "Shares rclone as data plane"))
19+
20+
((name . "rclone")
21+
(relationship . "dependency")
22+
(description . "Multi-cloud sync tool")
23+
(integration . "Generates service files for rclone mounts"))
24+
25+
((name . "aria2")
26+
(relationship . "optional-enhancement")
27+
(description . "Download accelerator")
28+
(integration . "Optional compose profile for faster downloads"))
29+
30+
((name . "pssh")
31+
(relationship . "optional-enhancement")
32+
(description . "Parallel SSH execution")
33+
(integration . "Multi-host deployment of generated configs"))
34+
35+
((name . "cicada")
36+
(relationship . "security-integration")
37+
(description . "Quantum-resistant cryptographic identity management")
38+
(integration . "SDP identity verification, post-quantum key generation"))
39+
40+
((name . "wireguard")
41+
(relationship . "network-layer")
42+
(description . "Modern VPN protocol")
43+
(integration . "SDP tunnel establishment before cloud access")))
44+
45+
(what-this-is
46+
("TUI for selecting rclone VFS cache modes"
47+
"Service file generator with rate limiting"
48+
"Wolfi-containerized for security"))
49+
50+
(what-this-is-not
51+
("Not a file manager"
52+
"Not a sync tool itself (uses rclone)"
53+
"Not a cloud storage provider")))

‎LICENSE.txt‎

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
SPDX-License-Identifier: AGPL-3.0-or-later
2+
3+
GNU AFFERO GENERAL PUBLIC LICENSE
4+
Version 3, 19 November 2007
5+
6+
Copyright (C) 2025 hyperpolymath
7+
8+
This program is free software: you can redistribute it and/or modify
9+
it under the terms of the GNU Affero General Public License as published
10+
by the Free Software Foundation, either version 3 of the License, or
11+
(at your option) any later version.
12+
13+
This program is distributed in the hope that it will be useful,
14+
but WITHOUT ANY WARRANTY; without even the implied warranty of
15+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16+
GNU Affero General Public License for more details.
17+
18+
You should have received a copy of the GNU Affero General Public License
19+
along with this program. If not, see <https://www.gnu.org/licenses/>.

‎META.scm‎

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
; SPDX-License-Identifier: AGPL-3.0-or-later
2+
; Cloud Sync Tuner - Meta Information
3+
4+
(define meta
5+
'((architecture-decisions
6+
((adr-001
7+
(status . "accepted")
8+
(date . "2025-12-30")
9+
(title . "Use Ada for TUI implementation")
10+
(context . "Need cross-platform TUI with minimal dependencies")
11+
(decision . "Ada/GNAT chosen for type safety and portability")
12+
(consequences . ("Excellent i386/amd64/ARM support"
13+
"Limited mobile/Minix without libcurl fallback")))
14+
15+
(adr-002
16+
(status . "accepted")
17+
(date . "2025-12-30")
18+
(title . "Default to writes cache mode")
19+
(context . "Dropbox rate limiting breaks full cache mode")
20+
(decision . "writes mode balances performance vs API usage")
21+
(consequences . ("Prevents rate limiting"
22+
"Reasonable disk usage"
23+
"Good for daily workflows")))
24+
25+
(adr-003
26+
(status . "proposed")
27+
(date . "2025-12-30")
28+
(title . "Optional aria2 acceleration")
29+
(context . "Large file downloads benefit from parallelism")
30+
(decision . "aria2 as optional compose profile")
31+
(consequences . ("3-10x download speedup"
32+
"Additional container dependency")))))
33+
34+
(development-practices
35+
(code-style . "GNAT style guidelines")
36+
(security . "SPDX headers, minimal privileges")
37+
(testing . "gprbuild checks")
38+
(versioning . "semver")
39+
(documentation . "AsciiDoc"))
40+
41+
(design-rationale
42+
(why-ada . "Type safety, cross-platform, no runtime dependencies")
43+
(why-wolfi . "Security-focused, minimal attack surface")
44+
(why-writes-default . "Best balance for Dropbox rate limits"))))

0 commit comments

Comments
 (0)