{"id":20259333,"url":"https://github.com/mdminhazulhaque/kakitangan-cli","last_synced_at":"2026-06-05T03:32:09.926Z","repository":{"id":149138098,"uuid":"189791636","full_name":"mdminhazulhaque/kakitangan-cli","owner":"mdminhazulhaque","description":":briefcase: CLI for Kakitangan app, the online HR Software for Malaysian businesses","archived":false,"fork":false,"pushed_at":"2020-03-02T06:22:09.000Z","size":64,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-14T04:11:58.604Z","etag":null,"topics":["csrf","hr","kakitangan","malaysia","python3","tabulate"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mdminhazulhaque.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-06-02T01:06:46.000Z","updated_at":"2023-10-01T10:08:07.000Z","dependencies_parsed_at":"2023-09-03T00:19:59.722Z","dependency_job_id":null,"html_url":"https://github.com/mdminhazulhaque/kakitangan-cli","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdminhazulhaque%2Fkakitangan-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdminhazulhaque%2Fkakitangan-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdminhazulhaque%2Fkakitangan-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdminhazulhaque%2Fkakitangan-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mdminhazulhaque","download_url":"https://codeload.github.com/mdminhazulhaque/kakitangan-cli/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241719891,"owners_count":20008882,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["csrf","hr","kakitangan","malaysia","python3","tabulate"],"created_at":"2024-11-14T11:14:16.880Z","updated_at":"2025-12-03T06:04:48.712Z","avatar_url":"https://github.com/mdminhazulhaque.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"[Kakitangan](https://www.kakitangan.com/platform.html) is an online HR Software for Malaysian businesses that helps handle payroll, claims, benefits, leave and more.\n\nYou can easily use the web version, or if you prefer, they have both [Android](https://play.google.com/store/apps/details?id=com.kakitangan\u0026hl=en) and [iOS](https://itunes.apple.com/my/app/kakitangan/id1358869881) version too.\n\n# Why CLI Version?\n\nYou can ask me why I made this CLI version although they have a nice web and mobile version. Well, people like me prefer CLI than GUI. Also, I wanted to learn how Python module works. So I decided to turn this into a pet project.\n\n# Who Can Be Benefited From This\n\n* If you are a project manager and need to frequently check who is on leave next week\n* If you are a manager, you can get details who are on leave on a specific day before arranging any session\n* If you are a simple developer, you can sniff on your colleagues and surprise them\n* If you are a human resource person, you can get statistics on who makes the best use leave policies\n\n# Requirments\n\nAs written in Python3, the following modules are needed. Install using `pip3 install -r requirments.txt`\n\n- [x] appdirs\n- [x] click\n- [x] tabulate\n\n# Security?\n\nI know. I know. You are damn worried about the security of your Kakitangan account. At least I am not going to store your password in plaintext as Google or Facebook did. \u003cspan style=\"color:red\"\u003eThis CLI app asks for your password once, tries to get an authorization token from Kakitangan API and ONLY saves the following things on your disk. It even asks for your password via stdin and hides the prompt so no trace is left in your bash history.\u003c/span\u003e\n\n* username\n* sessionid\n* authorizationtoken\n* csrftoken\n\nThere is no way to get your password recovered from these 4 values.\n\n# FAQ\n\nThere is no way to get your pa* How does this app work?\n    * The same way Kakitangan's web app works, using GET and POST requests to their API endpoints. Most of then return JSON so I did not have to use parse HTML.\n* Is there any API documentation for Kakitangan?\n    * AFAIK, no. I had to trace their API calls via Chrome DevTools and figured out by myself how they work.\n* Is this CLI app safe to use?\n    * This app saves nothing but the `sessionid` and `authorizationtoken`, same as your web browser does. It never stores the password.\n* My question is not answered.\n    * Send me an email or post a new issue in this repository.\n \n# How To Use It?\n\nI am currently working to distribute this via `setuptools`. Before that, you can download the repo and execute the `kakitangan.py` as the main file. The default commands are given below.\n\n```\n$ kakitangan.py --help\nUsage: kakitangan.py [OPTIONS] COMMAND [ARGS]...\n\nOptions:\n  --help  Show this message and exit.\n\nCommands:\n  aboutme      Shows personal information as Kakitangan user\n  colleagues   Shows colleagues' leaves\n  holidays     Shows holidays\n  loadleaves   Fetches all calendar information from Kakitangan server\n  login        Login and save authorization token in disk\n  logout       Logs out by clearing authorization token from disk\n  myleaves     Shows user's leaves\n  myleavestat  The user's leave statistics\n```\n\nFirst, you have to log in, right? You have to pass the username/email via `-u` option. The password will be prompted and will be invisible as you type it. The password can also be passed via `-p` option but I tell you not to do so. Your password will be stored in `.bash_history` which would be a serious security issue.\n\n```\n$ kakitangan.py login -u john.doe@dream.job\nPassword: **********\nLogin success\n\n$ kakitangan.py login -u john.doe@dream.job -p 1234567890\nLogin success\n```\n\nIf your password is correct and you have an internet connection, you are supposed to see the `Login success` message. Use the `aboutme` option to see your basic info.\n\n```\n$ kakitangan.py aboutme\n---------------------  -------------------------------\nEmail                  john.doe@dream.job\nOfficial Full Name     John Doe\nNationality            Bangladesh\nHighest Qualification  Bachelors Degree\nSOCSO Account          1234567890\nBank Account           1234567890\nBank Account Type      saving\nBank Account Name      AABBCCDD\nIncome Tax Account     1234567890\nSalary                 1234567890\nPreferred Name         John\nSex                    Male\nMarital Status         married\nActive                 True\nBirth Date             1994-01-23\nPhone                  1234567890\nNRIC Number            1234567890\nPassport Number        BB12345678\nEmployee ID            1000\nJoined                 1970-01-01\nManager                boss@dream.job\nPosition               DevOps\nDepartment             Tech\nLocation               Kuala Lumpur\n---------------------  -------------------------------\n```\n\nThat's enough for you I guess. Let's move to the leave calendar which is the best feature of Kakitangan. Before executing any calendar related command, you have to download the full calendar from Kakitangan server. `loadleaves` option will do it for you.\n\n```\n$ kakitangan.py loadleaves\nUpdated leave database\n```\n\nAfter doing so, you will find 3 new JSON files in `~/.config/kakitangan-cli` named `load_calendar.json`, `load_colleagues.json` and `load_holiday_event.json`. This 3 calendar holds data for yourself, your colleagues, and holidays respectively.\n\nNow you are ready to get your colleagues' leave summary. The `colleagues` command takes several parameters.\n\n```\nUsage: kakitangan.py colleagues [OPTIONS]\n\n  Shows colleagues' leaves\n\nOptions:\n  -a, --all          Show past leaves also\n  -t, --today        Show leaves only on today\n  -u, --untill TEXT  Show leaves upto date\n  -s, --since TEXT   Show leaves from date\n  -d, --date TEXT    Show leaves on specific date\n  --help             Show this message and exit.\n```\n\nBy default, it will show leaves AFTER the current date. You can see all leaves with `-a` parameter.\n\n```\n$ kakitangan.py colleagues\n----------  --------------\n2019-06-03  Abdul Doe (Annual)\n            Alice Begum (Marriage Leave)\n2019-06-04  Abdul Doe (CarryForward)\n            Charlie Ahmed (Annual)\n            Foo Bin Bar (Annual)\n            Alice Begum (Sick)\n2019-06-10  Foo Bin Bar (Sick)\n            Bob Mia (Birthday Leave)\n2019-06-11  Bob Mia (Sick)\n2019-06-12  Bob Mia (Sick)\n2019-06-13  Bob Mia (Annual)\n2019-06-14  Clara Khatun (Annual)\n            Bob Mia (Annual)\n2019-06-15  Clara Khatun (CarryForward)\n2019-06-16  Clara Khatun (CarryForward)\n2019-06-17  Clara Khatun (Annual)\n            Bob Mia (Replacement)\n2019-06-18  Bob Mia (Annual)\n----------  --------------\n```\n\nIt is possible to see who are on leave on a specific date. Just pass the date in `YYYY-MM-DD` format with `-d` parameter.\n\n```\n$ kakitangan.py colleagues -d 2019-06-10\n----------  -----------\n2019-06-10  Foo Bin Bar (Sick)\n            Bob Mia (Birthday Leave)\n----------  -----------\n```\n\nYou might want to filter colleagues within specific date range. Just use the `-s` (since) and `-u` (until) parameter.\n\n```\n$ kakitangan.py colleagues -s 2019-06-15 -u 2019-06-17\n----------  ------------\n2019-06-15  Clara Khatun (Annual)\n2019-06-16  Clara Khatun (Annual)\n2019-06-17  Clara Khatun (Annual)\n            Bob Mia (Annual)\n----------  ------------\n```\n\nSimilar to the leave calendar, you can check your holidays too. Use the `holidays` option for this purpose.\n\n```\n$ kakitangan.py holidays \n----------  ----------------------------\n2019-06-05  Hari Raya Aidilfitri\n2019-06-06  Hari Raya Aidilfitri Holiday\n2019-08-11  Hari Raya Haji\n2019-08-12  Hari Raya Haji\n2019-08-31  Merdeka Day\n2019-09-01  Awal Muharram\n2019-09-02  Awal Muharram\n2019-09-09  Agong's Birthday\n2019-09-16  Malaysia Day\n2019-10-27  Deepavali\n2019-10-28  Deepavali\n2019-11-09  Prophet Muhammad's birthday\n2019-12-25  Christmas\n----------  ----------------------------\n```\n\nAs I said earlier, filtering hides old leaves/events. So you have to pass `-a` to see full holiday list.\n\n```\n$ kakitangan.py holidays -a\n----------  ---------------------------------------------------------\n2015-01-01  New Year\n2015-01-02  New Year\n2015-01-03  New Year\n...\n2017-06-25  Hari Raya Aidilfitri\n2017-06-26  Hari Raya Aidilfitri\n2017-06-27  Hari Raya Aidilfitri\n...\n2019-10-27  Deepavali\n2019-10-28  Deepavali\n2019-11-09  Prophet Muhammad's birthday\n2019-12-25  Christmas\n----------  ---------------------------------------------------------\n```\n\nOkay, you want to check your own leaves, right? You can! Use `myleaves` with `-a` parameter if you want to see the old leaves too.\n\n```\n$ kakitangan.py myleaves -a\n----------  -----------\n2019-02-28  Sick\n2019-03-12  Sick\n2019-03-21  Annual\n2019-05-17  Annual (PM)\n2019-05-21  Annual\n2019-05-22  Annual\n2019-05-23  Annual\n2019-05-24  Annual\n----------  -----------\n```\n\nIf you need to know your leave statistics, I have added a command named `myleavestat`.\n\n```\n$ kakitangan.py myleavestat\n-----------------------  -----------------\nCompassionate            10/10\nAnnual                   25/50 (25 used)\nSick                     15/30 (15 used)\nPaternity                10/10\nHospitalization          30/60 (30 used)\nReplacement              1/1\nBirthday Leave           1/1\nAnnual Leave Additional  5/5\nCarryForward             5/5\nUnpaid Leave             10/10\nBonus Leave              1/1\nExam/Study Leave         5/5\n-----------------------  -----------------\n```\n\nGoing back home? Don't want anyone to sneak into your Kakitangan account? You can log out anytime. It's easy.\n\n```\n$ kakitangan.py logout\nConfirm logout? [Y/N]: Y\nLogged out\n```\n\n# TODO/BUGS\n\n- [x] Show birthdays of colleagues\n- [ ] Cases, when the internet is down, is not handled yet\n- [ ] Need to add logging feature to track file read/write events\n- [ ] Need to add `Apply for Leave` feature\n- [ ] Need to improve `loadleaves` command (remove manual call)\n- [ ] You found one? Post as an issue or send PR.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmdminhazulhaque%2Fkakitangan-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmdminhazulhaque%2Fkakitangan-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmdminhazulhaque%2Fkakitangan-cli/lists"}