Metadata-Version: 2.5
Name: edays-cli
Version: 0.6.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: tomlkit>=0.12
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, see who is off this week and which requests
are still waiting for approval, check remaining holiday, 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`.
- **Private by default:** sick leave (and any other absence type you mark as sensitive)
  is kept out of every output, so it is not shared with an AI assistant or a script.

## 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+.

> **Windows + Claude desktop app:** set the user environment variable
> `UV_TOOL_DIR=%USERPROFILE%\.uv-tools` *before* installing, or the install made from
> inside Claude won't work in a normal terminal. See the
> [manual](docs/manual.md#windows-installing-from-the-claude-desktop-app).

## 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 --usable   # 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 --pretty team absences # who is off this week (person x day grid)
edays --pretty pending       # requests waiting for your approval + pending in the team
edays --pretty entitlement --team         # remaining holiday for everyone
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`, `--show-sensitive`) 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 + remaining holiday; session check |
| `edays entitlement` | Remaining / yearly entitlement for you, `--for NAME` or `--team` |
| `edays team` | Configured team roster |
| `edays team sync` / `find` / `add` | Fill the roster from eDays (no manual ID lookup) |
| `edays team absences` | Who is off: you + roster for a `--week`, `--date` or `--from/--to` range |
| `edays absence-types` | List bookable absence types (`--usable` checks them); `--add` maps kinds for `book` |
| `edays read` | Absences (with approval status) + public holidays for a `--month` or a `--from/--to` range |
| `edays pending` | Absences awaiting approval: your approval queue + pending requests of you and the roster |
| `edays book KIND DATE` | Book an absence (precheck + confirm); `--day-part am\|pm` for half days |
| `edays cancel RECORD_ID` | Cancel an absence record |

## Sensitive data

Absences whose name contains *sick*, *illness* or *ill health* are treated as sensitive
(health data). `read`, `team absences` and `pending` leave them out, `absence-types` never says
whether one was used recently, and `entitlement` / `book` refuse sensitive types. Add
more types, or show them as *Unavailable* instead of hiding them, in the config:

```toml
[privacy]
sensitive_types = ["*medical*", "*maternity*", 999]   # name patterns or type IDs
mode = "hide"                                         # or "redact"
```

To see them yourself, use the eDays web app, or run `edays --show-sensitive ...` in a
terminal: it asks for confirmation and refuses to run without an interactive terminal,
so an AI tool call cannot switch the protection off. Details:
[manual §1.3](docs/manual.md#13-sensitive-data-protection).

## 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
