sweatstack-cli 0.7.0__tar.gz → 0.7.1__tar.gz

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.
Files changed (52) hide show
  1. {sweatstack_cli-0.7.0 → sweatstack_cli-0.7.1}/PKG-INFO +32 -75
  2. sweatstack_cli-0.7.1/README.md +109 -0
  3. {sweatstack_cli-0.7.0 → sweatstack_cli-0.7.1}/pyproject.toml +1 -1
  4. {sweatstack_cli-0.7.0 → sweatstack_cli-0.7.1}/src/sweatstack_cli/__init__.py +1 -1
  5. sweatstack_cli-0.7.0/README.md +0 -152
  6. {sweatstack_cli-0.7.0 → sweatstack_cli-0.7.1}/.claude/settings.local.json +0 -0
  7. {sweatstack_cli-0.7.0 → sweatstack_cli-0.7.1}/.claude/skills/sweatstack/SKILL.md +0 -0
  8. {sweatstack_cli-0.7.0 → sweatstack_cli-0.7.1}/.claude/skills/sweatstack/api.md +0 -0
  9. {sweatstack_cli-0.7.0 → sweatstack_cli-0.7.1}/.claude/skills/sweatstack/auth.md +0 -0
  10. {sweatstack_cli-0.7.0 → sweatstack_cli-0.7.1}/.claude/skills/sweatstack/cli.md +0 -0
  11. {sweatstack_cli-0.7.0 → sweatstack_cli-0.7.1}/.claude/skills/sweatstack/pyscript.md +0 -0
  12. {sweatstack_cli-0.7.0 → sweatstack_cli-0.7.1}/.claude/skills/sweatstack/webapp.md +0 -0
  13. {sweatstack_cli-0.7.0 → sweatstack_cli-0.7.1}/.gitignore +0 -0
  14. {sweatstack_cli-0.7.0 → sweatstack_cli-0.7.1}/.python-version +0 -0
  15. {sweatstack_cli-0.7.0 → sweatstack_cli-0.7.1}/CREATE_PRIVATE_APP.md +0 -0
  16. {sweatstack_cli-0.7.0 → sweatstack_cli-0.7.1}/DEVELOPMENT.md +0 -0
  17. {sweatstack_cli-0.7.0 → sweatstack_cli-0.7.1}/Makefile +0 -0
  18. {sweatstack_cli-0.7.0 → sweatstack_cli-0.7.1}/PLAN.md +0 -0
  19. {sweatstack_cli-0.7.0 → sweatstack_cli-0.7.1}/src/sweatstack_cli/api/__init__.py +0 -0
  20. {sweatstack_cli-0.7.0 → sweatstack_cli-0.7.1}/src/sweatstack_cli/api/client.py +0 -0
  21. {sweatstack_cli-0.7.0 → sweatstack_cli-0.7.1}/src/sweatstack_cli/auth/__init__.py +0 -0
  22. {sweatstack_cli-0.7.0 → sweatstack_cli-0.7.1}/src/sweatstack_cli/auth/callback_server.py +0 -0
  23. {sweatstack_cli-0.7.0 → sweatstack_cli-0.7.1}/src/sweatstack_cli/auth/jwt.py +0 -0
  24. {sweatstack_cli-0.7.0 → sweatstack_cli-0.7.1}/src/sweatstack_cli/auth/pkce.py +0 -0
  25. {sweatstack_cli-0.7.0 → sweatstack_cli-0.7.1}/src/sweatstack_cli/auth/tokens.py +0 -0
  26. {sweatstack_cli-0.7.0 → sweatstack_cli-0.7.1}/src/sweatstack_cli/commands/__init__.py +0 -0
  27. {sweatstack_cli-0.7.0 → sweatstack_cli-0.7.1}/src/sweatstack_cli/commands/app.py +0 -0
  28. {sweatstack_cli-0.7.0 → sweatstack_cli-0.7.1}/src/sweatstack_cli/commands/auth.py +0 -0
  29. {sweatstack_cli-0.7.0 → sweatstack_cli-0.7.1}/src/sweatstack_cli/commands/page.py +0 -0
  30. {sweatstack_cli-0.7.0 → sweatstack_cli-0.7.1}/src/sweatstack_cli/config.py +0 -0
  31. {sweatstack_cli-0.7.0 → sweatstack_cli-0.7.1}/src/sweatstack_cli/console.py +0 -0
  32. {sweatstack_cli-0.7.0 → sweatstack_cli-0.7.1}/src/sweatstack_cli/exceptions.py +0 -0
  33. {sweatstack_cli-0.7.0 → sweatstack_cli-0.7.1}/src/sweatstack_cli/main.py +0 -0
  34. {sweatstack_cli-0.7.0 → sweatstack_cli-0.7.1}/src/sweatstack_cli/project.py +0 -0
  35. {sweatstack_cli-0.7.0 → sweatstack_cli-0.7.1}/src/sweatstack_cli/py.typed +0 -0
  36. {sweatstack_cli-0.7.0 → sweatstack_cli-0.7.1}/src/sweatstack_cli/version_check.py +0 -0
  37. {sweatstack_cli-0.7.0 → sweatstack_cli-0.7.1}/sweatstack.toml +0 -0
  38. {sweatstack_cli-0.7.0 → sweatstack_cli-0.7.1}/tests/__init__.py +0 -0
  39. {sweatstack_cli-0.7.0 → sweatstack_cli-0.7.1}/tests/conftest.py +0 -0
  40. {sweatstack_cli-0.7.0 → sweatstack_cli-0.7.1}/tests/test_api/__init__.py +0 -0
  41. {sweatstack_cli-0.7.0 → sweatstack_cli-0.7.1}/tests/test_api/test_client.py +0 -0
  42. {sweatstack_cli-0.7.0 → sweatstack_cli-0.7.1}/tests/test_auth/__init__.py +0 -0
  43. {sweatstack_cli-0.7.0 → sweatstack_cli-0.7.1}/tests/test_auth/test_callback_server.py +0 -0
  44. {sweatstack_cli-0.7.0 → sweatstack_cli-0.7.1}/tests/test_auth/test_jwt.py +0 -0
  45. {sweatstack_cli-0.7.0 → sweatstack_cli-0.7.1}/tests/test_auth/test_pkce.py +0 -0
  46. {sweatstack_cli-0.7.0 → sweatstack_cli-0.7.1}/tests/test_auth/test_tokens.py +0 -0
  47. {sweatstack_cli-0.7.0 → sweatstack_cli-0.7.1}/tests/test_commands/__init__.py +0 -0
  48. {sweatstack_cli-0.7.0 → sweatstack_cli-0.7.1}/tests/test_commands/test_app.py +0 -0
  49. {sweatstack_cli-0.7.0 → sweatstack_cli-0.7.1}/tests/test_commands/test_cli.py +0 -0
  50. {sweatstack_cli-0.7.0 → sweatstack_cli-0.7.1}/tests/test_project.py +0 -0
  51. {sweatstack_cli-0.7.0 → sweatstack_cli-0.7.1}/tests/test_version_check.py +0 -0
  52. {sweatstack_cli-0.7.0 → sweatstack_cli-0.7.1}/uv.lock +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: sweatstack-cli
