Metadata-Version: 2.4
Name: shopcloud_secrethub
Version: 2.19.0
Summary: CLI tool for the Shopcloud SecretHub
Author-email: Konstantin Stoldt <konstantin.stoldt@talk-point.de>
License: MIT
Project-URL: Homepage, https://github.com/Talk-Point/shopcloud-secrethub-cli
Keywords: CLI
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE.txt
Requires-Dist: requests>=2.28
Dynamic: license-file

# Shopcloud SecretHub CLI

The SecretHub CLI provides the command-line interface to interact with the SecretHub API.

## install

```sh
pip install shopcloud_secrethub
```

Or with uv:

```sh
uv add shopcloud_secrethub
```

### Usage


__Reading and writing secrets:__

```sh
$ secrethub auth
$ secrethub read <secret-name>
$ secrethub write <secret-name> <value>
```


__Provisioning your applications with secrets:__

Provision a template file

```sh
$ secrethub inject -i app.temp.yaml -o app.yaml

# app.temp.yaml
env_variables:
  ENV: {{ talk-point/test-repo/env }}
  SECRET_KEY: {{ talk-point/test-repo/secret_key }}

```

Provision to the environment

```sh
$ eval `secrethub printenv -i app.temp.yaml`

# app.temp.yaml
env_variables:
  ENV: {{ talk-point/test-repo/env }}
  SECRET_KEY: {{ talk-point/test-repo/secret_key }}

```

__in Code:__

```py
from shopcloud_secrethub import SecretHub
hub = SecretHub(user_app="test-script", api_token='<TOKEN>')
hub.read('talk-point/test-repo/secret_key')
```

### Contributing

Install uv if you don't have it:

```sh
curl -LsSf https://astral.sh/uv/install.sh | sh
```

Set up the project:

```sh
uv sync
```

Run tests:

```sh
uv run pytest
```

### Deploy to PyPI

Deployment is handled automatically by CI when pushing to `master`. To build and publish manually:

```sh
uv build
uv publish
```
