Command-line interface for Kolay IK (https://apidocs.kolayik.com)
Project description
Kolay CLI
+************
+*+ **+
+*+ +*+ %% #%%
+*+ +*+ %% *#* #%%# #%% #%%#*#*+** **+
+**+ +*+ %% #%%* %%%##%%% #%% %%%#*%%%% %%# #%%
**+ +**+ %%%%# %%# %%##%%#%% %%% %%##%%#
+*+ +*++*+ %%#%%# %%% %%##%%*%% #%% %%%%#
+*+ ** +*+ %% #%% *%%%%%%# #%% #%%%%%%%% *%%%
+*+** **+ #%%
+************ #%%%
A powerful, user-friendly command-line interface for the Kolay IK API. Manage your HR operations directly from the terminal.
✨ Features
| Module | Commands | Description |
|---|---|---|
| Auth | login, status |
Securely store and manage your API token |
| Person | list, view, leave-status, terminate |
List employees, view structured profiles, check leave balances, terminate with SGK codes |
| Leave | list, view, create |
List leave records, view details, create leaves with interactive type picker |
Highlights
- 🎨 Rich terminal output — Structured tables, panels, and color-coded statuses
- 🔐 Secure token storage — Config file with restricted permissions (
0600) - 🇹🇷 Turkish HR aware — SGK termination codes, DD.MM.YYYY date format support
- ⚡ Smart prompts — Leave type picker, today's date defaults, active employee pre-checks
📦 Installation
Using pipx (Recommended)
pipx install kolay-cli
From source
git clone https://github.com/ezapmar/kolay-cli.git
cd kolay-cli
pip install -e .
🚀 Quick Start
1. Authenticate
Generate an API token from Kolay Developer Settings, then:
kolay auth login
2. List your employees
kolay person list
3. View someone's profile
kolay person view <person-id>
4. Check leave balances
kolay person leave-status <person-id>
5. Create a leave request
kolay leave create
The CLI will interactively show available leave types and let you pick by number.
📖 Command Reference
Auth
kolay auth login # Save your API token (prompted securely)
kolay auth status # Check if you're logged in
Person
kolay person list # List active employees
kolay person list --status inactive # List inactive employees
kolay person list --page 2 # Paginate results
kolay person view <id> # Structured profile view
kolay person leave-status <id> # Leave balances table
kolay person terminate <id> # Terminate with SGK reason codes
Leave
kolay leave list # List approved leaves (current year)
kolay leave list --status waiting # List pending leaves
kolay leave list --person-id <id> # Filter by person
kolay leave list --start-date "2025-01-01 00:00:00" --end-date "2025-12-31 23:59:59"
kolay leave view <leave-id> # View leave record details
kolay leave create # Interactive leave creation
⚙️ Configuration
The CLI stores its configuration at ~/.config/kolay/config.json with restricted file permissions.
You can also use environment variables (they take precedence):
export KOLAY_API_TOKEN="your-token-here"
export KOLAY_BASE_URL="https://api.kolayik.com" # optional
🛠 Development
# Clone and setup
git clone https://github.com/ezapmar/kolay-cli.git
cd kolay-cli
python -m venv .venv
source .venv/bin/activate # or .venv\Scripts\activate on Windows
pip install -e .
# Run
kolay --help
📄 License
This project is licensed under the MIT License — use it freely, modify it, share it. See the LICENSE file for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file kolay_cli-0.3.0.tar.gz.
File metadata
- Download URL: kolay_cli-0.3.0.tar.gz
- Upload date:
- Size: 15.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1cd94ff1f543623a8332ff5f6da4f6c5df24ec03b85d5c44fa1e673ff4115d01
|
|
| MD5 |
31c9ea255762f0aed35e1dd099baf79d
|
|
| BLAKE2b-256 |
18ee15bb2d53092cdf82ca09082923b1db9bc0e6ec416c901be6f4eeabefdbfd
|
File details
Details for the file kolay_cli-0.3.0-py3-none-any.whl.
File metadata
- Download URL: kolay_cli-0.3.0-py3-none-any.whl
- Upload date:
- Size: 17.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7b9509a346936a8535009526034cec455ed030fa13251bf0519e1c2b3fa3311a
|
|
| MD5 |
3d2877d002eddd38e370d3841523c967
|
|
| BLAKE2b-256 |
864f40eeed95644320e9145681231cbe72392ac7818455522b8b4f5ab2d7f13e
|