Terminal client for OnlySq Cloud 2.0 — talks to https://cloud.onlysq.ru via REST
Project description
cloud-tc
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.
Install
From PyPI (when published):
pip install cloud-tc
Straight from git:
pip install git+https://github.com/xOnlySq/cloud-tc.git
Or 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.
Quick start
-
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
Commands
| 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) |
Configuration
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 ls
TC_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": "..." }.
Examples
Upload everything from a directory into a folder:
for f in *.jpg; do tc upload "$f" -f 42; done
Pipe a file through tc upload (Linux):
tc upload /dev/stdin <<< "hello" # named pipe trick, see issues for binary
Quick public link for a file:
UID=$(tc upload ./report.pdf | awk '{print $2}')
tc share "$UID" --role viewer
Batch-migrate one legacy token from any script:
tc migrate-self USERS_LEGACY_TOKEN
License
MIT. See LICENSE.
Related
- 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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file cloud_tc-0.1.0.tar.gz.
File metadata
- Download URL: cloud_tc-0.1.0.tar.gz
- Upload date:
- Size: 8.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5b29a030911848c445913bfa978b85f217b48b728c9eb9e3f576ebfb20ef1bd3
|
|
| MD5 |
d92f56689d4b63cf15dba0cd70d90858
|
|
| BLAKE2b-256 |
a35a47c0af957243db2376c7f15876310224d3055b12a045483111c628cff070
|
Provenance
The following attestation bundles were made for cloud_tc-0.1.0.tar.gz:
Publisher:
publish.yml on xOnlySq/cloud-tc
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cloud_tc-0.1.0.tar.gz -
Subject digest:
5b29a030911848c445913bfa978b85f217b48b728c9eb9e3f576ebfb20ef1bd3 - Sigstore transparency entry: 1740014158
- Sigstore integration time:
-
Permalink:
xOnlySq/cloud-tc@1e5cd3c5830037ac4370c731eca3134b17fac81d -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/xOnlySq
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@1e5cd3c5830037ac4370c731eca3134b17fac81d -
Trigger Event:
push
-
Statement type:
File details
Details for the file cloud_tc-0.1.0-py3-none-any.whl.
File metadata
- Download URL: cloud_tc-0.1.0-py3-none-any.whl
- Upload date:
- Size: 8.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
07ffda874f26aacb62ec89727124c238c931d5bfafd7aebd21030272050d5e46
|
|
| MD5 |
71e4c32dea1553512a70c7b42bf9cfd6
|
|
| BLAKE2b-256 |
681b35a4c6284896f2c3e9b8e5a5eaa1de176bb09b2b2a517b9e243abd3b97fa
|
Provenance
The following attestation bundles were made for cloud_tc-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on xOnlySq/cloud-tc
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cloud_tc-0.1.0-py3-none-any.whl -
Subject digest:
07ffda874f26aacb62ec89727124c238c931d5bfafd7aebd21030272050d5e46 - Sigstore transparency entry: 1740014162
- Sigstore integration time:
-
Permalink:
xOnlySq/cloud-tc@1e5cd3c5830037ac4370c731eca3134b17fac81d -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/xOnlySq
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@1e5cd3c5830037ac4370c731eca3134b17fac81d -
Trigger Event:
push
-
Statement type: