Metadata-Version: 2.4
Name: cosctl
Version: 0.1.4
Summary: A simple command line tool for managing Tencent Cloud COS (Cloud Object Storage).
Author-email: lazy <644220198@qq.com>
License-Expression: MIT
Project-URL: Homepage, https://github.com/hiyongliz/cosctl
Project-URL: Source, https://github.com/hiyongliz/cosctl
Project-URL: Issues, https://github.com/hiyongliz/cosctl/issues
Keywords: tencent,cos,cli,cloud-storage,qcloud
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Internet
Classifier: Topic :: Utilities
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: cos-python-sdk-v5>=1.9.37
Requires-Dist: typer>=0.10.0
Provides-Extra: dev
Requires-Dist: build>=1.2.2; extra == "dev"
Requires-Dist: pytest>=9.0.0; extra == "dev"
Requires-Dist: twine>=6.0.0; extra == "dev"
Dynamic: license-file

# COS Cli

A simple command line tool for managing Tencent Cloud COS (Cloud Object Storage).

## Install

Requires Python 3.10 or newer.

```bash
pip install cosctl
```

For development dependencies:

```bash
pip install -e .[dev]
```

## Environment variables

```bash
export SECRET_ID=""
export SECRET_KEY=""
export BUCKET=""
export REGION="wuxi"
export DOMAIN=""
```

Required:
- `SECRET_ID`
- `SECRET_KEY`
- `BUCKET` (falls back to the first label of `DOMAIN` when not set, e.g. `my-bucket.cos.ap-beijing.myqcloud.com` yields `my-bucket`)

Optional:
- `REGION` (defaults to `wuxi`)
- `DOMAIN`

## Usage

```bash
cosctl --help
cosctl --version
cosctl list
cosctl list logs/
cosctl upload ./local-file.txt remote-file.txt
cosctl upload ./local-file.txt remote-file.txt --tag env=prod --tag owner=team
cosctl get remote-file.txt ./downloaded.txt
cosctl delete remote-file.txt
```

## Build

构建时会自动在基础版本后追加动态后缀：`时间戳 + git 短哈希`。
例如：`0.1.1+20260402.123045.abc1234`

```bash
make sync
make build
```

## Test

```bash
pytest
```
