sweatstack-cli 0.7.0__py3-none-any.whl → 0.7.2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- sweatstack_cli/__init__.py +1 -1
- sweatstack_cli/commands/app.py +3 -3
- {sweatstack_cli-0.7.0.dist-info → sweatstack_cli-0.7.2.dist-info}/METADATA +32 -75
- {sweatstack_cli-0.7.0.dist-info → sweatstack_cli-0.7.2.dist-info}/RECORD +6 -6
- {sweatstack_cli-0.7.0.dist-info → sweatstack_cli-0.7.2.dist-info}/WHEEL +0 -0
- {sweatstack_cli-0.7.0.dist-info → sweatstack_cli-0.7.2.dist-info}/entry_points.txt +0 -0
sweatstack_cli/__init__.py
CHANGED
sweatstack_cli/commands/app.py
CHANGED
|
@@ -89,7 +89,7 @@ def create(
|
|
|
89
89
|
# Write sweatstack.toml
|
|
90
90
|
config_path = write_config(
|
|
91
91
|
app_name=result["name"],
|
|
92
|
-
client_id=result["
|
|
92
|
+
client_id=result["id"],
|
|
93
93
|
page_slug=page,
|
|
94
94
|
)
|
|
95
95
|
|
|
@@ -107,7 +107,7 @@ def _write_env_file(path: Path, result: dict[str, str]) -> None:
|
|
|
107
107
|
if path.exists():
|
|
108
108
|
existing_content = path.read_text()
|
|
109
109
|
|
|
110
|
-
client_id = result.get("
|
|
110
|
+
client_id = result.get("id")
|
|
111
111
|
client_secret = result.get("client_secret")
|
|
112
112
|
|
|
113
113
|
if client_id:
|
|
@@ -138,7 +138,7 @@ def _print_app_created(result: dict[str, str], env_path: Path | None, config_pat
|
|
|
138
138
|
"""Pretty-print the created application details."""
|
|
139
139
|
console.print(f"[green]✓[/green] Created application [bold]{result['name']}[/bold]")
|
|
140
140
|
console.print()
|
|
141
|
-
console.print(f" Client ID: [cyan]{result['
|
|
141
|
+
console.print(f" Client ID: [cyan]{result['id']}[/cyan]")
|
|
142
142
|
|
|
143
143
|
if "client_secret" in result:
|
|
144
144
|
console.print(f" Secret: [cyan]{result['client_secret']}[/cyan]")
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: sweatstack-cli
|
|
3
|
-
Version: 0.7.
|
|
3
|
+
Version: 0.7.2
|
|
4
4
|
Summary: Command-line interface for SweatStack — the sports data platform for developers
|
|
5
5
|
Project-URL: Homepage, https://sweatstack.no
|
|
6
6
|
Project-URL: Documentation, https://docs.sweatstack.no
|
|
@@ -34,11 +34,32 @@ Command-line interface for [SweatStack](https://sweatstack.no) — the sports da
|
|
|
34
34
|
|
|
35
35
|
## Installation
|
|
36
36
|
|
|
37
|
+
Requires Python 3.11+. We recommend [uv](https://docs.astral.sh/uv/) for installation.
|
|
38
|
+
|
|
37
39
|
```bash
|
|
40
|
+
# Run directly without installing
|
|
41
|
+
uvx sweatstack-cli
|
|
42
|
+
|
|
43
|
+
# Or install as a tool
|
|
44
|
+
uv tool install sweatstack-cli
|
|
45
|
+
|
|
46
|
+
# Or with pip
|
|
38
47
|
pip install sweatstack-cli
|
|
39
48
|
```
|
|
40
49
|
|
|
41
|
-
|
|
50
|
+
To upgrade:
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
uv tool upgrade sweatstack-cli
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
To reinstall (e.g. after a broken install or Python version change):
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
uvx --reinstall sweatstack-cli
|
|
60
|
+
# or if installed as a tool
|
|
61
|
+
uv tool install --reinstall sweatstack-cli
|
|
62
|
+
```
|
|
42
63
|
|
|
43
64
|
## Quick Start
|
|
44
65
|
|
|
@@ -46,17 +67,9 @@ Requires Python 3.11+.
|
|
|
46
67
|
# Authenticate with SweatStack
|
|
47
68
|
sweatstack login
|
|
48
69
|
|
|
49
|
-
#
|
|
50
|
-
sweatstack status
|
|
51
|
-
|
|
52
|
-
# Deploy a static site
|
|
53
|
-
sweatstack page deploy my-page ./dist
|
|
54
|
-
|
|
55
|
-
# Create an OAuth2 application
|
|
70
|
+
# Create an app and deploy
|
|
56
71
|
sweatstack app create "My App" --page my-page --env
|
|
57
|
-
|
|
58
|
-
# Logout
|
|
59
|
-
sweatstack logout
|
|
72
|
+
sweatstack page deploy
|
|
60
73
|
```
|
|
61
74
|
|
|
62
75
|
## Commands
|
|
@@ -71,29 +84,8 @@ sweatstack logout
|
|
|
71
84
|
| `sweatstack status` | Show auth status, user info, and version |
|
|
72
85
|
| `sweatstack --version` | Show version and check for updates |
|
|
73
86
|
|
|
74
|
-
### Page Deployment
|
|
75
|
-
|
|
76
|
-
Deploy static sites to SweatStack Pages.
|
|
77
|
-
|
|
78
|
-
| Command | Description |
|
|
79
|
-
|---------|-------------|
|
|
80
|
-
| `sweatstack page deploy [SLUG] [DIRECTORY]` | Deploy a static site |
|
|
81
|
-
|
|
82
|
-
- **SLUG** — Page identifier. Falls back to `sweatstack.toml` if omitted.
|
|
83
|
-
- **DIRECTORY** — Directory to deploy. Falls back to `sweatstack.toml`, then current directory.
|
|
84
|
-
|
|
85
|
-
```bash
|
|
86
|
-
# Deploy using CLI arguments
|
|
87
|
-
sweatstack page deploy my-page ./dist
|
|
88
|
-
|
|
89
|
-
# Deploy using sweatstack.toml defaults
|
|
90
|
-
sweatstack page deploy
|
|
91
|
-
```
|
|
92
|
-
|
|
93
87
|
### Application Management
|
|
94
88
|
|
|
95
|
-
Manage OAuth2 applications.
|
|
96
|
-
|
|
97
89
|
| Command | Description |
|
|
98
90
|
|---------|-------------|
|
|
99
91
|
| `sweatstack app create NAME` | Create a new private OAuth2 application |
|
|
@@ -116,9 +108,9 @@ Manage OAuth2 applications.
|
|
|
116
108
|
|--------|-------------|
|
|
117
109
|
| `--force, -f` | Overwrite existing `sweatstack.toml` |
|
|
118
110
|
|
|
119
|
-
|
|
111
|
+
### Project Configuration
|
|
120
112
|
|
|
121
|
-
|
|
113
|
+
Both `app create` and `app link` generate a `sweatstack.toml` in the current directory. Other commands read defaults from this file.
|
|
122
114
|
|
|
123
115
|
```toml
|
|
124
116
|
[app]
|
|
@@ -130,53 +122,18 @@ slug = "my-page"
|
|
|
130
122
|
directory = "dist"
|
|
131
123
|
```
|
|
132
124
|
|
|
133
|
-
|
|
125
|
+
### Page Deployment
|
|
134
126
|
|
|
135
|
-
|
|
127
|
+
Deploy static sites to SweatStack Pages.
|
|
136
128
|
|
|
137
129
|
```bash
|
|
138
|
-
|
|
139
|
-
|
|
130
|
+
# Deploy using sweatstack.toml defaults (recommended)
|
|
131
|
+
sweatstack page deploy
|
|
140
132
|
|
|
133
|
+
# Or specify slug and directory directly
|
|
141
134
|
sweatstack page deploy my-page ./dist
|
|
142
135
|
```
|
|
143
136
|
|
|
144
|
-
## Environment Variables
|
|
145
|
-
|
|
146
|
-
| Variable | Description | Default |
|
|
147
|
-
|----------|-------------|---------|
|
|
148
|
-
| `SWEATSTACK_URL` | API base URL | `https://app.sweatstack.no` |
|
|
149
|
-
| `SWEATSTACK_API_KEY` | Access token (for CI/CD) | — |
|
|
150
|
-
| `SWEATSTACK_REFRESH_TOKEN` | Refresh token (for CI/CD) | — |
|
|
151
|
-
|
|
152
|
-
## Token Storage
|
|
153
|
-
|
|
154
|
-
Credentials are stored in your OS user data directory:
|
|
155
|
-
|
|
156
|
-
- **macOS**: `~/Library/Application Support/SweatStack/SweatStack/tokens.json`
|
|
157
|
-
- **Linux**: `~/.local/share/SweatStack/SweatStack/tokens.json`
|
|
158
|
-
- **Windows**: `%APPDATA%\SweatStack\SweatStack\tokens.json`
|
|
159
|
-
|
|
160
|
-
Token files are created with `0600` permissions (owner read/write only). This location is shared with the [sweatstack Python library](https://github.com/sweatstack/sweatstack-python), so authenticating with either tool works for both.
|
|
161
|
-
|
|
162
|
-
## Development
|
|
163
|
-
|
|
164
|
-
See [DEVELOPMENT.md](DEVELOPMENT.md) for development setup and contribution guidelines.
|
|
165
|
-
|
|
166
|
-
```bash
|
|
167
|
-
# Install with dev dependencies
|
|
168
|
-
uv pip install -e ".[dev]"
|
|
169
|
-
|
|
170
|
-
# Run tests
|
|
171
|
-
pytest
|
|
172
|
-
|
|
173
|
-
# Lint and format
|
|
174
|
-
ruff check . && ruff format .
|
|
175
|
-
|
|
176
|
-
# Type check
|
|
177
|
-
mypy src/sweatstack_cli
|
|
178
|
-
```
|
|
179
|
-
|
|
180
137
|
## License
|
|
181
138
|
|
|
182
139
|
MIT
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
sweatstack_cli/__init__.py,sha256=
|
|
1
|
+
sweatstack_cli/__init__.py,sha256=ZNIAY7QNAqi01JDEnHZN9bJyiM_TICftFpoY4fNRsZ8,100
|
|
2
2
|
sweatstack_cli/config.py,sha256=cD4OXnVAKVagYazyk9Cw-WWx62tJPqcjQt1cknYyymM,706
|
|
3
3
|
sweatstack_cli/console.py,sha256=69KWAM7ksnYRTONMYTXGXN4LWRAQhRxcLXO0LcWGLqo,300
|
|
4
4
|
sweatstack_cli/exceptions.py,sha256=qEUu8GydXGRKR4ndAdZ2wnkHekmFpBXDJiT5bXdl7Yk,613
|
|
@@ -14,10 +14,10 @@ sweatstack_cli/auth/jwt.py,sha256=Ja6ccFyRKtX5MPjFdHNavVYf8KTz0MYT86StbnF-cwg,15
|
|
|
14
14
|
sweatstack_cli/auth/pkce.py,sha256=sO_xUeN1UIvXKX0yEIGgMTIIzvfCOCUwlyNAveEd16k,1542
|
|
15
15
|
sweatstack_cli/auth/tokens.py,sha256=kc8ytoO9PAyjLD6wUTIagVuP7_ia5ZjW5m_WjXIRIkA,4942
|
|
16
16
|
sweatstack_cli/commands/__init__.py,sha256=YCO8wYVvdGeoEI0p_oUm8ANLneuET4SHsKDjitMjAgY,35
|
|
17
|
-
sweatstack_cli/commands/app.py,sha256=
|
|
17
|
+
sweatstack_cli/commands/app.py,sha256=pk6QBUF0yQcrLJYR47TniMVhl-5FNeQopQeV3BTop0k,6924
|
|
18
18
|
sweatstack_cli/commands/auth.py,sha256=lmlN2RcZIHdbZG-EEUVFwOSn6vPN-Ijgh_5E-cFQVtU,3478
|
|
19
19
|
sweatstack_cli/commands/page.py,sha256=tEWjzOmht_IKm47lbprJz-XDKibrx5nFlStuvBRST6A,5329
|
|
20
|
-
sweatstack_cli-0.7.
|
|
21
|
-
sweatstack_cli-0.7.
|
|
22
|
-
sweatstack_cli-0.7.
|
|
23
|
-
sweatstack_cli-0.7.
|
|
20
|
+
sweatstack_cli-0.7.2.dist-info/METADATA,sha256=WI1UvMTUMV02t4lSThgQR6uh5WpY2tm21oRBhndx6nQ,3664
|
|
21
|
+
sweatstack_cli-0.7.2.dist-info/WHEEL,sha256=QccIxa26bgl1E6uMy58deGWi-0aeIkkangHcxk2kWfw,87
|
|
22
|
+
sweatstack_cli-0.7.2.dist-info/entry_points.txt,sha256=rnH0EV1U9CQlmKQcJ7RmxGpNRTa9J-YdiIJZDYrAXb4,56
|
|
23
|
+
sweatstack_cli-0.7.2.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|