Metadata-Version: 2.4
Name: tlnt-cli
Version: 1.6.0
Summary: CLI wrapper for HRIS attendance and employment workflows.
Author: Fathiraz Arthuro
License-Expression: MIT
License-File: LICENSE
Requires-Dist: httpx>=0.28,<0.29
Requires-Dist: loguru>=0.7,<1
Requires-Dist: platformdirs>=4.3,<5
Requires-Dist: playwright>=1.50,<2
Requires-Dist: rich>=14,<16
Requires-Dist: rich-pixels>=3,<4
Requires-Dist: typer>=0.20,<1
Requires-Python: >=3.11, <3.15
Description-Content-Type: text/markdown

![tlnt CLI logo](assets/logo.png)

# tlnt

![CI](https://github.com/fathirazarthuro/tlnt/actions/workflows/ci.yml/badge.svg)
![License](https://img.shields.io/github/license/fathirazarthuro/tlnt)

`tlnt` is a Python CLI wrapper for Mekari Talenta employment data,
notifications, attendance summaries and previews, and human-confirmed attendance actions.

> [!WARNING]
> `tlnt` is an unofficial, independent research and educational project. It
> is not affiliated with Mekari or Talenta. Use it only when your account and
> the actions you perform are authorized. Read the [full bilingual
> disclaimer](docs/index.md#disclaimer) before using it.

## Install

```bash
uv tool install tlnt-cli
```

Or use `pipx install tlnt-cli` or `pip install tlnt-cli`. PyPI refuses the name
`tlnt` as too similar to an existing project, so the package is `tlnt-cli`; the
command is still `tlnt`. It requires Python 3.11–3.14, with uv as the recommended
package manager. Browser login requires Google Chrome or Microsoft Edge, or a
compatible running browser over CDP.

Run `tlnt update` to install the latest release. See [Install](docs/install.md)
for other install methods, the version notices, and upgrading from tlnt 1.5.0
or earlier.

## Quick start

```bash
tlnt setup         # create config.json, then set client_id in it
tlnt login         # sign in through Chrome or Edge
tlnt status --json
tlnt profile
tlnt attendance clock-in --dry-run --latitude LATITUDE --longitude LONGITUDE
```

Ask the project maintainers for `client_id`. [Setup](docs/setup.md) covers the
config keys and every way to sign in: through a browser you already run
(`--cdp`), from the terminal (`--email`), and on a host with no display
(`--headless`).

## Use tlnt from scripts and agents

Human-readable tables are the default. Add `--json` to write one result object
to stdout; version notices and diagnostics go to stderr. Exit code `0` means
success, `1` an operational failure, and `2` invalid arguments. Check `code`
before reading `data`; the codes are listed in
[Overview](docs/overview.md#stable-result-codes).

Set `TALENTA_READONLY=1` when a script or an agent must never change anything:
every write then stops with `read_only_mode` before any prompt or request.

```bash
TALENTA_READONLY=1 tlnt notification attendance-list --json
```

Agents should install the [agent skill](skills/tlnt-cli/SKILL.md) and read
[Integrations](docs/integrations.md), which also shows how to call tlnt from
an MCP client.

## Commands

| Area | What it covers |
| --- | --- |
| [Session](docs/session.md) | `setup`, `login`, `logout`, `status`, `profile`. |
| [Attendance](docs/attendance.md) | Clock-in and clock-out previews and actions, summaries, approval. |
| [Notification](docs/notification.md) | Inbox counts, lists and details. |
| [Time off](docs/timeoff.md) | Balances, requests, cancellations and approval. |
| [Calendar](docs/calendar.md) | Holidays, time off, birthdays and activity. |
| [Install](docs/install.md) | `update` and the version notices. |

The full command map, global options and output modes are in
[Overview](docs/overview.md), or run `tlnt --help`.

## Safety contract

- Do not open the login flow automatically.
- Never ask the user for their Mekari password. Only they start
  `tlnt login --email`, and the password comes from a hidden prompt or from
  `TALENTA_PASSWORD` in the host's own environment.
- Live clock-in, clock-out, approval, time-off requests, and cancellations
  always ask for confirmation. The prompt reads standard input, so it guards
  against mistakes, not scripts; use `TALENTA_READONLY=1` for that.
- `--dry-run` never submits attendance.
- `TALENTA_READONLY=1` refuses every command that would change Talenta or
  local state.
- The version checks only read public listings (PyPI and Google Play), never
  send your session or config, and never log out, log in, or update for you.
- Never print passwords, bearer tokens, cookies, authorization codes, request
  bodies, selfie contents, or real employee data.
- If `status` returns `session_missing`, `session_invalid`,
  `mobile_token_missing`, or `mobile_token_expired`, ask
  the user to run login explicitly.

## Documentation

- [Docs site](https://tlnt-docs.vercel.app)
- [Install](docs/install.md) and [Setup](docs/setup.md)
- [Overview](docs/overview.md): commands and the JSON contract
- [Workflows](docs/workflows.md)
- [AI agent integrations](docs/integrations.md)
- [Security](docs/security.md)
- [Contributing](docs/contributing.md)
- [Agent skill](skills/tlnt-cli/SKILL.md)

## Development

```bash
uv sync --group dev --group docs
uv run pytest
uv run --group docs mkdocs build --strict
```

Read [Contributing](docs/contributing.md) before changing public behavior.

## License

`tlnt` is licensed under the [MIT License](LICENSE).
