CLI Installation & Usage
The Clocktopus CLI lets you record clock signals (clock-in/out) directly from your terminal. Perfect for developers who prefer command-line tools.
Installation
npm install -g @blastin-dev/clocktopus-cliVerify Installation
clocktopus --versionAuthentication
Before using the CLI, you need to authenticate with your Clocktopus account. The CLI uses secure device authorization (OAuth 2.0 Device Flow).
Step 1: Start Login
clocktopus loginStep 2: Authorize in Browser
The CLI will display a URL and authorization code:
Starting device authorization...
Open this link to authorize:
https://clocktopus.app/auth/device?user_code=ABCD1234
Or visit https://clocktopus.app/auth/device and enter code: ABCD-1234
Waiting for authorization...Step 3: Confirm
Open the URL in your browser, sign in (if needed), and approve the authorization. The CLI will automatically detect when you've authorized:
Waiting for authorization.....
Logged in as John Doe (john@example.com)Secure Storage — Your access token is stored in your system's configuration directory. You only need to log in once per device.
Commands Reference
Authentication Commands
clocktopus loginAuthenticate with your Clocktopus account using device authorization.
clocktopus logoutLog out and clear stored credentials from this device.
clocktopus whoamiDisplay the currently logged-in user.
Clock Commands
Clock commands let you record when you start and stop working.
clocktopus clock inRecord a clock-in signal for today. Marks the start of your work session.
clocktopus clock outRecord a clock-out signal for today. Marks the end of your work session.
clocktopus clock statusShow clock signals for today. See your current clock-in/out status.
clocktopus clock status -d 2024-01-10Show clock signals for a specific date (use YYYY-MM-DD format).