authswap 1.0.0__py3-none-win32.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.
Binary file
@@ -0,0 +1,173 @@
1
+ Metadata-Version: 2.4
2
+ Name: authswap
3
+ Version: 1.0.0
4
+ Classifier: Development Status :: 4 - Beta
5
+ Classifier: Environment :: Console
6
+ Classifier: License :: OSI Approved :: MIT License
7
+ Classifier: Programming Language :: Rust
8
+ Classifier: Topic :: Utilities
9
+ License-File: LICENSE
10
+ Summary: Rust authswap CLI with WebDAV sync and Codex app-server restart
11
+ Keywords: codex,authswap,webdav
12
+ Author: wangxingyou
13
+ License: MIT
14
+ Requires-Python: >=3.8
15
+ Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
16
+ Project-URL: Homepage, https://github.com/shevekwang/authswap
17
+ Project-URL: Issues, https://github.com/shevekwang/authswap/issues
18
+ Project-URL: Repository, https://github.com/shevekwang/authswap
19
+
20
+ # authswap
21
+
22
+ `authswap` is a Rust command-line tool for switching local Codex auth profiles
23
+ and optionally syncing those profiles through WebDAV.
24
+
25
+ The project is packaged for PyPI with `maturin`, but day-to-day development does
26
+ not require building a wheel. Use Cargo directly while debugging.
27
+
28
+ ## Features
29
+
30
+ - Interactive account picker for local Codex profiles.
31
+ - Account add, switch, refresh, and delete actions inside the interactive UI.
32
+ - WebDAV sync from the interactive UI.
33
+ - Sanitized `config.toml` sync that excludes machine-local project sections.
34
+ - PyPI wheel packaging for users who do not have Rust installed.
35
+
36
+ ## Commands
37
+
38
+ ```shell
39
+ authswap
40
+ ```
41
+
42
+ `authswap` reads and writes the standard Codex auth layout:
43
+
44
+ ```text
45
+ ~/.codex/auth.json
46
+ ~/.codex/config.toml
47
+ ~/.codex/accounts/*.auth.json
48
+ ~/.codex/accounts/registry.json
49
+ ```
50
+
51
+ ## Install From PyPI
52
+
53
+ ```shell
54
+ pip install authswap
55
+ authswap
56
+ ```
57
+
58
+ Published wheels include the compiled `authswap` binary, so end users do not
59
+ need Rust, Node.js, or npm when a compatible wheel is available.
60
+
61
+ ## Local Development
62
+
63
+ Build and run directly with Cargo:
64
+
65
+ ```shell
66
+ cargo run --
67
+ ```
68
+
69
+ Build the debug binary once, then run it directly:
70
+
71
+ ```shell
72
+ cargo build
73
+ ./target/debug/authswap
74
+ ```
75
+
76
+ Install the local Rust binary without building a wheel:
77
+
78
+ ```shell
79
+ cargo install --path .
80
+ authswap
81
+ ```
82
+
83
+ ## Isolated Debugging
84
+
85
+ Use a temporary `HOME` and `CODEX_HOME` while testing so real Codex credentials
86
+ are not modified:
87
+
88
+ ```shell
89
+ mkdir -p /tmp/authswap-debug/.codex/accounts
90
+ HOME=/tmp/authswap-debug \
91
+ CODEX_HOME=/tmp/authswap-debug/.codex \
92
+ cargo run --
93
+ ```
94
+
95
+ ## WebDAV Sync
96
+
97
+ Configure WebDAV sync with `AUTHSWAP_*` environment variables:
98
+
99
+ ```shell
100
+ export AUTHSWAP_WEBDAV_URL="https://dav.example.com/authswap/"
101
+ export AUTHSWAP_WEBDAV_USERNAME="your-user"
102
+ export AUTHSWAP_WEBDAV_PASSWORD="your-password"
103
+ ```
104
+
105
+ Bearer token authentication is also supported:
106
+
107
+ ```shell
108
+ export AUTHSWAP_WEBDAV_URL="https://dav.example.com/authswap/"
109
+ export AUTHSWAP_WEBDAV_TOKEN="your-token"
110
+ ```
111
+
112
+ Open WebDAV sync from the account picker by pressing `w`. If WebDAV is not
113
+ configured, authswap opens a settings dialog for the URL, username, and
114
+ password, then tests the connection before returning to the sync dialog. The
115
+ sync dialog shows a green status dot when WebDAV is reachable and a red status
116
+ dot otherwise.
117
+
118
+ The settings file is stored at `~/.codex/authswap.json` with private file
119
+ permissions. `AUTHSWAP_*` environment variables override saved WebDAV settings.
120
+
121
+ These files contain active credentials. Sync only to a trusted WebDAV server.
122
+
123
+ ## Usage Limits
124
+
125
+ The interactive account picker shows cached 5-hour and weekly limit usage from
126
+ `~/.codex/accounts/registry.json`. Press `r` on the selected account to request
127
+ fresh usage from Codex and update the local cache.
128
+
129
+ Limit columns show the remaining percentage and the remaining time until reset, for
130
+ example `28% 1h 20m`.
131
+
132
+ Press `s` in the account picker to configure whether authswap restarts
133
+ `codex app-server` after switching accounts. The setting is off by default and
134
+ is saved in `~/.codex/authswap.json`.
135
+
136
+ ## Build Wheels
137
+
138
+ Wheel builds are for packaging and release:
139
+
140
+ ```shell
141
+ pip install maturin
142
+ maturin build --release
143
+ ```
144
+
145
+ The Python package uses `maturin` with `bindings = "bin"` to ship the Rust CLI
146
+ as a binary application.
147
+
148
+ ## Publish to PyPI
149
+
150
+ GitHub Actions builds release artifacts with `maturin` for Linux, macOS, and
151
+ Windows, then publishes them to PyPI when a version tag is pushed. The wheel
152
+ matrix includes x86/x86_64 and ARM targets:
153
+
154
+ - Linux: `x86_64`, `i686`, `aarch64`, `armv7`
155
+ - macOS: `aarch64`
156
+ - Windows: `x86_64`, `i686`, `aarch64`
157
+
158
+ ```shell
159
+ git tag v1.0.0
160
+ git push origin v1.0.0
161
+ ```
162
+
163
+ Before the first release, configure PyPI trusted publishing for this repository:
164
+
165
+ - PyPI project: `authswap`
166
+ - Owner: `shevekwang`
167
+ - Repository: `authswap`
168
+ - Workflow: `rust-pypi-wheels.yml`
169
+ - Environment: `pypi`
170
+
171
+ Manual workflow runs build and upload artifacts in GitHub Actions, but they do
172
+ not publish to PyPI unless the run is for a tag.
173
+
@@ -0,0 +1,6 @@
1
+ authswap-1.0.0.data/scripts/authswap.exe,sha256=MDYdI-ljy6h8ZoGXceIFHeh7_RybXEfrb5RHa2yVRcw,3873280
2
+ authswap-1.0.0.dist-info/METADATA,sha256=-ER_kVFXzTquzxY3tayFI4z7o2Uh-Dat3Wd9m3I10lc,4882
3
+ authswap-1.0.0.dist-info/WHEEL,sha256=XjB3j-nzk0M5rV0Sq8yOW45XVxiXs40uM5YtikwNIuw,90
4
+ authswap-1.0.0.dist-info/licenses/LICENSE,sha256=7xGOPpGq-Dd2qz9FaVFWAihLFLYuv7a8W6-wnsd08ig,1123
5
+ authswap-1.0.0.dist-info/sboms/authswap.cyclonedx.json,sha256=lFyDNDUhP4OyUu_yvnApIeigXyinLkqmP-c1-P5S9vw,213477
6
+ authswap-1.0.0.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: maturin (1.14.0)
3
+ Root-Is-Purelib: false
4
+ Tag: py3-none-win32
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026-PRESENT Loongphy<https://github.com/loongphy>
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.