Rust authswap CLI with WebDAV sync and Codex app-server restart
Project description
authswap
authswap is a Rust command-line tool for switching local Codex auth profiles
and optionally syncing those profiles through WebDAV.
The project is packaged for PyPI with maturin, but day-to-day development does
not require building a wheel. Use Cargo directly while debugging.
Features
- Interactive account picker for local Codex profiles.
- Account add, switch, refresh, and delete actions inside the interactive UI.
- WebDAV sync from the interactive UI.
- Sanitized
config.tomlsync that excludes machine-local project sections. - PyPI wheel packaging for users who do not have Rust installed.
Commands
authswap
authswap reads and writes the standard Codex auth layout:
~/.codex/auth.json
~/.codex/config.toml
~/.codex/accounts/*.auth.json
~/.codex/accounts/registry.json
Install From PyPI
pip install authswap
authswap
Published wheels include the compiled authswap binary, so end users do not
need Rust, Node.js, or npm when a compatible wheel is available.
Local Development
Build and run directly with Cargo:
cargo run --
Build the debug binary once, then run it directly:
cargo build
./target/debug/authswap
Install the local Rust binary without building a wheel:
cargo install --path .
authswap
Isolated Debugging
Use a temporary HOME and CODEX_HOME while testing so real Codex credentials
are not modified:
mkdir -p /tmp/authswap-debug/.codex/accounts
HOME=/tmp/authswap-debug \
CODEX_HOME=/tmp/authswap-debug/.codex \
cargo run --
WebDAV Sync
Configure WebDAV sync with AUTHSWAP_* environment variables:
export AUTHSWAP_WEBDAV_URL="https://dav.example.com/authswap/"
export AUTHSWAP_WEBDAV_USERNAME="your-user"
export AUTHSWAP_WEBDAV_PASSWORD="your-password"
Bearer token authentication is also supported:
export AUTHSWAP_WEBDAV_URL="https://dav.example.com/authswap/"
export AUTHSWAP_WEBDAV_TOKEN="your-token"
Open WebDAV sync from the account picker by pressing w. If WebDAV is not
configured, authswap opens a settings dialog for the URL, username, and
password, then tests the connection before returning to the sync dialog. The
sync dialog shows a green status dot when WebDAV is reachable and a red status
dot otherwise.
The settings file is stored at ~/.codex/authswap.json with private file
permissions. AUTHSWAP_* environment variables override saved WebDAV settings.
These files contain active credentials. Sync only to a trusted WebDAV server.
Usage Limits
The interactive account picker shows cached 5-hour and weekly limit usage from
~/.codex/accounts/registry.json. Press r on the selected account to request
fresh usage from Codex and update the local cache.
Limit columns show the remaining percentage and the remaining time until reset, for
example 28% 1h 20m.
Press s in the account picker to configure whether authswap restarts
codex app-server after switching accounts. The setting is off by default and
is saved in ~/.codex/authswap.json.
Build Wheels
Wheel builds are for packaging and release:
pip install maturin
maturin build --release
The Python package uses maturin with bindings = "bin" to ship the Rust CLI
as a binary application.
Publish to PyPI
GitHub Actions builds release artifacts with maturin for Linux, macOS, and
Windows, then publishes them to PyPI when a version tag is pushed. The wheel
matrix includes x86/x86_64 and ARM targets:
- Linux:
x86_64,i686,aarch64,armv7 - macOS:
aarch64 - Windows:
x86_64,i686,aarch64
git tag v1.0.0
git push origin v1.0.0
Before the first release, configure PyPI trusted publishing for this repository:
- PyPI project:
authswap - Owner:
shevekwang - Repository:
authswap - Workflow:
rust-pypi-wheels.yml - Environment:
pypi
Manual workflow runs build and upload artifacts in GitHub Actions, but they do not publish to PyPI unless the run is for a tag.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file authswap-1.0.0.tar.gz.
File metadata
- Download URL: authswap-1.0.0.tar.gz
- Upload date:
- Size: 51.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fbffeed2b3c0559dc4b90a16c930760057bce5dcebe6fe6477f3383658bc9111
|
|
| MD5 |
b0a9dbbe0c2b92609a7c03926d9b368c
|
|
| BLAKE2b-256 |
df17540fff7da1d98ad09bfed5c174c803a3f3781e7ec6d9a78e7d492869f7ed
|
Provenance
The following attestation bundles were made for authswap-1.0.0.tar.gz:
Publisher:
rust-pypi-wheels.yml on shevekwang/authswap
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
authswap-1.0.0.tar.gz -
Subject digest:
fbffeed2b3c0559dc4b90a16c930760057bce5dcebe6fe6477f3383658bc9111 - Sigstore transparency entry: 1802278466
- Sigstore integration time:
-
Permalink:
shevekwang/authswap@941e60bec8a3eb4f01fd86f868e2ecac01baab47 -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/shevekwang
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
rust-pypi-wheels.yml@941e60bec8a3eb4f01fd86f868e2ecac01baab47 -
Trigger Event:
push
-
Statement type:
File details
Details for the file authswap-1.0.0-py3-none-win_arm64.whl.
File metadata
- Download URL: authswap-1.0.0-py3-none-win_arm64.whl
- Upload date:
- Size: 2.1 MB
- Tags: Python 3, Windows ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a785f952cd1f2239885713991bb4d1521403fb3e30e419e9e25aba0bccd71d31
|
|
| MD5 |
514ea66ace22270e7d682c8cb30a43ac
|
|
| BLAKE2b-256 |
e0d553982955c17c9547583705c7f7116997db62342278ad15ef2970351aa4ee
|
Provenance
The following attestation bundles were made for authswap-1.0.0-py3-none-win_arm64.whl:
Publisher:
rust-pypi-wheels.yml on shevekwang/authswap
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
authswap-1.0.0-py3-none-win_arm64.whl -
Subject digest:
a785f952cd1f2239885713991bb4d1521403fb3e30e419e9e25aba0bccd71d31 - Sigstore transparency entry: 1802278685
- Sigstore integration time:
-
Permalink:
shevekwang/authswap@941e60bec8a3eb4f01fd86f868e2ecac01baab47 -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/shevekwang
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
rust-pypi-wheels.yml@941e60bec8a3eb4f01fd86f868e2ecac01baab47 -
Trigger Event:
push
-
Statement type:
File details
Details for the file authswap-1.0.0-py3-none-win_amd64.whl.
File metadata
- Download URL: authswap-1.0.0-py3-none-win_amd64.whl
- Upload date:
- Size: 2.2 MB
- Tags: Python 3, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
82a9e8819061f0c9d863718b204acd15a74ad4a03d113001bebce262478479da
|
|
| MD5 |
04a9705230175009929f09c2bc0dcc87
|
|
| BLAKE2b-256 |
5b1282a0257af06ec4aecadadbdaeeffc8089ab70f94f55ec0b2e229594a6180
|
Provenance
The following attestation bundles were made for authswap-1.0.0-py3-none-win_amd64.whl:
Publisher:
rust-pypi-wheels.yml on shevekwang/authswap
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
authswap-1.0.0-py3-none-win_amd64.whl -
Subject digest:
82a9e8819061f0c9d863718b204acd15a74ad4a03d113001bebce262478479da - Sigstore transparency entry: 1802278486
- Sigstore integration time:
-
Permalink:
shevekwang/authswap@941e60bec8a3eb4f01fd86f868e2ecac01baab47 -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/shevekwang
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
rust-pypi-wheels.yml@941e60bec8a3eb4f01fd86f868e2ecac01baab47 -
Trigger Event:
push
-
Statement type:
File details
Details for the file authswap-1.0.0-py3-none-win32.whl.
File metadata
- Download URL: authswap-1.0.0-py3-none-win32.whl
- Upload date:
- Size: 1.9 MB
- Tags: Python 3, Windows x86
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
39153a02e7579856d6056e5d709e45779f28eb4da53d2bdb9bab11f14709d19a
|
|
| MD5 |
78d47656a9d466ca7da7fbad1e9bcceb
|
|
| BLAKE2b-256 |
05c9226db46cf5ec5fc1b9660da846af82cab8982dfe68a48fd58c18235ccc5e
|
Provenance
The following attestation bundles were made for authswap-1.0.0-py3-none-win32.whl:
Publisher:
rust-pypi-wheels.yml on shevekwang/authswap
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
authswap-1.0.0-py3-none-win32.whl -
Subject digest:
39153a02e7579856d6056e5d709e45779f28eb4da53d2bdb9bab11f14709d19a - Sigstore transparency entry: 1802278556
- Sigstore integration time:
-
Permalink:
shevekwang/authswap@941e60bec8a3eb4f01fd86f868e2ecac01baab47 -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/shevekwang
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
rust-pypi-wheels.yml@941e60bec8a3eb4f01fd86f868e2ecac01baab47 -
Trigger Event:
push
-
Statement type:
File details
Details for the file authswap-1.0.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: authswap-1.0.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 2.3 MB
- Tags: Python 3, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
20133220c297172891621e9e39a8fbe2973f39601ac7da5c1b56ee108c00007e
|
|
| MD5 |
451565297043e6a1f39066b7363b6d0c
|
|
| BLAKE2b-256 |
19e6df7b5fa48316dd423d54343cb807a2d16531bda4598f9820c80ca6430930
|
Provenance
The following attestation bundles were made for authswap-1.0.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:
Publisher:
rust-pypi-wheels.yml on shevekwang/authswap
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
authswap-1.0.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl -
Subject digest:
20133220c297172891621e9e39a8fbe2973f39601ac7da5c1b56ee108c00007e - Sigstore transparency entry: 1802278714
- Sigstore integration time:
-
Permalink:
shevekwang/authswap@941e60bec8a3eb4f01fd86f868e2ecac01baab47 -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/shevekwang
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
rust-pypi-wheels.yml@941e60bec8a3eb4f01fd86f868e2ecac01baab47 -
Trigger Event:
push
-
Statement type:
File details
Details for the file authswap-1.0.0-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl.
File metadata
- Download URL: authswap-1.0.0-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl
- Upload date:
- Size: 2.4 MB
- Tags: Python 3, manylinux: glibc 2.17+ i686
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7ee6acbcaba86e595e3caec0d4912b4cd5bd792a4b80cc1545f096fc7f5a5e0c
|
|
| MD5 |
ef61d4f1f117337ac7dad63afeb6fe49
|
|
| BLAKE2b-256 |
fcdd32102f851f13aef858f0a954e5cd380ccd0d9142039379158e76323b04fb
|
Provenance
The following attestation bundles were made for authswap-1.0.0-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl:
Publisher:
rust-pypi-wheels.yml on shevekwang/authswap
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
authswap-1.0.0-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl -
Subject digest:
7ee6acbcaba86e595e3caec0d4912b4cd5bd792a4b80cc1545f096fc7f5a5e0c - Sigstore transparency entry: 1802278672
- Sigstore integration time:
-
Permalink:
shevekwang/authswap@941e60bec8a3eb4f01fd86f868e2ecac01baab47 -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/shevekwang
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
rust-pypi-wheels.yml@941e60bec8a3eb4f01fd86f868e2ecac01baab47 -
Trigger Event:
push
-
Statement type:
File details
Details for the file authswap-1.0.0-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl.
File metadata
- Download URL: authswap-1.0.0-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
- Upload date:
- Size: 2.0 MB
- Tags: Python 3, manylinux: glibc 2.17+ ARMv7l
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cf58643e00512df91223ae4b0c2049d42373acc9378a6078dbae948bbbb3545e
|
|
| MD5 |
0caf18e35ead53b2a4cfbc3e7fbbb245
|
|
| BLAKE2b-256 |
cfd12141ddf8c7821cd6e1d0db09d334dc4c82605bca830f3b02fa539a0a9c77
|
Provenance
The following attestation bundles were made for authswap-1.0.0-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl:
Publisher:
rust-pypi-wheels.yml on shevekwang/authswap
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
authswap-1.0.0-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl -
Subject digest:
cf58643e00512df91223ae4b0c2049d42373acc9378a6078dbae948bbbb3545e - Sigstore transparency entry: 1802278756
- Sigstore integration time:
-
Permalink:
shevekwang/authswap@941e60bec8a3eb4f01fd86f868e2ecac01baab47 -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/shevekwang
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
rust-pypi-wheels.yml@941e60bec8a3eb4f01fd86f868e2ecac01baab47 -
Trigger Event:
push
-
Statement type:
File details
Details for the file authswap-1.0.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.
File metadata
- Download URL: authswap-1.0.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 2.2 MB
- Tags: Python 3, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5b75ec4b8bb7c32a0495c2b1399a6d1d9f8f41af71d510fe96df12fd94f43c71
|
|
| MD5 |
e5fab90f5d1627226a40f456105c0dd5
|
|
| BLAKE2b-256 |
26a710fbadef6c60bf1b66d8599a957f30d00d3004e0e0d02a8058c158e77e69
|
Provenance
The following attestation bundles were made for authswap-1.0.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:
Publisher:
rust-pypi-wheels.yml on shevekwang/authswap
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
authswap-1.0.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl -
Subject digest:
5b75ec4b8bb7c32a0495c2b1399a6d1d9f8f41af71d510fe96df12fd94f43c71 - Sigstore transparency entry: 1802278803
- Sigstore integration time:
-
Permalink:
shevekwang/authswap@941e60bec8a3eb4f01fd86f868e2ecac01baab47 -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/shevekwang
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
rust-pypi-wheels.yml@941e60bec8a3eb4f01fd86f868e2ecac01baab47 -
Trigger Event:
push
-
Statement type:
File details
Details for the file authswap-1.0.0-py3-none-macosx_11_0_arm64.whl.
File metadata
- Download URL: authswap-1.0.0-py3-none-macosx_11_0_arm64.whl
- Upload date:
- Size: 2.2 MB
- Tags: Python 3, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1670c28da3a6aed8bf38da30c28a6196f1c48a485e0d7384ceafaf9c9df5e99e
|
|
| MD5 |
78052fe7512f171f81bb47749e7d98b3
|
|
| BLAKE2b-256 |
ca9c8631c321982a28250e2fde2666c991254a6ac7abe0e993921045d28823df
|
Provenance
The following attestation bundles were made for authswap-1.0.0-py3-none-macosx_11_0_arm64.whl:
Publisher:
rust-pypi-wheels.yml on shevekwang/authswap
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
authswap-1.0.0-py3-none-macosx_11_0_arm64.whl -
Subject digest:
1670c28da3a6aed8bf38da30c28a6196f1c48a485e0d7384ceafaf9c9df5e99e - Sigstore transparency entry: 1802278647
- Sigstore integration time:
-
Permalink:
shevekwang/authswap@941e60bec8a3eb4f01fd86f868e2ecac01baab47 -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/shevekwang
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
rust-pypi-wheels.yml@941e60bec8a3eb4f01fd86f868e2ecac01baab47 -
Trigger Event:
push
-
Statement type: