Skip to main content

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

kolay_cli-0.1.0.tar.gz (13.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

kolay_cli-0.1.0-py3-none-any.whl (14.2 kB view details)

Uploaded Python 3

File details

Details for the file kolay_cli-0.1.0.tar.gz.

File metadata

  • Download URL: kolay_cli-0.1.0.tar.gz
  • Upload date:
  • Size: 13.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.1

File hashes

Hashes for kolay_cli-0.1.0.tar.gz
Algorithm Hash digest
SHA256 975689d1116379f100ff4e24c05f3d5fbfc88ea244a24b97ce2dc289acea260a
MD5 c655e8aeaba1c345e20795e212a41cfb
BLAKE2b-256 9b6de28f6db1ffbdd6bbed5a11bf52b701d2ccc7eec2d2f2c5b1c8ba08ec52d7

See more details on using hashes here.

File details

Details for the file kolay_cli-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: kolay_cli-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 14.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.1

File hashes

Hashes for kolay_cli-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7707c7f45a81c70dd11e86c586b1fcee8313cf776250e06123274f2164082206
MD5 9e3a97486eef41e72e40f75a13395f35
BLAKE2b-256 9824bc685af04be1ec8124bd6a5b4418e9ef1411daace8ac65bcf757634c6510

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page