| Crates.io | small-bin |
| lib.rs | small-bin |
| version | 1.0.3 |
| created_at | 2025-10-23 13:37:02.417995+00 |
| updated_at | 2025-11-22 16:06:20.295163+00 |
| description | Sync'eM ALL - File/ Screenshot sync application with SFTP support, and web dashboard. |
| homepage | |
| repository | https://github.com/verknowsys/Small |
| max_upload_size | |
| id | 1897121 |
| size | 98,846 |
NOTE: This is a Rust port of the original Elixir application.
Small is a file synchronization application that watches for file changes and automatically uploads them via SFTP to a remote server. It features:
.ssh/id_ed25519 by default, optionally with password, but held in the config.toml plaintext)Small requires a SSH accessible backend where files will be stored and hosted from. For this I use Nginx configuration like this:
server {
listen 80;
server_name s.verknowsys.com;
location / {
return 302 https://s.verknowsys.com/$request_uri;
}
autoindex off;
index index.html;
}
server {
listen 443 ssl;
http2 on;
ssl_certificate_key /Services/Certsd/certs/wild_verknowsys.com/domain.key;
ssl_certificate /Services/Certsd/certs/wild_verknowsys.com/chained.pem;
server_name s.verknowsys.com;
root /Web/Sshots/;
ssl_protocols TLSv1.3 TLSv1.2;
ssl_session_timeout 1d;
ssl_session_cache shared:SSL:10m;
ssl_session_tickets off;
# enable HSTS for A+ grade:
add_header Strict-Transport-Security "max-age=63072000" always;
add_header X-Frame-Options DENY;
add_header X-Content-Type-Options nosniff;
add_header X-XSS-Protection "1; mode=block";
autoindex off;
}
Small uses a TOML configuration file located at:
~/Library/Small/config.toml~/.small/config.tomlExample configuration:
# Small Configuration
open_history_on_start = false
[[configs]]
default = false
active_at = "00:00:00-8:59:59"
username = "otheruser"
hostname = "my.ssh.host.com"
ssh_port = 50022
ssh_key = ".ssh/id_ed25519"
ssh_key_pass = ""
address = "https://your.site.com/"
remote_path = "/Web/Sshots"
watch_path = "/Users/your-user/Desktop"
[[configs]]
default = true
active_at = "9:00:00-17:00:00"
username = "anuser"
hostname = "some.web.address.com"
ssh_port = 22
ssh_key = ".ssh/id_ed25519"
ssh_key_pass = ""
address = "https://some.web.endpoint.com/"
remote_path = "/Destination/Web/Dir"
watch_path = "/Users/your-user/Pictures/Screenshots"
[[configs]]
default = false
active_at = "17:00:01-23:59:59"
username = "otheruser"
hostname = "my.ssh.host.com"
ssh_port = 50022
ssh_key = ".ssh/id_ed25519"
ssh_key_pass = ""
address = "https://your.site.com/"
remote_path = "/Web/Sshots"
watch_path = "/Users/your-user/Desktop"
# Notification settings
[notifications]
start = true
clipboard = true
upload = true
error = true
# Sound settings
[sounds]
start = false
start_sound = "Glass"
clipboard = false
clipboard_sound = "Tink"
upload = true
upload_sound = "Hero"
error = true
error_sound = "Sosumi"
NOTE: The time ranges are compared naively, so for example "17:00:01-8:59:59" will not work as expected. Additional config part with the time range since "0:00:00" is required as in the example above.
# Build release version
cargo build --release
# The binary will be at: target/release/small
bin/install
Create your config.toml file as shown above.
cargo run --release
The application will:
# Run in development mode
ENV=dev LOG=debug cargo run
# Run tests
cargo test
notify crate instead of fs Erlang librarywarp instead of Cowboysrc/
├── config.rs # Configuration management
├── database.rs # SQLite database operations
├── main.rs # Application entry point
├── lib.rs # Common library module
├── notification.rs # macOS notifications and clipboard
├── sftp.rs # SFTP upload manager
├── utils.rs # Utility functions
├── tests.rs # Test functions
├── watcher.rs # File system watching
└── webapi.rs # Web history server
To run Small automatically on login, you can create a LaunchAgent plist file or use any service manager.
Example using a simple shell script in your shell profile:
bin/install
MIT
Daniel (@dmilith) Dettlaff