Metadata-Version: 2.4
Name: ot-gcc-get-token
Version: 0.1.1
Summary: Launch Chrome/Edge, wait for OIDC login to the AWS Agentic Wizard, and print the access token to stdout.
Classifier: Programming Language :: Python :: 3
Classifier: Operating System :: OS Independent
Requires-Python: >=3.8
Description-Content-Type: text/markdown
Requires-Dist: playwright>=1.40

# ot-gcc-get-token

Opens Chrome, Chromium, or Edge with a dedicated profile, waits for you to sign in to the
AWS Agentic Wizard (OIDC), then prints the access token to **stdout**. All
status messages go to stderr, so it is safe to use in scripts.

## Install

```
pip install ot-gcc-get-token
```

## Usage

```
ot-gcc-get-token --wizard-url https://your-wizard.example.net/
export WIZARD_URL=https://your-wizard.example.net/
ot-gcc-get-token
TOKEN=$(ot-gcc-get-token)
```

There is no built-in wizard URL. Supply `--wizard-url` or set the `WIZARD_URL`
environment variable; the command reports an error if neither is provided.
The command-line option takes precedence over the environment variable.
The browser profile is stored in `~/.aws-agentic-wizard`, so you stay signed
in between runs.

Playwright is only used to attach to the browser over CDP (port 9222); no
Playwright browser download is required.

### Browser discovery

On Windows, the command checks the standard Chrome and Edge installation
paths, then searches `PATH`.
On Linux, install Chrome, Chromium, or Edge and ensure one of these executables
is on `PATH`: `google-chrome`, `google-chrome-stable`, `chromium`,
`chromium-browser`, `microsoft-edge`, or `microsoft-edge-stable`.
The executable names `chrome` and `msedge` are also recognized.
A graphical desktop session is required for interactive sign-in; headless-only
Linux servers are not supported by this login flow.

## Publishing

Build fresh distributions and validate them before uploading:

```
python -m pip install --upgrade build twine
python -m build
python -m twine check dist/ot_gcc_get_token-0.1.1.tar.gz dist/ot_gcc_get_token-0.1.1-py3-none-any.whl
python -m twine upload --repository-url https://upload.pypi.org/legacy/ dist/ot_gcc_get_token-0.1.1.tar.gz dist/ot_gcc_get_token-0.1.1-py3-none-any.whl
```

Use `__token__` as the username and your PyPI API token as the password when
prompted. Do not put tokens in source files or command-line arguments.
PyPI does not allow replacing an existing release file; use a new version for
each release. Upload only the explicitly named files, not older distributions.
