Command-line tool to fetch, push or sync local filesystem against Supernote Cloud
Find a file
2026-04-11 01:58:27 +08:00
docs feat: login.py can replace env variable + sanity check for sync dir 2026-04-11 01:58:27 +08:00
tests feat: login.py can replace env variable + sanity check for sync dir 2026-04-11 01:58:27 +08:00
.env.example add comment vim ft=env in .env.example 2026-01-03 14:47:15 +08:00
.gitignore sync with comprehensive state management 2025-12-17 23:40:05 +08:00
.pre-commit-config.yaml initial commit 2025-12-17 19:45:21 +08:00
api.py feat: login.py can replace env variable + sanity check for sync dir 2026-04-11 01:58:27 +08:00
cli.py feat: further refactoring of cli.py + split up docs 2026-04-10 23:51:50 +08:00
cli_commands.py feat: login.py can replace env variable + sanity check for sync dir 2026-04-11 01:58:27 +08:00
cli_common.py feat: further refactoring of cli.py + split up docs 2026-04-10 23:51:50 +08:00
cli_deps.py feat: further refactoring of cli.py + split up docs 2026-04-10 23:51:50 +08:00
cli_parser.py feat: login.py can replace env variable + sanity check for sync dir 2026-04-11 01:58:27 +08:00
cloud_client.py feat: increase modularity and add test cases 2026-04-10 23:12:43 +08:00
cloud_config.py feat: increase modularity and add test cases 2026-04-10 23:12:43 +08:00
cloud_remote.py feat: increase modularity and add test cases 2026-04-10 23:12:43 +08:00
cloud_transfer.py feat: increase modularity and add test cases 2026-04-10 23:12:43 +08:00
LICENSE initial commit 2025-12-17 19:45:21 +08:00
login.py feat: login.py can replace env variable + sanity check for sync dir 2026-04-11 01:58:27 +08:00
pyproject.toml feat: login.py can replace env variable + sanity check for sync dir 2026-04-11 01:58:27 +08:00
README.md feat: login.py can replace env variable + sanity check for sync dir 2026-04-11 01:58:27 +08:00
supersync.py feat: login.py can replace env variable + sanity check for sync dir 2026-04-11 01:58:27 +08:00
sync_display.py feat: less noisy and prettier terminal output 2026-04-10 21:46:58 +08:00
sync_root_check.py feat: login.py can replace env variable + sanity check for sync dir 2026-04-11 01:58:27 +08:00
sync_state.py feat: increase modularity and add test cases 2026-04-10 23:12:43 +08:00
token_env_file.py feat: login.py can replace env variable + sanity check for sync dir 2026-04-11 01:58:27 +08:00
tree_terminal.py feat: less noisy and prettier terminal output 2026-04-10 21:46:58 +08:00
uv.lock basic upload/download/sync with test suite 2025-12-17 22:10:43 +08:00

SuperSync

Python tooling for the Supernote Cloud API: login, upload, download, listing, deletion, one-way and two-way sync (with SQLite state, conflict copies, local trash, and sync history).

Features

  • JWT login helper (login.py) and shared API session (api, cloud_* modules)
  • One-way cloud → local (sync_down, download CLI) and local → cloud (upload CLI / upload_file)
  • Two-way sync with MD5/mtime checks, conflict filenames, deletion handling, and lock file
  • CLI: list, delete, history, status, trash
  • Compact terminal tree output (tree_terminal, sync_display)

Full behavior and options live in the docs/ folder so this file stays short.

Requirements

  • Python 3.10+
  • Recommended: uv or pip

Install

git clone <this-repo>
cd supersync
uv venv && source .venv/bin/activate   # or: python -m venv .venv
uv pip install -e .
# or: pip install -e .
cp .env.example .env   # then edit: API base, token after login, sync dir

Quick start

python login.py                    # validates or obtains token; writes SUPERNOTE_TOKEN to .env (or SUPERNOTE_TOKEN_ENV_FILE)
python supersync.py                # smoke test: user info, capacity, root listing
supersync --help                   # CLI
supersync sync --directory ~/Sync  # two-way sync (see docs for scoped paths)

Documentation

Topic Link
Doc index docs/README.md
Environment variables docs/configuration.md
CLI commands docs/cli.md
Sync & state DB docs/sync.md
Python API docs/python-api.md
Development & tests docs/development.md
Troubleshooting docs/troubleshooting.md

License

MIT — see LICENSE.

Contributing

Issues and PRs welcome; please run ruff and pytest before submitting.

Acknowledgments

Inspired by sncloud for API discovery. Supernote Cloud API usage is unofficial / reverse-engineered.