brewsorted-cli 0.8.4__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 (37) hide show
  1. brewsorted_cli-0.8.4/INSTALL.md +159 -0
  2. brewsorted_cli-0.8.4/PKG-INFO +172 -0
  3. brewsorted_cli-0.8.4/brewsorted_cli.egg-info/PKG-INFO +172 -0
  4. brewsorted_cli-0.8.4/brewsorted_cli.egg-info/SOURCES.txt +35 -0
  5. brewsorted_cli-0.8.4/brewsorted_cli.egg-info/dependency_links.txt +1 -0
  6. brewsorted_cli-0.8.4/brewsorted_cli.egg-info/entry_points.txt +2 -0
  7. brewsorted_cli-0.8.4/brewsorted_cli.egg-info/requires.txt +5 -0
  8. brewsorted_cli-0.8.4/brewsorted_cli.egg-info/top_level.txt +1 -0
  9. brewsorted_cli-0.8.4/pyproject.toml +36 -0
  10. brewsorted_cli-0.8.4/setup.cfg +4 -0
  11. brewsorted_cli-0.8.4/skills/brewsorted/SKILL.md +201 -0
  12. brewsorted_cli-0.8.4/skills/brewsorted/__init__.py +1 -0
  13. brewsorted_cli-0.8.4/skills/brewsorted/agents/openai.yaml +6 -0
  14. brewsorted_cli-0.8.4/skills/brewsorted/references/cli.md +471 -0
  15. brewsorted_cli-0.8.4/skills/brewsorted/tests/acceptance_scenarios.json +946 -0
  16. brewsorted_cli-0.8.4/skills/brewsorted/tests/test_skill.py +534 -0
  17. brewsorted_cli-0.8.4/src/brewsorted_cli/__init__.py +5 -0
  18. brewsorted_cli-0.8.4/src/brewsorted_cli/auth_state.py +273 -0
  19. brewsorted_cli-0.8.4/src/brewsorted_cli/client.py +482 -0
  20. brewsorted_cli-0.8.4/src/brewsorted_cli/http.py +29 -0
  21. brewsorted_cli-0.8.4/src/brewsorted_cli/main.py +851 -0
  22. brewsorted_cli-0.8.4/src/brewsorted_cli/oauth_discovery.py +120 -0
  23. brewsorted_cli-0.8.4/src/brewsorted_cli/oauth_login.py +277 -0
  24. brewsorted_cli-0.8.4/src/brewsorted_cli/product_feedback.py +114 -0
  25. brewsorted_cli-0.8.4/src/brewsorted_cli/skills.py +45 -0
  26. brewsorted_cli-0.8.4/src/brewsorted_cli/updates.py +76 -0
  27. brewsorted_cli-0.8.4/tests/test_anonymous_status.py +103 -0
  28. brewsorted_cli-0.8.4/tests/test_auth_state.py +170 -0
  29. brewsorted_cli-0.8.4/tests/test_cli.py +914 -0
  30. brewsorted_cli-0.8.4/tests/test_oauth_discovery.py +128 -0
  31. brewsorted_cli-0.8.4/tests/test_oauth_login.py +256 -0
  32. brewsorted_cli-0.8.4/tests/test_product_feedback.py +204 -0
  33. brewsorted_cli-0.8.4/tests/test_protocol.py +424 -0
  34. brewsorted_cli-0.8.4/tests/test_proxy.py +269 -0
  35. brewsorted_cli-0.8.4/tests/test_ratio_workflow.py +91 -0
  36. brewsorted_cli-0.8.4/tests/test_skills.py +49 -0
  37. brewsorted_cli-0.8.4/tests/test_updates.py +125 -0
