A lightweight command-line interface for interacting with Frappe / ERPNext employee check-ins.
It allows you to:
- Log in to your Frappe instance
- Perform check-in / check-out actions
- View check-in records
- Calculate worked hours
- Track your current check-in state
- Manage multiple profiles
-
Interactive login (no env vars required)
-
Profile system (save and reuse credentials)
-
Secure password input (supports special characters like
$,!, etc.) -
Session persistence via cookies
-
State-aware actions (prevents duplicate check-ins/outs)
-
Colored terminal output (green / red / yellow)
-
Clean CLI conventions:
get-*→ read operationsdo-*→ actions
- Bash (Linux / macOS / WSL)
curljq
Install dependencies:
# Ubuntu / Debian
sudo apt install curl jq
# macOS (Homebrew)
brew install curl jqgit clone https://github.com/omarha96/frappe-cli.git
cd frappe-clichmod +x frappemv frappe ~/.local/bin/Or system-wide:
sudo mv frappe /usr/local/bin/Now you can run:
frappefrappe loginYou will be prompted for:
- Host (e.g. https://your-site.com)
- Username
- Password (hidden input)
Optional:
Save as profile? (y/N)
If you save, you can reuse it later.
On next login:
frappe loginYou’ll see:
1. work
2. personal
Select a profile or press Enter to enter manually.
frappe logoutfrappe get-checking-records [limit]Example:
frappe get-checking-records 10frappe get-checking-stateOutput:
IN→ currently checked in (green)OUT→ currently checked out (red)UNKNOWN→ no records
frappe do-checkin- Prevents duplicate check-ins
- Shows warning if already checked in
frappe do-checkout- Prevents duplicate check-outs
- Warns if no prior check-in
frappe get-hours [limit]Outputs each date total duration based on check-in/out pairs, and takes optional "limit".
- 🟢 Green → success / active state
- 🔴 Red → errors / checked out
- 🟡 Yellow → warnings / edge cases
If you choose to save a profile, credentials are stored in:
~/.frappe/profilesFor sensitive environments, consider:
-
Not saving profiles
-
Restricting file permissions:
chmod 600 ~/.frappe/profiles
Session cookies are stored in:
~/.frappe/cookies.txtThis CLI assumes standard ERPNext endpoint:
employee_checkin.add_log_based_on_employee_field
If your backend differs, adjustments may be required.
ERROR: Not logged in. Run: frappe login
Fix:
frappe loginsudo apt install jq
# or
brew install jqchmod +x frappefrappe login
frappe get-checking-state
frappe do-checkin
# ... work ...
frappe do-checkout
frappe get-hoursMIT License (or your preferred license)
Feel free to open issues or submit pull requests to improve the CLI.
- Encrypted profile storage
- Daily summaries
- Notifications / reminders
- Interactive mode