| name | flexhr |
| description | CLI for Flex HR (flex.team) — manage authentication, look up users, browse org structure, view team schedule (vacations/birthdays), upload files, list/get/submit approval documents, read and clear notifications |
flexhr CLI
CLI for interacting with Flex HR (flex.team). Authenticates by extracting cookies from the macOS default browser (auto-detected via LaunchServices; falls back to any installed Chromium browser — Chrome, Comet, Arc, Edge, Brave, Chromium).
Installation
brew install circlesac/tap/flex-cli
npm install -g @circlesac/flex
curl -fsSL https://github.com/circlesac/flex-cli/releases/latest/download/install.sh | sh
Commands
Authentication
flexhr auth login
flexhr auth login --browser chrome
flexhr auth status
flexhr auth logout
Credentials are stored at ~/.config/flex/credentials.json. The AID JWT is a session token that expires; re-run auth login after logging back in to flex.team in the browser.
Current User
flexhr me
flexhr me --json
User Lookup
flexhr user <query>
flexhr user john@example.com
flexhr user "John Doe"
flexhr user john
flexhr user <query> --json
Users
flexhr users list
flexhr users list --json
flexhr users search <query>
Organization
flexhr org
flexhr org --flat
flexhr org --members
flexhr org --json
Schedule (Vacations / Calendar)
flexhr schedule
flexhr schedule --range week
flexhr schedule --range next-week
flexhr schedule --range month
flexhr schedule --range days --days 30
flexhr schedule --from 2026-05-01 --to 2026-05-31
flexhr schedule --user "Chester Lee"
flexhr schedule --me
flexhr schedule --types TIME_OFF
flexhr schedule --json
Scope: flexhr schedule (no --user) reads your primary calendar + coworker calendars (the people you've added to your Flex calendar view). To see anyone else, use --user <query> — the CLI resolves the user via the global directory and pulls /api/v2/calendar/calendars/users/<userIdHash>.
Event types: TIME_OFF, WORK_RECORD, ONE_ON_ONE, INTERVIEW, BIRTHDAY, COMPANY_JOIN_DAY. Multi-day spans returned as one event per day are merged into a single row by (calendar, type, summary) + contiguous dates.
File Upload
flexhr upload <file>
flexhr upload <file> --no-convert
flexhr upload <file> --mime image/png
flexhr upload <file> --source <type>
The final url (e.g. https://flex.team/api/v2/file/files/<key>) can be embedded directly into an approval-document content HTML as <img src="...">.
Approval Documents
flexhr docs list
flexhr docs list --status DONE
flexhr docs list --template <templateKey>
flexhr docs list --keyword "체력"
flexhr docs get <documentKey>
flexhr docs templates
flexhr docs submit --payload <file.json>
flexhr docs submit --payload <file.json> --dry-run
flexhr docs drafts
flexhr docs delete <documentKey>
docs submit payload format
{
"document": {
"templateKey": "...",
"title": "...",
"content": "...(HTML; image URLs from prior docs can be reused here)...",
"inputs": [
{ "inputFieldIdHash": "...", "value": "..." }
],
"attachments": []
},
"approvalProcess": {
"lines": [
{ "step": 0, "actors": [{ "resolveTarget": { "type": "USER",
The CLI auto-populates approvalProcess.matchingData by calling resolve-policy, generates a new documentKey, creates the draft, and submits. To look up inputFieldIdHash values and the template key, use docs get <existing-documentKey> on a prior document written from the same template.
Notifications
flexhr notifications count
flexhr notifications list
flexhr notifications list --size 50
flexhr notifications list --unread
flexhr notifications read
flexhr notifications read --id <topicId>
flexhr notifications read --id <id1> --id <id2>
Endpoints (for reference): GET /action/v2/notification/topics/count-unread, GET /api/v2/notification/topics, PUT /action/v2/notification/topics/read (empty body → mark all; { topicIds: [...] } → targeted).
Common Flags
All commands support:
--json — JSON output
--plain — Plain text output (tab-separated, for piping)