You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+40-28Lines changed: 40 additions & 28 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,8 +1,10 @@
1
1
# abacus-cli
2
2
3
-
CLI tool for automating time entry logging in [Abacus ERP](https://www.abacus.ch)via Playwright browser automation.
3
+
CLI tool for logging time entries in [Abacus ERP](https://www.abacus.ch)from the terminal.
4
4
5
-
[Abacus](https://www.abacus.ch) is a Swiss ERP system widely used by companies in Switzerland for accounting, payroll, and time tracking. Its web portal is built on Vaadin (a server-side Java UI framework) and does not expose a REST API — so this tool uses headless browser automation instead. The CLI drives a real Chromium browser, fills forms, reads grids, and handles Vaadin's async server round-trips.
5
+
[Abacus](https://www.abacus.ch) is a Swiss ERP system widely used for accounting, payroll, and time tracking. Its web portal does not expose a REST API, so this tool uses Playwright to drive a headless Chromium browser — filling forms, reading grids, and handling the UI automatically.
|`--project <id>`| Project number or alias (required for range fill) |
132
135
|`--hours <n>`| Hours per entry (required for range fill) |
133
-
|`--service-type <id>`| Service type (default: 1435) |
136
+
|`--service-type <id>`| Service type (default: 100) |
134
137
|`--text <text>`| Description |
135
138
|`--from <YYYY-MM-DD>`| Start date (default: Monday of current week) |
136
139
|`--to <YYYY-MM-DD>`| End date (default: Friday of current week) |
@@ -155,7 +158,7 @@ This opens a checkbox picker with all entries for the current month. Navigate wi
155
158
**Targeted mode** — delete a specific entry by date and project:
156
159
157
160
```bash
158
-
abacus time delete --date 2025-01-15 --project 71100000001
161
+
abacus time delete --date 2025-01-15 --project 12345
159
162
```
160
163
161
164
| Flag | Required | Description |
@@ -201,8 +204,8 @@ Create short names for frequently used project numbers and service types.
201
204
202
205
```bash
203
206
abacus alias list
204
-
abacus alias add project myproj 71100000001
205
-
abacus alias add service-type dev 1435
207
+
abacus alias add project myproj 12345
208
+
abacus alias add service-type dev 100
206
209
abacus alias remove project myproj
207
210
```
208
211
@@ -220,6 +223,13 @@ abacus config set url https://your-instance.example.com/portal/myabacus
220
223
abacus config set locale de # Override locale (de, en, fr, it, es)
221
224
```
222
225
226
+
Environment variables can also be used:
227
+
228
+
| Variable | Default | Description |
229
+
|----------|---------|-------------|
230
+
|`ABACUS_URL`| — | Base URL of your Abacus portal |
231
+
|`ABACUS_CONFIG_DIR`|`~/.abacus-cli`| Directory for session state |
232
+
223
233
### Session refresh
224
234
225
235
Keep your saved session alive by refreshing it periodically. On macOS, you can install a launchd agent to do this automatically.
@@ -241,11 +251,13 @@ abacus discover
241
251
242
252
## How it works
243
253
254
+
Abacus's web portal is built on [Vaadin](https://vaadin.com/), a server-side Java UI framework. There is no REST API — every interaction happens through the browser DOM with server round-trips for each action.
255
+
244
256
1.**Login** — Opens a headed browser for manual SSO/login. Saves cookies and localStorage to `~/.abacus-cli/state.json`.
245
-
2.**Automation** — Restores the saved session in a headless browser. Navigates to the Leistungen (time entries) page via Vaadin's menu system.
257
+
2.**Automation** — Restores the saved session in a headless browser and navigates through Vaadin's menu system to the time entries page.
246
258
3.**Vaadin handling** — Comboboxes require character-by-character input with delays to trigger server-side filtering. `waitForVaadin()` polls the client to ensure no pending server requests before proceeding.
247
259
4.**Duplicate detection** — Before creating an entry, existing entries for the same date and project are checked. You can choose to update or create new.
248
-
5.**Captcha fallback** — If a FortiADC captcha is detected, the browser reopens in headed mode for manual solving, then retries automatically.
260
+
5.**Captcha fallback** — If a captcha is detected, the browser reopens in headed mode for manual solving, then retries automatically.
<p>Falls ein passender Eintrag (gleiches Datum + Projekt) bereits existiert, werden Sie gefragt, ob Sie ihn aktualisieren oder einen neuen erstellen möchten.</p>
0 commit comments