Setup
Read when: creating config.json or signing in for the first time.
Install tlnt first; see Install for requirements and install methods.
Configuration
tlnt reads a local config.json and environment variables. Environment
variables take precedence over matching JSON keys. Pass
--config ./config.json before login to select this file. Config selection
is not stored in the session, so repeat the option for later commands that
need values from a non-default file, including a custom session_path or
app_version. client_id is used for OAuth login; later API operations can
still depend on app_version and session_path. The default OS config path
and environment variables need no flag:
tlnt --config ./config.json status --json
The supported values are:
| Environment variable | JSON key | Purpose |
|---|---|---|
TALENTA_CLIENT_ID |
client_id |
Authorized Talenta mobile OAuth client ID. |
TALENTA_APP_VERSION |
app_version |
Talenta mobile app version sent in API headers. |
TALENTA_USER_AGENT_MOBILE |
user_agent_mobile |
Mobile User-Agent sent on every request. Defaults to okhttp/4.12.0, the Talenta app's okhttp agent. |
TALENTA_ACCEPT_LANGUAGE |
accept_language |
Accept-Language sent on every request. Defaults to id-ID; the app sends id-ID or en-EN depending on its language. |
TALENTA_SESSION_PATH |
session_path |
Saved browser session and mobile-token path. |
TALENTA_CDP |
cdp |
DevTools endpoint of a running browser for tlnt login (port, host:port or URL); implies --browser cdp. |
TALENTA_LATITUDE |
latitude |
Default latitude offered by --interactive clock-in and clock-out. |
TALENTA_LONGITUDE |
longitude |
Default longitude offered by --interactive clock-in and clock-out. |
TALENTA_EMAIL |
— | Mekari email for tlnt login --email; same as the flag. |
TALENTA_PASSWORD |
— | Password for tlnt login --email when there is no terminal; read only together with an email, never persisted or logged. |
TALENTA_BEARER |
— | Process-local token override; never persisted. |
Before the first login, create the config file:
tlnt setup
tlnt setup writes config.json to the default OS config path, or to the file
given with --config PATH, and creates its folder. The file lists every JSON
key in the table above: app_version, user_agent_mobile and
accept_language start at tlnt's built-in values, and the other keys are empty, which means not set. Run it
again after tlnt update: it adds new keys, removes keys tlnt no longer reads,
and never changes a value you set. Never commit the file. See
Session for the full behavior.
An authorized Talenta mobile OAuth client ID ships as a built-in default, so
client_id can stay empty. Set it only to override the default with a
different authorized client ID.
Each command compares app_version with the Google Play listing (cached for
24 hours) and, if they differ, prints a notice on stderr recommending you
update app_version, then run tlnt logout and tlnt login. It also checks
PyPI and prints a notice when a newer tlnt is available. Both checks are
skipped for update and stay silent when the lookup fails. See
Install for details.
To upgrade tlnt itself, run tlnt update.
Login
Login is explicit. tlnt login uses Playwright to open your installed Google
Chrome (falling back to Microsoft Edge) in a visible window. No browser is
downloaded. You enter your credentials on Mekari's page, or let tlnt type them
there (see Sign in from the terminal):
tlnt --config ./config.json login --json
Sign in with a browser you already run
tlnt login --cdp ENDPOINT attaches to a browser that is already running with a
DevTools port instead of launching one. tlnt opens one tab in it, you sign in on
Mekari's page, and tlnt closes only that tab; the browser and your other tabs
stay open.
Chrome. Start Chrome with a DevTools port and a dedicated profile folder (Chrome 136 and later ignore the port on the default profile) and leave it running:
"/Applications/Google Chrome.app/Contents/MacOS/Google Chrome" \
--remote-debugging-port=9222 --user-data-dir="$HOME/.tlnt-chrome"
In another terminal, attach and sign in:
tlnt --config ./config.json login --cdp 9222
The profile folder is new, so you sign in once and its cookies are kept for later logins. Other Chromium browsers should accept the same flag with their own binary, but only Chrome and agent-browser have been verified.
agent-browser. Start a visible session, attach with its CDP URL, and close the session afterwards:
agent-browser --session tlnt-login --headed open about:blank
tlnt --config ./config.json login --cdp "$(agent-browser --session tlnt-login get cdp-url)"
agent-browser --session tlnt-login close
The window starts with an empty profile, so you sign in there.
--cdp accepts a port (9222), host:port, or an http(s):// or ws(s)://
URL. To attach without passing the flag, set TALENTA_CDP=9222 (or
"cdp": "9222" in config.json); pass --browser chrome to launch Chrome or
Edge again.
Switched from Camoufox? Free about 1 GB with uvx camoufox remove.
Login never persists passwords. A password stored by tlnt 1.2 or earlier is not removed for you; see Security.
Sign in from the terminal
tlnt login --email you@example.com asks for your Mekari password with a hidden
prompt, opens Chrome or Edge, types both into Mekari's own sign-in page and
submits it once. The rest of the login is unchanged. There is no --password
flag, so the password never appears in your shell history or the process list.
tlnt --config ./config.json login --email you@example.com
Set TALENTA_EMAIL to leave the flag out. On a host with no terminal to type
into, set TALENTA_PASSWORD in the service's own environment or secret manager,
never inline in a command, in chat or in a file in the repository. It is read
only together with an email. Anyone who can read that process's environment can
read it, and it unlocks your whole Mekari account, not only Talenta.
If Mekari asks for anything else (a captcha, a verification code, a Google
sign-in) or does not accept the password within 60 seconds, login fails with
login_failed. Run tlnt login without --email and sign in yourself.
No display
On a server or in a container with no display, add --headless. tlnt runs
Chrome without a window and signs in with the same email and password. Install
Chrome or Edge with your package manager first; tlnt never downloads a browser.
tlnt --config ./config.json login --email you@example.com --headless --json
With no terminal on the host, set TALENTA_PASSWORD in the service's own
environment first. Mekari may answer an automated sign-in with a captcha or a
verification code, which no window can answer, and login then fails with
login_failed. Sign in with a browser you can see instead: tlnt login where
you have a screen, or --cdp to a visible browser (see above).