Your first timesheet from the terminal
In this tutorial you run the tool from a terminal: you sign in, list the days of the month, preview a booking, write it, and check the result. You need Node.js 20 or newer (node --version tells you) and a company account on the SAP portal.
We use npx, which downloads and runs the published package without installing anything permanently. Every command below therefore starts with npx -y -p sap-fiori-timesheet-mcp. If you would rather have a plain xflow-timesheet command on your PATH, see Install the CLI first and drop that prefix.
1. Sign in
Section titled “1. Sign in”-
Run:
Terminal window npx -y -p sap-fiori-timesheet-mcp xflow-timesheet sso -
The first run downloads a headless browser (about 150 MB). Then a browser window opens with your company’s sign-in page. Type your email and password there, answer the two-factor prompt, and answer Yes to “Stay signed in?” if asked.
-
When the SAP launchpad loads, the window closes and the command prints something like:
Signed in (interactive: signed in in the browser window). 3 cookie(s) saved to ~/.config/xflow-timesheet/session.json; identity kept in ~/.config/xflow-timesheet/profile
Check that the session works:
npx -y -p sap-fiori-timesheet-mcp xflow-timesheet whoamiIt prints your SAP user, name, client and the host it talked to.
2. Look
Section titled “2. Look”npx -y -p sap-fiori-timesheet-mcp xflow-timesheet std daysEvery working day of the current month is listed as filled or MISSING, with target, booked and missing hours and the entries already there:
date state target booked missing entries2026-09-01 filled 8 8 0 8h AI Incubator - NovaLabs (900140) · NCH-Order BAP (0081)2026-09-02 MISSING 8 4 4 4h Administration (0077)2026-09-03 MISSING 8 0 8…1 filled, 21 missing (172h)Pick a day marked MISSING.
3. Preview
Section titled “3. Preview”std set makes a day contain exactly one item. With --dry-run it only prints the plan:
npx -y -p sap-fiori-timesheet-mcp xflow-timesheet std set 2026-09-15 --attendance-type 0077 --hours 8 --dry-runThe output shows what would be removed on that day and what would be created. Nothing is written.
4. Write
Section titled “4. Write”Run the same command without --dry-run:
npx -y -p sap-fiori-timesheet-mcp xflow-timesheet std set 2026-09-15 --attendance-type 0077 --hours 8The per-day result is printed with the new entry’s counter and status. Exit code 0 means everything was accepted.
5. Check
Section titled “5. Check”npx -y -p sap-fiori-timesheet-mcp xflow-timesheet std daysThe day now shows as filled.
What you have learned
Section titled “What you have learned”ssosigns you in once; later commands renew the session silently.std daysis the overview;std setwrites;--dry-runpreviews.
Where to go from here
Section titled “Where to go from here”- Put
xflow-timesheeton your PATH and register the MCP server for your editor: Install the CLI and Other MCP clients. - All commands, options and defaults: CLI reference.
- Run
npx -y -p sap-fiori-timesheet-mcp xflow-timesheet doctorwhenever something looks off; it checks Node, the session, the browser and the MCP registrations.