Metadata-Version: 2.5
Name: edays-cli
Version: 0.3.0
Summary: Command-line client for the eDays leave/absence system (holiday, home office, team calendar)
Project-URL: Homepage, https://github.com/xdoko01/edays-cli
Project-URL: Repository, https://github.com/xdoko01/edays-cli
Project-URL: Issues, https://github.com/xdoko01/edays-cli/issues
Author: Otakar Dokoupil
License: MIT
License-File: LICENSE
Keywords: absence,cli,e-days,edays,holiday,leave
Classifier: Environment :: Console
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Utilities
Requires-Python: >=3.11
Requires-Dist: click>=8.1
Requires-Dist: playwright>=1.44
Requires-Dist: requests>=2.32
Requires-Dist: rich>=13.0
Requires-Dist: tomli-w>=1.0
Provides-Extra: dev
Requires-Dist: pytest-mock>=3.14; extra == 'dev'
Requires-Dist: pytest>=8.0; extra == 'dev'
Description-Content-Type: text/markdown

# edays-cli

Command-line client for the [eDays](https://www.e-days.com) leave/absence system.
Read your own or your team's calendar, and book or cancel Holiday / Home Office
absences without opening the web app.

- Works with any eDays instance — the instance URL, absence types and team roster
  live in your local config file, nothing is hard-coded.
- Signs in through your organisation's normal SSO in a real browser window; the
  captured session is reused until it expires.
- JSON output by default (script- and AI-agent-friendly), tables with `--pretty`.

## Install

```
uv tool install edays-cli
edays install-browser        # one-time: downloads Chromium for the SSO login
```

or `pip install edays-cli`. Requires Python 3.11+.

## Quick start

```
edays read                   # first run creates ~/.edays-cli/config.toml and says so
# edit the config: set [edays] base_url to your eDays address
edays login                  # sign in via SSO in the browser window
edays --pretty absence-types # list bookable types, then map the ones you use:
edays absence-types --add holiday=123 --add "home-office=Home Office"
edays --pretty team sync     # managers: add your direct reports to the roster
edays --pretty read --month 2026-11
edays book holiday 2026-12-22 --to 2026-12-31 --dry-run
edays book home-office 2026-11-05 --day-part pm   # half day (afternoon)
```

Global flags (`--pretty`, `--quiet`, `--config`) go **before** the subcommand.

| Command | Purpose |
|---|---|
| `edays install-browser` | One-time Chromium download for `login` |
| `edays login` | Browser SSO sign-in; saves the session |
| `edays whoami` | Profile + entitlement; session check |
| `edays team` | Configured team roster |
| `edays team sync` / `find` / `add` | Fill the roster from eDays (no manual ID lookup) |
| `edays absence-types` | List bookable absence types; `--add` maps kinds for `book` |
| `edays read` | Month calendar: absences + public holidays |
| `edays book KIND DATE` | Book an absence (precheck + confirm); `--day-part am\|pm` for half days |
| `edays cancel RECORD_ID` | Cancel an absence record |

## Documentation

Full installation, configuration and command reference: **[docs/manual.md](docs/manual.md)**.

## Development

```
git clone https://github.com/xdoko01/edays-cli && cd edays-cli
uv run --extra dev pytest                    # offline unit tests
uv run --extra dev pytest -m integration     # live test; needs `edays login` first
```

## Disclaimer

Unofficial tool, not affiliated with or endorsed by eDays. It uses the same internal
API as the eDays web application, which may change without notice.

## License

MIT
