A command-line interface tool for ATOSS Staff Center time tracking system.
- Fully automatic operation: Just run commands, everything else happens automatically
- Uses existing browser session: No separate authentication needed
- Auto-tab management: Opens ATOSS tabs in background automatically
- Instant responses: Unix socket IPC provides <10ms CLI ↔ daemon latency
- Browser extension integration: Uses your existing Arc/Chrome ATOSS session
npm install
npm run buildnpm start setup-extension- Open Arc (or Chrome/Edge)
- Go to
arc://extensions(orchrome://extensions) - Enable "Developer mode" (toggle in top right)
- Click "Load unpacked"
- Select
packages/extension/distfrom this project - Copy the Extension ID (32-character string)
npm start install-host <YOUR_EXTENSION_ID>That's it! The extension will automatically capture your ATOSS session when needed.
# Get data for today
npm start get
# Get data for specific date (note the -- before flags)
npm start get -- -d 2024-12-24
npm start get -- --date 2024-12-24# Set entries for a specific date (type defaults to "Presence")
npm start set -- -d 2024-12-31 -e 8:45,12:00 -e 12:30,17:30
# Set entries with explicit type
npm start set -- -d 2024-12-31 -e 8:45,12:00,wh -e 12:30,17:30,wh
# Set entries for today
npm start set -- -e 9:00,17:00Each -e flag specifies one time entry with format: start,end[,type]
start: Start time (HH:MM or H:MM, e.g., 8:45)end: End time (HH:MM or H:MM, e.g., 17:30)type: Entry type (optional, defaults to "Presence". e.g., "wh" for work hours)
Safety: The set command will fail if any entries already exist for the specified date, preventing accidental overwrites.
Important: When passing flags, use -- before the flag:
npm start get -- -d 2024-12-24✓ Correctnpm start get -d 2024-12-24✗ Incorrect (npm consumes the flag)
The extension automatically:
- Uses your browser's existing authenticated session
- Opens an ATOSS tab in the background if not already open
- Extracts or sets the requested data
- Returns results instantly to the CLI
You don't need to open ATOSS manually or click anything in the browser!
This is a monorepo using NPM workspaces with three packages:
@atoss/cli- Command-line interface with Unix socket client@atoss/extension- Browser extension for automation and data extraction@atoss/shared- Shared TypeScript types
| Command | Description |
|---|---|
setup-extension |
Build and setup browser extension |
install-host <id> |
Install native messaging daemon for extension |
get [--date <date>] |
Get time tracking data for a specific date (YYYY-MM-DD) |
set --date <date> -e <start,end[,type]> |
Set time tracking entries for a specific date (type defaults to "Presence") |
npm run build # Build all packages
npm run build:cli # Build only the CLI
npm run build:extension # Build only the extension
npm run build:shared # Build only shared types
npm run clean # Clean all build outputsCLI Tool ←──→ Daemon ←──→ Extension
Unix Socket Native Messaging
(<10ms latency) (stdio)
- CLI sends requests via Unix socket to daemon
- Daemon forwards requests to extension via native messaging
- Extension automates ATOSS page and extracts data
- Daemon sends response back to CLI via socket
- CLI displays formatted output
- Check extension is loaded:
arc://extensions - Click "Inspect views: service worker" to check for errors
- Verify native messaging manifest is installed:
- Arc:
~/Library/Application Support/Arc/NativeMessagingHosts/com.atoss.cli.json - Chrome:
~/Library/Application Support/Google/Chrome/NativeMessagingHosts/com.atoss.cli.json
- Arc:
- Check daemon logs:
cat ~/.atoss-cli/daemon.log
The daemon is automatically started by the extension when it loads. If you see this error:
- Reload the extension in your browser
- Wait a few seconds for daemon to start
- Check
~/.atoss-cli/daemon.logfor errors
Make sure you're logged into ATOSS in your browser. The extension uses your browser's existing authenticated session.
- Check daemon logs:
cat ~/.atoss-cli/daemon.log - Verify node is installed at:
/opt/homebrew/bin/node- Or update
packages/cli/dist/native-host/daemon-launcher.shwith correct path
- Or update
- Try reloading the extension
Recommendation: Only load the extension in one browser at a time. Loading it in multiple browsers (Arc, Chrome, etc.) will launch multiple daemon instances.
The extension works in any Chromium-based browser:
- macOS: Arc, Chrome, Edge, Chromium
- Linux: Chrome, Chromium
- Windows: Chrome, Edge
- Daemon logs:
~/.atoss-cli/daemon.log - Unix socket:
~/.atoss-cli/daemon.sock
- Extension uses browser's existing authenticated session (no credentials stored)
- Unix socket limited to local machine communication
- Native messaging provides secure, OS-managed communication
- Microsoft SSO credentials remain in browser only (never extracted or stored)
- All communication happens locally (no network requests)
- Extension runs with minimal permissions (activeTab, nativeMessaging, scripting)
See CLAUDE.md for technical documentation, architecture details, and development notes.
MIT