3
- Version: 0.7.0
3
+ Version: 0.7.1
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
- Requires Python 3.11+.
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
- # Check authentication and version status
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
- ## Project Configuration
111
+ ### Project Configuration
120
112
 
121
- Commands read defaults from a `sweatstack.toml` in the current directory. This file is created automatically by `app create` and `app link`.
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
- ## CI/CD Usage
125
+ ### Page Deployment
134
126
 
135
- For automated environments, set environment variables instead of interactive login:
127
+ Deploy static sites to SweatStack Pages.
136
128
 
137
129
  ```bash
138
- export SWEATSTACK_API_KEY="your-access-token"
139
- export SWEATSTACK_REFRESH_TOKEN="your-refresh-token"
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
@@ -0,0 +1,109 @@
1
+ # SweatStack CLI
2
+
3
+ Command-line interface for [SweatStack](https://sweatstack.no) — the sports data platform for developers.
4
+
5
+ ## Installation
6
+
7
+ Requires Python 3.11+. We recommend [uv](https://docs.astral.sh/uv/) for installation.
8
+
9
+ ```bash
10
+ # Run directly without installing
11
+ uvx sweatstack-cli
12
+
13
+ # Or install as a tool
14
+ uv tool install sweatstack-cli
15
+
16
+ # Or with pip
17
+ pip install sweatstack-cli
18
+ ```
19
+
20
+ To upgrade:
21
+
22
+ ```bash
23
+ uv tool upgrade sweatstack-cli
24
+ ```
25
+
26
+ To reinstall (e.g. after a broken install or Python version change):
27
+
28
+ ```bash
29
+ uvx --reinstall sweatstack-cli
30
+ # or if installed as a tool
31
+ uv tool install --reinstall sweatstack-cli
32
+ ```
33
+
34
+ ## Quick Start
35
+
36
+ ```bash
37
+ # Authenticate with SweatStack
38
+ sweatstack login
39
+
40
+ # Create an app and deploy
41
+ sweatstack app create "My App" --page my-page --env
42
+ sweatstack page deploy
43
+ ```
44
+
45
+ ## Commands
46
+
47
+ ### Authentication
48
+
49
+ | Command | Description |
50
+ |---------|-------------|
51
+ | `sweatstack login` | Authenticate via browser (OAuth2 PKCE) |
52
+ | `sweatstack login --force` | Force re-authentication |
53
+ | `sweatstack logout` | Remove stored credentials |
54
+ | `sweatstack status` | Show auth status, user info, and version |
55
+ | `sweatstack --version` | Show version and check for updates |
56
+
57
+ ### Application Management
58
+
59
+ | Command | Description |
60
+ |---------|-------------|
61
+ | `sweatstack app create NAME` | Create a new private OAuth2 application |
62
+ | `sweatstack app link` | Link current directory to an existing application |
63
+
64
+ #### `app create` options
65
+
66
+ | Option | Description |
67
+ |--------|-------------|
68
+ | `--description, -d TEXT` | Application description (max 500 chars) |
69
+ | `--page, -p SLUG` | Associate with a SweatStack Page |
70
+ | `--secret, -s` | Generate a client secret |
71
+ | `--env` | Write credentials to `.env` |
72
+ | `--env-file PATH` | Write credentials to a specific file |
73
+ | `--json` | Output as JSON |
74
+
75
+ #### `app link` options
76
+
77
+ | Option | Description |
78
+ |--------|-------------|
79
+ | `--force, -f` | Overwrite existing `sweatstack.toml` |
80
+
81
+ ### Project Configuration
82
+
83
+ Both `app create` and `app link` generate a `sweatstack.toml` in the current directory. Other commands read defaults from this file.
84
+
85
+ ```toml
86
+ [app]
87
+ name = "My App"
88
+ client_id = "abc123"
89
+
90
+ [page]
91
+ slug = "my-page"
92
+ directory = "dist"
93
+ ```
94
+
95
+ ### Page Deployment
96
+
97
+ Deploy static sites to SweatStack Pages.
98
+
99
+ ```bash
100
+ # Deploy using sweatstack.toml defaults (recommended)
101
+ sweatstack page deploy
102
+
103
+ # Or specify slug and directory directly
104
+ sweatstack page deploy my-page ./dist
105
+ ```
106
+
107
+ ## License
108
+
109
+ MIT
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "sweatstack-cli"
3
- version = "0.7.0"
3
+ version = "0.7.1"
4
4
  description = "Command-line interface for SweatStack — the sports data platform for developers"
5
5
  readme = "README.md"
6
6
  authors = [{ name = "Aart Goossens", email = "aart@sweatstack.no" }]
@@ -1,3 +1,3 @@
1
1
  """SweatStack CLI — Command-line interface for the SweatStack platform."""
2
2
 
3
- __version__ = "0.7.0"
3
+ __version__ = "0.7.1"
@@ -1,152 +0,0 @@
1
- # SweatStack CLI
2
-
3
- Command-line interface for [SweatStack](https://sweatstack.no) — the sports data platform for developers.
4
-
5
- ## Installation
6
-
7
- ```bash
8
- pip install sweatstack-cli
9
- ```
10
-
11
- Requires Python 3.11+.
12
-
13
- ## Quick Start
14
-
15
- ```bash
16
- # Authenticate with SweatStack
17
- sweatstack login
18
-
19
- # Check authentication and version status
20
- sweatstack status
21
-
22
- # Deploy a static site
23
- sweatstack page deploy my-page ./dist
24
-
25
- # Create an OAuth2 application
26
- sweatstack app create "My App" --page my-page --env
27
-
28
- # Logout
29
- sweatstack logout
30
- ```
31
-
32
- ## Commands
33
-
34
- ### Authentication
35
-
36
- | Command | Description |
37
- |---------|-------------|
38
- | `sweatstack login` | Authenticate via browser (OAuth2 PKCE) |
39
- | `sweatstack login --force` | Force re-authentication |
40
- | `sweatstack logout` | Remove stored credentials |
41
- | `sweatstack status` | Show auth status, user info, and version |
42
- | `sweatstack --version` | Show version and check for updates |
43
-
44
- ### Page Deployment
45
-
46
- Deploy static sites to SweatStack Pages.
47
-
48
- | Command | Description |
49
- |---------|-------------|
50
- | `sweatstack page deploy [SLUG] [DIRECTORY]` | Deploy a static site |
51
-
52
- - **SLUG** — Page identifier. Falls back to `sweatstack.toml` if omitted.
53
- - **DIRECTORY** — Directory to deploy. Falls back to `sweatstack.toml`, then current directory.
54
-
55
- ```bash
56
- # Deploy using CLI arguments
57
- sweatstack page deploy my-page ./dist
58
-
59
- # Deploy using sweatstack.toml defaults
60
- sweatstack page deploy
61
- ```
62
-
63
- ### Application Management
64
-
65
- Manage OAuth2 applications.
66
-
67
- | Command | Description |
68
- |---------|-------------|
69
- | `sweatstack app create NAME` | Create a new private OAuth2 application |
70
- | `sweatstack app link` | Link current directory to an existing application |
71
-
72
- #### `app create` options
73
-
74
- | Option | Description |
75
- |--------|-------------|
76
- | `--description, -d TEXT` | Application description (max 500 chars) |
77
- | `--page, -p SLUG` | Associate with a SweatStack Page |
78
- | `--secret, -s` | Generate a client secret |
79
- | `--env` | Write credentials to `.env` |
80
- | `--env-file PATH` | Write credentials to a specific file |
81
- | `--json` | Output as JSON |
82
-
83
- #### `app link` options
84
-
85
- | Option | Description |
86
- |--------|-------------|
87
- | `--force, -f` | Overwrite existing `sweatstack.toml` |
88
-
89
- ## Project Configuration
90
-
91
- Commands read defaults from a `sweatstack.toml` in the current directory. This file is created automatically by `app create` and `app link`.
92
-
93
- ```toml
94
- [app]
95
- name = "My App"
96
- client_id = "abc123"
97
-
98
- [page]
99
- slug = "my-page"
100
- directory = "dist"
101
- ```
102
-
103
- ## CI/CD Usage
104
-
105
- For automated environments, set environment variables instead of interactive login:
106
-
107
- ```bash
108
- export SWEATSTACK_API_KEY="your-access-token"
109
- export SWEATSTACK_REFRESH_TOKEN="your-refresh-token"
110
-
111
- sweatstack page deploy my-page ./dist
112
- ```
113
-
114
- ## Environment Variables
115
-
116
- | Variable | Description | Default |
117
- |----------|-------------|---------|
118
- | `SWEATSTACK_URL` | API base URL | `https://app.sweatstack.no` |
119
- | `SWEATSTACK_API_KEY` | Access token (for CI/CD) | — |
120
- | `SWEATSTACK_REFRESH_TOKEN` | Refresh token (for CI/CD) | — |
121
-
122
- ## Token Storage
123
-
124
- Credentials are stored in your OS user data directory:
125
-
126
- - **macOS**: `~/Library/Application Support/SweatStack/SweatStack/tokens.json`
127
- - **Linux**: `~/.local/share/SweatStack/SweatStack/tokens.json`
128
- - **Windows**: `%APPDATA%\SweatStack\SweatStack\tokens.json`
129
-
130
- 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.
131
-
132
- ## Development
133
-
134
- See [DEVELOPMENT.md](DEVELOPMENT.md) for development setup and contribution guidelines.
135
-
136
- ```bash
137
- # Install with dev dependencies
138
- uv pip install -e ".[dev]"
139
-
140
- # Run tests
141
- pytest
142
-
143
- # Lint and format
144
- ruff check . && ruff format .
145
-
146
- # Type check
147
- mypy src/sweatstack_cli
148
- ```
149
-
150
- ## License
151
-
152
- MIT
File without changes
File without changes
File without changes