|
| 1 | +# zeltapp-cli |
| 2 | + |
| 3 | +[](https://github.com/agentic-utils/zeltapp-cli/actions/workflows/ci.yaml) |
| 4 | +[](https://goreportcard.com/report/github.com/agentic-utils/zeltapp-cli) |
| 5 | +[](LICENSE) |
| 6 | + |
| 7 | +unofficial CLI for [Zelt](https://zelt.app). reverse-engineered from the web app's `/apiv2/...` surface. |
| 8 | + |
| 9 | +cookie-based session, email MFA prompted interactively on `login`. session lives at `~/.config/zeltapp-cli/session.json` (chmod 600). |
| 10 | + |
| 11 | +## install |
| 12 | + |
| 13 | +**homebrew** (macOS / linux): |
| 14 | + |
| 15 | +``` |
| 16 | +brew install agentic-utils/tap/zeltapp |
| 17 | +``` |
| 18 | + |
| 19 | +**go install**: |
| 20 | + |
| 21 | +``` |
| 22 | +go install github.com/agentic-utils/zeltapp-cli/cmd/zeltapp@latest |
| 23 | +``` |
| 24 | + |
| 25 | +**from source**: |
| 26 | + |
| 27 | +``` |
| 28 | +git clone https://github.com/agentic-utils/zeltapp-cli && cd zeltapp-cli |
| 29 | +go install ./cmd/zeltapp |
| 30 | +``` |
| 31 | + |
| 32 | +**prebuilt binaries**: see [releases](https://github.com/agentic-utils/zeltapp-cli/releases). |
| 33 | + |
| 34 | +## usage |
| 35 | + |
| 36 | +``` |
| 37 | +zeltapp login # prompts for email, password, MFA code; saves password to Keychain |
| 38 | +zeltapp login --remember=false # same, but don't save the password |
| 39 | +zeltapp whoami |
| 40 | +zeltapp logout |
| 41 | +
|
| 42 | +zeltapp me profile # basic + personal + about |
| 43 | +zeltapp me contact # address + emergency + work contact |
| 44 | +zeltapp me employment # role + contracts + lifecycle |
| 45 | +zeltapp me compensation |
| 46 | +zeltapp me bank |
| 47 | +zeltapp me equity |
| 48 | +zeltapp me pension |
| 49 | +zeltapp me payslips |
| 50 | +zeltapp me devices |
| 51 | +zeltapp me benefits |
| 52 | +
|
| 53 | +zeltapp leave list |
| 54 | +zeltapp leave balance |
| 55 | +zeltapp leave book --policy 512 --start 2026-06-01 [--end 2026-06-02] [--notes "..."] |
| 56 | +zeltapp leave check --policy 512 --start 2026-06-01 # dry-run, shows cost + overlaps |
| 57 | +
|
| 58 | +zeltapp attendance today |
| 59 | +zeltapp attendance week |
| 60 | +
|
| 61 | +zeltapp calendar team [--start YYYY-MM-DD] [--end YYYY-MM-DD] |
| 62 | +
|
| 63 | +zeltapp expenses list |
| 64 | +
|
| 65 | +zeltapp company config |
| 66 | +zeltapp company departments |
| 67 | +zeltapp company sites |
| 68 | +zeltapp company jobs |
| 69 | +
|
| 70 | +zeltapp people list # company directory (active only) |
| 71 | +zeltapp people list --all # include inactive/terminated |
| 72 | +zeltapp people search "alice" # case-insensitive substring across name/email/dept/role |
| 73 | +zeltapp people get 6380 # one person by userId |
| 74 | +zeltapp people get alice@example.com # or by email |
| 75 | +
|
| 76 | +zeltapp reviews list # ongoing review cycles |
| 77 | +zeltapp reviews mine # my results across cycles |
| 78 | +zeltapp reviews cycle <uuid> # details + navigation for a cycle |
| 79 | +zeltapp reviews progress <uuid> # cycle + result progress |
| 80 | +zeltapp reviews participation <uuid> # participants in a cycle |
| 81 | +zeltapp reviews result <uuid> [--user N] # user-level result (default: self) |
| 82 | +zeltapp reviews entry [--user N] # review entry (default: self) |
| 83 | +
|
| 84 | +zeltapp goals list |
| 85 | +zeltapp goals mine |
| 86 | +
|
| 87 | +zeltapp cache list # show cached entries + TTLs |
| 88 | +zeltapp cache clear # wipe local cache |
| 89 | +
|
| 90 | +zeltapp raw GET /apiv2/users/cache # escape hatch |
| 91 | +zeltapp raw POST /apiv2/foo '{"x":1}' |
| 92 | +``` |
| 93 | + |
| 94 | +global flags: |
| 95 | + |
| 96 | +``` |
| 97 | +--json JSON output instead of human-readable tables |
| 98 | +-v, --verbose print request/response info to stderr |
| 99 | +--no-cache bypass the local TTL cache for this invocation |
| 100 | +``` |
| 101 | + |
| 102 | +## output format |
| 103 | + |
| 104 | +by default, output is rendered as aligned tables (for lists) or key=value (for single records). pass `--json` to get the raw JSON response instead - useful for piping into `jq` or scripting. |
| 105 | + |
| 106 | +``` |
| 107 | +$ zeltapp leave policies |
| 108 | +ID NAME TYPE |
| 109 | +512 Annual Leave annual |
| 110 | +513 Sick Leave sick |
| 111 | +
|
| 112 | +$ zeltapp leave policies --json |
| 113 | +[ |
| 114 | + {"id": 512, "name": "Annual Leave", "type": "annual"}, |
| 115 | + ... |
| 116 | +] |
| 117 | +``` |
| 118 | + |
| 119 | +## shell completion |
| 120 | + |
| 121 | +zeltapp ships completion scripts via cobra. install once per shell: |
| 122 | + |
| 123 | +**zsh** (most common on macOS): |
| 124 | + |
| 125 | +``` |
| 126 | +mkdir -p ~/.zsh/completions |
| 127 | +zeltapp completion zsh > ~/.zsh/completions/_zeltapp |
| 128 | +# add to ~/.zshrc if not already: |
| 129 | +# fpath=(~/.zsh/completions $fpath) |
| 130 | +# autoload -Uz compinit && compinit |
| 131 | +``` |
| 132 | + |
| 133 | +restart your shell or run `compinit` to pick it up. |
| 134 | + |
| 135 | +**bash**: |
| 136 | + |
| 137 | +``` |
| 138 | +zeltapp completion bash > /usr/local/etc/bash_completion.d/zeltapp # macOS via brew install bash-completion@2 |
| 139 | +# or: |
| 140 | +zeltapp completion bash > /etc/bash_completion.d/zeltapp # linux |
| 141 | +``` |
| 142 | + |
| 143 | +**fish**: |
| 144 | + |
| 145 | +``` |
| 146 | +zeltapp completion fish > ~/.config/fish/completions/zeltapp.fish |
| 147 | +``` |
| 148 | + |
| 149 | +**powershell**: |
| 150 | + |
| 151 | +``` |
| 152 | +zeltapp completion powershell > zeltapp.ps1 |
| 153 | +# then source zeltapp.ps1 from your profile |
| 154 | +``` |
| 155 | + |
| 156 | +## notes |
| 157 | + |
| 158 | +- email MFA: zelt emails a 6-digit code; paste it at the prompt. |
| 159 | +- access token expires after 15 min; refresh token lasts 30 days. The CLI auto-refreshes when the access token expires. |
| 160 | +- password is stored in macOS Keychain by default (service=`zeltapp-cli`). If the refresh token also expires (~30 days idle), the CLI re-logs in using the stored password and prompts only for the new MFA code. Pass `--remember=false` to login to opt out. |
| 161 | +- `leave book` will run `verify-overlap` + `request-value-and-balance2` first and show a confirmation prompt unless `--yes` is passed. |
| 162 | +- some endpoints are cached on disk at `~/.config/zeltapp-cli/cache/` with per-endpoint TTLs (e.g. `users/cache` 5 min, `companies/*` and `job-positions` 1 hour). pass `--no-cache` to bypass for one call, or run `zeltapp cache clear` to wipe everything. User-specific endpoints (`/users/<id>/*`, `auth/me`, absences, expenses, payroll) are never cached. |
0 commit comments