Flex2Rijk CLI
Automatiseert de login op flex2rijk.nl:
- Cross-platform: Werkt op macOS, Windows en Linux.
- Veilig: Slaat credentials op in je systeem-keychain (macOS Keychain, Windows Credential Manager, Linux Secret Service) via
keyring. - Modern: Volledig herschreven in moderne Python (Pathlib, Type Hinting).
- Robuust: Bevat unit tests met 100% coverage en strikte linting (Ruff, MyPy, Bandit).
Disclaimer
Let op: Deze tool is geen officieel product van Flex2Rijk of de betrokken overheidsinstanties. De auteur is op geen enkele wijze geassocieerd met flex2rijk.nl.
- Geen Support: Deze tool wordt geleverd "as-is" zonder enige vorm van garantie of support.
- Eigen Risico: Het gebruik van deze tool is volledig voor eigen risico. De auteur is niet verantwoordelijk voor eventuele schade, verlies van gegevens, of beveiligingsincidenten (zoals het verlies van wachtwoorden).
- Doel: Deze tool is uitsluitend bedoeld om de login-flow te automatiseren voor gebruikers die reeds rechtmatige toegang hebben tot de Flex2Rijk-omgeving.
Installatie
1. Installeer de tool (via uv)
De makkelijkste manier is via uv. Dit installeert de tool in een geïsoleerde omgeving:
uv tool install flex2rijk
2. Setup credentials (eenmalig)
Sla je gebruikersnaam en wachtwoord veilig op in je systeem-keychain:
flex2rijk --setup
Sla je niets op, dan vraagt de tool bij elke login om je gebruikersnaam en wachtwoord. Eerder opgeslagen gegevens verwijder je met flex2rijk --setup --no-store.
Heb je de setup gedaan met versie 0.1.0? Op macOS zet de eerstvolgende login je wachtwoord vanzelf over naar de strengere toegangsregels hieronder. Op Linux haalt flex2rijk --setup het wachtwoord weg dat versie 0.1.0 onversleuteld in ~/.local/share/python_keyring/keyring_pass.cfg kon zetten.
Hoe je wachtwoord wordt bewaard
- macOS: het wachtwoord staat in je Keychain, zonder vertrouwde apps. Bij elke login vraagt macOS of
securityhet mag uitlezen. Kies Sta toe om alleen deze keer toegang te geven. Kies je Sta altijd toe, dan kan elk proces op je Mac het wachtwoord voortaan zonder vragen uitlezen. Die keuze is aan jou. - Linux: het wachtwoord staat in de Secret Service (GNOME Keyring, KWallet). Is er geen Secret Service, bijvoorbeeld op een server of in WSL, dan weigert de tool op te slaan in plaats van het wachtwoord onversleuteld in een bestand te zetten. Sla de setup dan over: bij elke login vraagt de tool om je gegevens.
- Windows: het wachtwoord staat in Windows Credential Manager.
Op Linux en Windows kan elk proces dat onder jouw account draait het opgeslagen wachtwoord lezen zolang je bent ingelogd. Een toestemmingsvraag per uitlezing bestaat daar niet. Wil je dat niet, gebruik dan --no-store.
Gebruik
# Start login (browser op achtergrond)
# Bij de eerste keer wordt Chromium automatisch geïnstalleerd
flex2rijk
# Debug modus (browser zichtbaar)
flex2rijk --no-headless
# OneSpan token direct meegeven
flex2rijk 123456
Ontwikkeling
Installeren vanaf source
Als je de tool wilt aanpassen of testen vanaf de broncode:
git clone https://github.com/tijnschouten/flex2rijk.git
cd flex2rijk
uv tool install .
Development omgeving setup
uv sync --all-groups
uv run pre-commit install
Tests & Checks draaien
# Draai alle unit tests
uv run pytest
# Draai alle linters en formatters
uv run pre-commit run --all-files
CI/CD & Publicatie
Dit project gebruikt GitHub Actions voor automatische tests en publicatie naar PyPI.
Automatische Publicatie (Trusted Publishing)
Om automatisch te publiceren naar PyPI wanneer je een nieuwe tag aanmaakt (bijv. v0.1.0):
- Ga naar je PyPI account settings.
- Voeg een GitHub Publisher toe voor dit repository:
- GitHub Repository Owner: Je username.
- Repository Name:
flex2rijk. - Workflow Name:
pypi-publish.yml. - Environment Name:
release.
- Wanneer je een tag pusht, zal de GitHub Action de tool automatisch builden en uploaden naar PyPI.
Troubleshooting
- "os.startfile niet beschikbaar": Gebeurt alleen als je op een niet-Windows systeem probeert de Windows flow te forceren.
- Loginformulier niet herkend: Run met
--no-headlessom te zien waar Playwright blijft hangen. - ICA opent niet op Linux: Zorg dat
xdg-opencorrect geconfigureerd is voor.icabestanden.
Metadata
Release files for flex2rijk 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| flex2rijk-0.2.0.tar.gz | 92.1 kB | With provenance | Details for flex2rijk-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| flex2rijk-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for flex2rijk-0.2.0-py3-none-any.whl |
Total release size: 103.1 kB
Release files / flex2rijk-0.2.0.tar.gz
| Download URL | flex2rijk-0.2.0.tar.gz |
|---|---|
| Size | 92.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8e8fce283e382ce49d071a7e0a89fb4847db771fa3f4e1b3b6887b8860122d0d
|
|
BLAKE2b-256 checksum How to use checksums |
86fd931046d6d4e27d58083298ed66427d4fb1c06464ab1ef81ebce299d41dd1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 16, 2026.
Transparency logRelease files / flex2rijk-0.2.0-py3-none-any.whl
| Download URL | flex2rijk-0.2.0-py3-none-any.whl |
|---|---|
| Size | 11.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d3ad22866e4d613064131c2467627d6597b0ca4a22b86be488357d8d6c286676
|
|
BLAKE2b-256 checksum How to use checksums |
1d30f79bcf39f1b0bb0f6b5d4855dedb17307f9feafd16373b13979ea430e5af
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 16, 2026.
Transparency logSecurity for flex2rijk 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for flex2rijk-0.2.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 16, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.