Terminal client for OnlySq Cloud 2.0 (https://cloud.onlysq.ru). Talks to the public v2 REST API — no Telegram, no Postgres on your machine, just httpx + typer + rich.
From PyPI:
pip install cloud-tcStraight from git (latest main):
pip install git+https://github.com/xOnlySq/cloud-tc.gitOr for a local checkout (with -e for editable):
git clone https://github.com/xOnlySq/cloud-tc.git
cd cloud-tc
pip install -e .Both tc and cloud-tc console scripts are installed.
-
Create an API token in the web UI:
https://cloud.onlysq.ru/v2/ui/settings→ "new token". -
Log in locally:
tc login --token tck_xxxxxxxxxxxxxxxxxxxx
The token is stored in
~/.cloud-tc/config.json(0600). -
Use it:
tc me tc quota tc ls tc upload ./photo.jpg tc share <uid> --role viewer
| Command | Description |
|---|---|
tc login --token tck_… |
Save and verify an API token |
tc logout |
Remove local config |
tc info |
Show local config |
tc version |
Print package version |
tc me |
Show current user profile |
tc quota |
Show used / total quota |
tc ls [FOLDER_ID] |
List files |
tc upload PATH [-f FOLDER] |
Upload a local file |
tc download UID [-o PATH] |
Download a file |
tc rm UID |
Move to trash |
tc restore UID |
Restore from trash |
tc mv UID FOLDER_ID |
Move file to another folder |
tc rename UID NEW_NAME |
Rename |
tc mkdir NAME [-p PARENT_ID] |
Create folder |
tc share UID [-r ROLE] [--password] [--expires] [--max-uses] |
Create a share link |
tc tokens list / create NAME / revoke ID |
Manage API tokens |
tc migrate-self LEGACY_TOKEN |
Move a legacy account to v2 (no auth required) |
You can override the server with environment variables (useful for self-hosted instances):
export TC_BASE_URL="https://cloud.example.com"
export TC_TOKEN="tck_..."
tc lsTC_TOKEN overrides the saved token if set. TC_BASE_URL overrides the configured base URL.
Config file: ~/.cloud-tc/config.json — just { "token": "...", "base_url": "..." }.
Upload everything from a directory into a folder:
for f in *.jpg; do tc upload "$f" -f 42; donePipe a file through tc upload (Linux):
tc upload /dev/stdin <<< "hello" # named pipe trick, see issues for binaryQuick public link for a file:
UID=$(tc upload ./report.pdf | awk '{print $2}')
tc share "$UID" --role viewerBatch-migrate one legacy token from any script:
tc migrate-self USERS_LEGACY_TOKENMIT. See LICENSE.
- Cloud UI: https://cloud.onlysq.ru
- REST API docs: https://cloud.onlysq.ru/docs (see "Cloud 2.0" group)
- Service / issues: https://github.com/xOnlySq/cloud-tc/issues