@@ -0,0 +1,159 @@
1
+ # BrewSorted client bundle
2
+
3
+ This archive contains the HTTP CLI and the canonical User skill. It is paired
4
+ with its immutable service release by version, commit and archive SHA-256.
5
+ Public downloads use `client-release.json` and the client-only `SHA256SUMS` at
6
+ `https://downloads.brewsorted.com/index.json`; choose `production_recommended`,
7
+ not the newest published version. The supported client target
8
+ is Linux x86-64 with Python 3.12 or 3.13. Python 3.11 remains an internal
9
+ compatibility target and is not publicly release-qualified.
10
+
11
+ ## PyPI installation
12
+
13
+ For releases published to [PyPI](https://pypi.org/project/brewsorted-cli/), install
14
+ that exact production-recommended version using uv (or pipx). Do not infer a
15
+ recommendation from PyPI's latest version. If the exact registry release is not
16
+ available yet, use its verified website archive below. The CLI and complete skill
17
+ are packaged together; no private repository access is required.
18
+
19
+ ```bash
20
+ client_version=0.8.4
21
+ uv tool install --python python3.12 "brewsorted-cli==$client_version"
22
+ # Alternative: pipx install --python python3.12 "brewsorted-cli==$client_version"
23
+ brewsorted skills install --destination "$HOME/.codex/skills/brewsorted"
24
+ ```
25
+
26
+ Python 3.13 is also supported. Choose your agent's actual discovery directory;
27
+ omitting `--destination` uses `~/.agents/skills/brewsorted`. Skill installation is
28
+ local and needs no sign-in or service access. It copies the complete matching
29
+ skill and records the executable version and file hashes in
30
+ `brewsorted-install.json`. Existing files, directories and symlinks are refused;
31
+ inspect and move an existing skill deliberately before installing a replacement.
32
+ After upgrading the executable, deliberately reinstall the matching skill.
33
+ Use the same protected credential-state setup and separate login described below,
34
+ invoking `brewsorted` from PATH for the PyPI installation.
35
+
36
+ PyPI Trusted Publishing uses our GitHub repository `bamx23/brewsorted`, workflow
37
+ `pypi-publish.yml` on `main`, and environment `pypi`. Publish attestations establish
38
+ publisher provenance; they do not certify code safety. Ordinary pip, pipx and uv
39
+ installs do not automatically verify those attestations. For explicit verification,
40
+ download the exact wheel, verify those bytes, then install that same local file:
41
+
42
+ ```bash
43
+ python3.12 -m venv verification-env
44
+ verification-env/bin/python -m pip install pypi-attestations==0.0.31
45
+ verification-env/bin/python -m pip download --only-binary=:all: --no-deps \
46
+ --dest verified "brewsorted-cli==$client_version"
47
+ verification-env/bin/python -m pypi_attestations verify pypi \
48
+ --repository https://github.com/bamx23/brewsorted \
49
+ "verified/brewsorted_cli-$client_version-py3-none-any.whl"
50
+ uv tool install --python python3.12 "verified/brewsorted_cli-$client_version-py3-none-any.whl"
51
+ ```
52
+
53
+ This verifies the CLI artifact's repository provenance, not every dependency or
54
+ a security audit. Establish the expected repository identity independently of a
55
+ disputed website. The public download catalog remains the compatibility authority.
56
+
57
+ ## Archive installation
58
+
59
+ After checking `SHA256SUMS`, retain the extracted immutable archive and install
60
+ both the CLI and its exact User skill. These commands use the Codex skill
61
+ directory; select the equivalent configured discovery directory for another
62
+ supported agent:
63
+
64
+ ```bash
65
+ client_version=0.8.4
66
+ client_archive="brewsorted-client-${client_version}.tar.gz"
67
+ client_release_root="$HOME/.local/share/brewsorted/releases"
68
+ client_root="$client_release_root/brewsorted-client-${client_version}"
69
+ agent_skill_root="$HOME/.codex/skills"
70
+ sha256sum --check SHA256SUMS || exit 1
71
+ install -d -m 0700 "$client_release_root" "$agent_skill_root"
72
+ test ! -e "$client_root" && test ! -L "$client_root"
73
+ tar -xzf "$client_archive" -C "$client_release_root"
74
+ python3.13 -m venv "$client_root/.venv"
75
+ "$client_root/.venv/bin/python" -m pip install "$client_root"
76
+ test ! -e "$agent_skill_root/brewsorted" && test ! -L "$agent_skill_root/brewsorted"
77
+ ln -s "$client_root/skills/brewsorted" "$agent_skill_root/brewsorted"
78
+ ```
79
+
80
+ For an upgrade from CoffeeTrack, remove the old `coffeetrack` skill link and
81
+ replace any shell or agent wrapper that invokes `coffeetrack` with the new
82
+ `$client_root/.venv/bin/brewsorted` path. Move the non-secret service-origin
83
+ setting from `COFFEETRACK_API_URL` to `BREWSORTED_API_URL`; use
84
+ `https://brewsorted.com` for production or `https://staging.brewsorted.com`
85
+ for synthetic staging. Use a separate credential file for each origin.
86
+ Do not copy an old `~/.local/state/coffeetrack/auth.json` or other OAuth state
87
+ into the BrewSorted state directory. The new realm has a different issuer and
88
+ requires fresh User setup, browser sign-in, and Connection authorization.
89
+
90
+ Do not copy only `SKILL.md`: the retained link keeps `references/cli.md` and the
91
+ acceptance scenarios paired with the installed executable source. If the target
92
+ link already exists, inspect and remove or rename it deliberately before linking
93
+ the new archive; do not overwrite an unknown directory.
94
+
95
+ Create the OAuth state directory explicitly and keep it user-owned mode `0700`.
96
+ The credential file becomes mode `0600` when login succeeds:
97
+
98
+ ```bash
99
+ brewsorted_state_root="$HOME/.local/state/brewsorted"
100
+ install -d -m 0700 "$brewsorted_state_root"
101
+ export BREWSORTED_STATE_FILE="$brewsorted_state_root/auth.json"
102
+ export BREWSORTED_API_URL=https://brewsorted.com
103
+ unset COFFEETRACK_API_TOKEN COFFEETRACK_ACCESS_TOKEN COFFEETRACK_STATE_FILE
104
+ "$client_root/.venv/bin/brewsorted" status
105
+ ```
106
+
107
+ Remove legacy `COFFEETRACK_*` assignments from shell profiles, agent wrappers,
108
+ and service configuration. `BREWSORTED_ACCESS_TOKEN` is only for an explicitly
109
+ configured transient agent session; it does not transfer an old Connection.
110
+ Configure the exact HTTPS service origin outside chat as described in the skill.
111
+
112
+ For a headless agent session, run
113
+ `"$client_root/.venv/bin/brewsorted" login --device` and keep that process
114
+ alive. Relay its exact verification URL and short code to the intended User, who
115
+ authorizes it in their own browser. The agent never asks for SSH access, a
116
+ password, access or refresh tokens, or a recovery link.
117
+
118
+ ## HTTP proxy setup
119
+
120
+ For a VM that requires an HTTP proxy, configure the environment before login
121
+ and keep it available for subsequent commands:
122
+
123
+ ```bash
124
+ export HTTPS_PROXY=http://proxy.example:8080
125
+ "$client_root/.venv/bin/brewsorted" login --device
126
+ ```
127
+
128
+ `HTTPS_PROXY` routes HTTPS service requests through the HTTP proxy; use
129
+ `HTTP_PROXY` for loopback HTTP development or `ALL_PROXY` as a fallback.
130
+ Lowercase forms are also accepted. `NO_PROXY` lists destinations to reach
131
+ directly. Alternatively, pass the global option before each command:
132
+ `brewsorted --proxy http://proxy.example:8080 login --device`. This explicit
133
+ option overrides environment proxies and bypass rules for API and OAuth
134
+ requests, including refresh and signing keys. Proxy settings are not saved in
135
+ the Connection. TLS verification remains enabled; an environment with a private
136
+ CA can set `SSL_CERT_FILE` or `SSL_CERT_DIR` to its trusted certificate bundle.
137
+ Keep proxy credentials in the VM's protected environment, outside chat.
138
+
139
+ ## Acceptance checks
140
+
141
+ Treat each check as different evidence:
142
+
143
+ 1. `brewsorted status` proves anonymous service health and compatibility only.
144
+ 2. `brewsorted context` proves the saved Connection can make an authenticated
145
+ read for the intended User.
146
+ 3. After the initial access token expires, another `context` proves the saved
147
+ refresh grant can rotate; health alone does not prove refresh.
148
+ 4. With explicit authorization, create a disposable Roastery, read it by the
149
+ complete returned Qualified ID, update and read it again, then delete that
150
+ exact ID. This proves write/read-back separately from authentication.
151
+
152
+ For recovery, deliberately select the production-recommended archive in the public
153
+ catalog, check its identity and SHA-256 before extraction, and reinstall into its
154
+ version-specific environment. An unavailable recommendation is a publication
155
+ incident: do not infer compatibility from version order or use a withdrawn archive.
156
+ The CLI's optional version hint is advisory, not an automatic updater. See
157
+ `https://brewsorted.com/downloads.html` for download and update steps. HTTPS and
158
+ matching hashes detect corruption but do not independently prove authenticity if
159
+ the publication origin is compromised.
@@ -0,0 +1,172 @@
1
+ Metadata-Version: 2.4
2
+ Name: brewsorted-cli
3
+ Version: 0.8.4
4
+ Summary: Portable HTTP client for the BrewSorted API
5
+ Project-URL: Homepage, https://brewsorted.com
6
+ Project-URL: Documentation, https://brewsorted.com/downloads.html
7
+ Requires-Python: >=3.11
8
+ Description-Content-Type: text/markdown
9
+ Requires-Dist: httpx<1,>=0.28
10
+ Requires-Dist: PyJWT[crypto]<3,>=2.14
11
+ Provides-Extra: dev
12
+ Requires-Dist: pytest<10,>=8; extra == "dev"
13
+
14
+ # BrewSorted client bundle
15
+
16
+ This archive contains the HTTP CLI and the canonical User skill. It is paired
17
+ with its immutable service release by version, commit and archive SHA-256.
18
+ Public downloads use `client-release.json` and the client-only `SHA256SUMS` at
19
+ `https://downloads.brewsorted.com/index.json`; choose `production_recommended`,
20
+ not the newest published version. The supported client target
21
+ is Linux x86-64 with Python 3.12 or 3.13. Python 3.11 remains an internal
22
+ compatibility target and is not publicly release-qualified.
23
+
24
+ ## PyPI installation
25
+
26
+ For releases published to [PyPI](https://pypi.org/project/brewsorted-cli/), install
27
+ that exact production-recommended version using uv (or pipx). Do not infer a
28
+ recommendation from PyPI's latest version. If the exact registry release is not
29
+ available yet, use its verified website archive below. The CLI and complete skill
30
+ are packaged together; no private repository access is required.
31
+
32
+ ```bash
33
+ client_version=0.8.4
34
+ uv tool install --python python3.12 "brewsorted-cli==$client_version"
35
+ # Alternative: pipx install --python python3.12 "brewsorted-cli==$client_version"
36
+ brewsorted skills install --destination "$HOME/.codex/skills/brewsorted"
37
+ ```
38
+
39
+ Python 3.13 is also supported. Choose your agent's actual discovery directory;
40
+ omitting `--destination` uses `~/.agents/skills/brewsorted`. Skill installation is
41
+ local and needs no sign-in or service access. It copies the complete matching
42
+ skill and records the executable version and file hashes in
43
+ `brewsorted-install.json`. Existing files, directories and symlinks are refused;
44
+ inspect and move an existing skill deliberately before installing a replacement.
45
+ After upgrading the executable, deliberately reinstall the matching skill.
46
+ Use the same protected credential-state setup and separate login described below,
47
+ invoking `brewsorted` from PATH for the PyPI installation.
48
+
49
+ PyPI Trusted Publishing uses our GitHub repository `bamx23/brewsorted`, workflow
50
+ `pypi-publish.yml` on `main`, and environment `pypi`. Publish attestations establish
51
+ publisher provenance; they do not certify code safety. Ordinary pip, pipx and uv
52
+ installs do not automatically verify those attestations. For explicit verification,
53
+ download the exact wheel, verify those bytes, then install that same local file:
54
+
55
+ ```bash
56
+ python3.12 -m venv verification-env
57
+ verification-env/bin/python -m pip install pypi-attestations==0.0.31
58
+ verification-env/bin/python -m pip download --only-binary=:all: --no-deps \
59
+ --dest verified "brewsorted-cli==$client_version"
60
+ verification-env/bin/python -m pypi_attestations verify pypi \
61
+ --repository https://github.com/bamx23/brewsorted \
62
+ "verified/brewsorted_cli-$client_version-py3-none-any.whl"
63
+ uv tool install --python python3.12 "verified/brewsorted_cli-$client_version-py3-none-any.whl"
64
+ ```
65
+
66
+ This verifies the CLI artifact's repository provenance, not every dependency or
67
+ a security audit. Establish the expected repository identity independently of a
68
+ disputed website. The public download catalog remains the compatibility authority.
69
+
70
+ ## Archive installation
71
+
72
+ After checking `SHA256SUMS`, retain the extracted immutable archive and install
73
+ both the CLI and its exact User skill. These commands use the Codex skill
74
+ directory; select the equivalent configured discovery directory for another
75
+ supported agent:
76
+
77
+ ```bash
78
+ client_version=0.8.4
79
+ client_archive="brewsorted-client-${client_version}.tar.gz"
80
+ client_release_root="$HOME/.local/share/brewsorted/releases"
81
+ client_root="$client_release_root/brewsorted-client-${client_version}"
82
+ agent_skill_root="$HOME/.codex/skills"
83
+ sha256sum --check SHA256SUMS || exit 1
84
+ install -d -m 0700 "$client_release_root" "$agent_skill_root"
85
+ test ! -e "$client_root" && test ! -L "$client_root"
86
+ tar -xzf "$client_archive" -C "$client_release_root"
87
+ python3.13 -m venv "$client_root/.venv"
88
+ "$client_root/.venv/bin/python" -m pip install "$client_root"
89
+ test ! -e "$agent_skill_root/brewsorted" && test ! -L "$agent_skill_root/brewsorted"
90
+ ln -s "$client_root/skills/brewsorted" "$agent_skill_root/brewsorted"
91
+ ```
92
+
93
+ For an upgrade from CoffeeTrack, remove the old `coffeetrack` skill link and
94
+ replace any shell or agent wrapper that invokes `coffeetrack` with the new
95
+ `$client_root/.venv/bin/brewsorted` path. Move the non-secret service-origin
96
+ setting from `COFFEETRACK_API_URL` to `BREWSORTED_API_URL`; use
97
+ `https://brewsorted.com` for production or `https://staging.brewsorted.com`
98
+ for synthetic staging. Use a separate credential file for each origin.
99
+ Do not copy an old `~/.local/state/coffeetrack/auth.json` or other OAuth state
100
+ into the BrewSorted state directory. The new realm has a different issuer and
101
+ requires fresh User setup, browser sign-in, and Connection authorization.
102
+
103
+ Do not copy only `SKILL.md`: the retained link keeps `references/cli.md` and the
104
+ acceptance scenarios paired with the installed executable source. If the target
105
+ link already exists, inspect and remove or rename it deliberately before linking
106
+ the new archive; do not overwrite an unknown directory.
107
+
108
+ Create the OAuth state directory explicitly and keep it user-owned mode `0700`.
109
+ The credential file becomes mode `0600` when login succeeds:
110
+
111
+ ```bash
112
+ brewsorted_state_root="$HOME/.local/state/brewsorted"
113
+ install -d -m 0700 "$brewsorted_state_root"
114
+ export BREWSORTED_STATE_FILE="$brewsorted_state_root/auth.json"
115
+ export BREWSORTED_API_URL=https://brewsorted.com
116
+ unset COFFEETRACK_API_TOKEN COFFEETRACK_ACCESS_TOKEN COFFEETRACK_STATE_FILE
117
+ "$client_root/.venv/bin/brewsorted" status
118
+ ```
119
+
120
+ Remove legacy `COFFEETRACK_*` assignments from shell profiles, agent wrappers,
121
+ and service configuration. `BREWSORTED_ACCESS_TOKEN` is only for an explicitly
122
+ configured transient agent session; it does not transfer an old Connection.
123
+ Configure the exact HTTPS service origin outside chat as described in the skill.
124
+
125
+ For a headless agent session, run
126
+ `"$client_root/.venv/bin/brewsorted" login --device` and keep that process
127
+ alive. Relay its exact verification URL and short code to the intended User, who
128
+ authorizes it in their own browser. The agent never asks for SSH access, a
129
+ password, access or refresh tokens, or a recovery link.
130
+
131
+ ## HTTP proxy setup
132
+
133
+ For a VM that requires an HTTP proxy, configure the environment before login
134
+ and keep it available for subsequent commands:
135
+
136
+ ```bash
137
+ export HTTPS_PROXY=http://proxy.example:8080
138
+ "$client_root/.venv/bin/brewsorted" login --device
139
+ ```
140
+
141
+ `HTTPS_PROXY` routes HTTPS service requests through the HTTP proxy; use
142
+ `HTTP_PROXY` for loopback HTTP development or `ALL_PROXY` as a fallback.
143
+ Lowercase forms are also accepted. `NO_PROXY` lists destinations to reach
144
+ directly. Alternatively, pass the global option before each command:
145
+ `brewsorted --proxy http://proxy.example:8080 login --device`. This explicit
146
+ option overrides environment proxies and bypass rules for API and OAuth
147
+ requests, including refresh and signing keys. Proxy settings are not saved in
148
+ the Connection. TLS verification remains enabled; an environment with a private
149
+ CA can set `SSL_CERT_FILE` or `SSL_CERT_DIR` to its trusted certificate bundle.
150
+ Keep proxy credentials in the VM's protected environment, outside chat.
151
+
152
+ ## Acceptance checks
153
+
154
+ Treat each check as different evidence:
155
+
156
+ 1. `brewsorted status` proves anonymous service health and compatibility only.
157
+ 2. `brewsorted context` proves the saved Connection can make an authenticated
158
+ read for the intended User.
159
+ 3. After the initial access token expires, another `context` proves the saved
160
+ refresh grant can rotate; health alone does not prove refresh.
161
+ 4. With explicit authorization, create a disposable Roastery, read it by the
162
+ complete returned Qualified ID, update and read it again, then delete that
163
+ exact ID. This proves write/read-back separately from authentication.
164
+
165
+ For recovery, deliberately select the production-recommended archive in the public
166
+ catalog, check its identity and SHA-256 before extraction, and reinstall into its
167
+ version-specific environment. An unavailable recommendation is a publication
168
+ incident: do not infer compatibility from version order or use a withdrawn archive.
169
+ The CLI's optional version hint is advisory, not an automatic updater. See
170
+ `https://brewsorted.com/downloads.html` for download and update steps. HTTPS and
171
+ matching hashes detect corruption but do not independently prove authenticity if
172
+ the publication origin is compromised.
@@ -0,0 +1,172 @@
1
+ Metadata-Version: 2.4
2
+ Name: brewsorted-cli
3
+ Version: 0.8.4
4
+ Summary: Portable HTTP client for the BrewSorted API
5
+ Project-URL: Homepage, https://brewsorted.com
6
+ Project-URL: Documentation, https://brewsorted.com/downloads.html
7
+ Requires-Python: >=3.11
8
+ Description-Content-Type: text/markdown
9
+ Requires-Dist: httpx<1,>=0.28
10
+ Requires-Dist: PyJWT[crypto]<3,>=2.14
11
+ Provides-Extra: dev
12
+ Requires-Dist: pytest<10,>=8; extra == "dev"
13
+
14
+ # BrewSorted client bundle
15
+
16
+ This archive contains the HTTP CLI and the canonical User skill. It is paired
17
+ with its immutable service release by version, commit and archive SHA-256.
18
+ Public downloads use `client-release.json` and the client-only `SHA256SUMS` at
19
+ `https://downloads.brewsorted.com/index.json`; choose `production_recommended`,
20
+ not the newest published version. The supported client target
21
+ is Linux x86-64 with Python 3.12 or 3.13. Python 3.11 remains an internal
22
+ compatibility target and is not publicly release-qualified.
23
+
24
+ ## PyPI installation
25
+
26
+ For releases published to [PyPI](https://pypi.org/project/brewsorted-cli/), install
27
+ that exact production-recommended version using uv (or pipx). Do not infer a
28
+ recommendation from PyPI's latest version. If the exact registry release is not
29
+ available yet, use its verified website archive below. The CLI and complete skill
30
+ are packaged together; no private repository access is required.
31
+
32
+ ```bash
33
+ client_version=0.8.4
34
+ uv tool install --python python3.12 "brewsorted-cli==$client_version"
35
+ # Alternative: pipx install --python python3.12 "brewsorted-cli==$client_version"
36
+ brewsorted skills install --destination "$HOME/.codex/skills/brewsorted"
37
+ ```
38
+
39
+ Python 3.13 is also supported. Choose your agent's actual discovery directory;
40
+ omitting `--destination` uses `~/.agents/skills/brewsorted`. Skill installation is
41
+ local and needs no sign-in or service access. It copies the complete matching
42
+ skill and records the executable version and file hashes in
43
+ `brewsorted-install.json`. Existing files, directories and symlinks are refused;
44
+ inspect and move an existing skill deliberately before installing a replacement.
45
+ After upgrading the executable, deliberately reinstall the matching skill.
46
+ Use the same protected credential-state setup and separate login described below,
47
+ invoking `brewsorted` from PATH for the PyPI installation.
48
+
49
+ PyPI Trusted Publishing uses our GitHub repository `bamx23/brewsorted`, workflow
50
+ `pypi-publish.yml` on `main`, and environment `pypi`. Publish attestations establish
51
+ publisher provenance; they do not certify code safety. Ordinary pip, pipx and uv
52
+ installs do not automatically verify those attestations. For explicit verification,
53
+ download the exact wheel, verify those bytes, then install that same local file:
54
+
55
+ ```bash
56
+ python3.12 -m venv verification-env
57
+ verification-env/bin/python -m pip install pypi-attestations==0.0.31
58
+ verification-env/bin/python -m pip download --only-binary=:all: --no-deps \
59
+ --dest verified "brewsorted-cli==$client_version"
60
+ verification-env/bin/python -m pypi_attestations verify pypi \
61
+ --repository https://github.com/bamx23/brewsorted \
62
+ "verified/brewsorted_cli-$client_version-py3-none-any.whl"
63
+ uv tool install --python python3.12 "verified/brewsorted_cli-$client_version-py3-none-any.whl"
64
+ ```
65
+
66
+ This verifies the CLI artifact's repository provenance, not every dependency or
67
+ a security audit. Establish the expected repository identity independently of a
68
+ disputed website. The public download catalog remains the compatibility authority.
69
+
70
+ ## Archive installation
71
+
72
+ After checking `SHA256SUMS`, retain the extracted immutable archive and install
73
+ both the CLI and its exact User skill. These commands use the Codex skill
74
+ directory; select the equivalent configured discovery directory for another
75
+ supported agent:
76
+
77
+ ```bash
78
+ client_version=0.8.4
79
+ client_archive="brewsorted-client-${client_version}.tar.gz"
80
+ client_release_root="$HOME/.local/share/brewsorted/releases"
81
+ client_root="$client_release_root/brewsorted-client-${client_version}"
82
+ agent_skill_root="$HOME/.codex/skills"
83
+ sha256sum --check SHA256SUMS || exit 1
84
+ install -d -m 0700 "$client_release_root" "$agent_skill_root"
85
+ test ! -e "$client_root" && test ! -L "$client_root"
86
+ tar -xzf "$client_archive" -C "$client_release_root"
87
+ python3.13 -m venv "$client_root/.venv"
88
+ "$client_root/.venv/bin/python" -m pip install "$client_root"
89
+ test ! -e "$agent_skill_root/brewsorted" && test ! -L "$agent_skill_root/brewsorted"
90
+ ln -s "$client_root/skills/brewsorted" "$agent_skill_root/brewsorted"
91
+ ```
92
+
93
+ For an upgrade from CoffeeTrack, remove the old `coffeetrack` skill link and
94
+ replace any shell or agent wrapper that invokes `coffeetrack` with the new
95
+ `$client_root/.venv/bin/brewsorted` path. Move the non-secret service-origin
96
+ setting from `COFFEETRACK_API_URL` to `BREWSORTED_API_URL`; use
97
+ `https://brewsorted.com` for production or `https://staging.brewsorted.com`
98
+ for synthetic staging. Use a separate credential file for each origin.
99
+ Do not copy an old `~/.local/state/coffeetrack/auth.json` or other OAuth state
100
+ into the BrewSorted state directory. The new realm has a different issuer and
101
+ requires fresh User setup, browser sign-in, and Connection authorization.
102
+
103
+ Do not copy only `SKILL.md`: the retained link keeps `references/cli.md` and the
104
+ acceptance scenarios paired with the installed executable source. If the target
105
+ link already exists, inspect and remove or rename it deliberately before linking
106
+ the new archive; do not overwrite an unknown directory.
107
+
108
+ Create the OAuth state directory explicitly and keep it user-owned mode `0700`.
109
+ The credential file becomes mode `0600` when login succeeds:
110
+
111
+ ```bash
112
+ brewsorted_state_root="$HOME/.local/state/brewsorted"
113
+ install -d -m 0700 "$brewsorted_state_root"
114
+ export BREWSORTED_STATE_FILE="$brewsorted_state_root/auth.json"
115
+ export BREWSORTED_API_URL=https://brewsorted.com
116
+ unset COFFEETRACK_API_TOKEN COFFEETRACK_ACCESS_TOKEN COFFEETRACK_STATE_FILE
117
+ "$client_root/.venv/bin/brewsorted" status
118
+ ```
119
+
120
+ Remove legacy `COFFEETRACK_*` assignments from shell profiles, agent wrappers,
121
+ and service configuration. `BREWSORTED_ACCESS_TOKEN` is only for an explicitly
122
+ configured transient agent session; it does not transfer an old Connection.
123
+ Configure the exact HTTPS service origin outside chat as described in the skill.
124
+
125
+ For a headless agent session, run
126
+ `"$client_root/.venv/bin/brewsorted" login --device` and keep that process
127
+ alive. Relay its exact verification URL and short code to the intended User, who
128
+ authorizes it in their own browser. The agent never asks for SSH access, a
129
+ password, access or refresh tokens, or a recovery link.
130
+
131
+ ## HTTP proxy setup
132
+
133
+ For a VM that requires an HTTP proxy, configure the environment before login
134
+ and keep it available for subsequent commands:
135
+
136
+ ```bash
137
+ export HTTPS_PROXY=http://proxy.example:8080
138
+ "$client_root/.venv/bin/brewsorted" login --device
139
+ ```
140
+
141
+ `HTTPS_PROXY` routes HTTPS service requests through the HTTP proxy; use
142
+ `HTTP_PROXY` for loopback HTTP development or `ALL_PROXY` as a fallback.
143
+ Lowercase forms are also accepted. `NO_PROXY` lists destinations to reach
144
+ directly. Alternatively, pass the global option before each command:
145
+ `brewsorted --proxy http://proxy.example:8080 login --device`. This explicit
146
+ option overrides environment proxies and bypass rules for API and OAuth
147
+ requests, including refresh and signing keys. Proxy settings are not saved in
148
+ the Connection. TLS verification remains enabled; an environment with a private
149
+ CA can set `SSL_CERT_FILE` or `SSL_CERT_DIR` to its trusted certificate bundle.
150
+ Keep proxy credentials in the VM's protected environment, outside chat.
151
+
152
+ ## Acceptance checks
153
+
154
+ Treat each check as different evidence:
155
+
156
+ 1. `brewsorted status` proves anonymous service health and compatibility only.
157
+ 2. `brewsorted context` proves the saved Connection can make an authenticated
158
+ read for the intended User.
159
+ 3. After the initial access token expires, another `context` proves the saved
160
+ refresh grant can rotate; health alone does not prove refresh.
161
+ 4. With explicit authorization, create a disposable Roastery, read it by the
162
+ complete returned Qualified ID, update and read it again, then delete that
163
+ exact ID. This proves write/read-back separately from authentication.
164
+
165
+ For recovery, deliberately select the production-recommended archive in the public
166
+ catalog, check its identity and SHA-256 before extraction, and reinstall into its
167
+ version-specific environment. An unavailable recommendation is a publication
168
+ incident: do not infer compatibility from version order or use a withdrawn archive.
169
+ The CLI's optional version hint is advisory, not an automatic updater. See
170
+ `https://brewsorted.com/downloads.html` for download and update steps. HTTPS and
171
+ matching hashes detect corruption but do not independently prove authenticity if
172
+ the publication origin is compromised.
@@ -0,0 +1,35 @@
1
+ INSTALL.md
2
+ pyproject.toml
3
+ brewsorted_cli.egg-info/PKG-INFO
4
+ brewsorted_cli.egg-info/SOURCES.txt
5
+ brewsorted_cli.egg-info/dependency_links.txt
6
+ brewsorted_cli.egg-info/entry_points.txt
7
+ brewsorted_cli.egg-info/requires.txt
8
+ brewsorted_cli.egg-info/top_level.txt
9
+ skills/brewsorted/SKILL.md
10
+ skills/brewsorted/__init__.py
11
+ skills/brewsorted/agents/openai.yaml
12
+ skills/brewsorted/references/cli.md
13
+ skills/brewsorted/tests/acceptance_scenarios.json
14
+ skills/brewsorted/tests/test_skill.py
15
+ src/brewsorted_cli/__init__.py
16
+ src/brewsorted_cli/auth_state.py
17
+ src/brewsorted_cli/client.py
18
+ src/brewsorted_cli/http.py
19
+ src/brewsorted_cli/main.py
20
+ src/brewsorted_cli/oauth_discovery.py
21
+ src/brewsorted_cli/oauth_login.py
22
+ src/brewsorted_cli/product_feedback.py
23
+ src/brewsorted_cli/skills.py
24
+ src/brewsorted_cli/updates.py
25
+ tests/test_anonymous_status.py
26
+ tests/test_auth_state.py
27
+ tests/test_cli.py
28
+ tests/test_oauth_discovery.py
29
+ tests/test_oauth_login.py
30
+ tests/test_product_feedback.py
31
+ tests/test_protocol.py
32
+ tests/test_proxy.py
33
+ tests/test_ratio_workflow.py
34
+ tests/test_skills.py
35
+ tests/test_updates.py
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ brewsorted = brewsorted_cli.main:main
@@ -0,0 +1,5 @@
1
+ httpx<1,>=0.28
2
+ PyJWT[crypto]<3,>=2.14
3
+
4
+ [dev]
5
+ pytest<10,>=8
@@ -0,0 +1 @@
1
+ brewsorted_cli
@@ -0,0 +1,36 @@
1
+ [build-system]
2
+ requires = ["setuptools>=75"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "brewsorted-cli"
7
+ version = "0.8.4"
8
+ description = "Portable HTTP client for the BrewSorted API"
9
+ readme = "INSTALL.md"
10
+ requires-python = ">=3.11"
11
+ dependencies = ["httpx>=0.28,<1", "PyJWT[crypto]>=2.14,<3"]
12
+
13
+ [project.optional-dependencies]
14
+ dev = ["pytest>=8,<10"]
15
+
16
+ [project.scripts]
17
+ brewsorted = "brewsorted_cli.main:main"
18
+
19
+ [project.urls]
20
+ Homepage = "https://brewsorted.com"
21
+ Documentation = "https://brewsorted.com/downloads.html"
22
+
23
+ [tool.setuptools]
24
+ packages = ["brewsorted_cli", "brewsorted_cli._skill"]
25
+ include-package-data = false
26
+
27
+ [tool.setuptools.package-dir]
28
+ brewsorted_cli = "src/brewsorted_cli"
29
+ "brewsorted_cli._skill" = "skills/brewsorted"
30
+
31
+ [tool.setuptools.package-data]
32
+ "brewsorted_cli._skill" = ["SKILL.md", "references/*.md", "agents/*.yaml", "tests/*.json", "tests/*.py"]
33
+
34
+ [tool.pytest.ini_options]
35
+ testpaths = ["tests"]
36
+ addopts = "-q"
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+