Harvest Time Off
OMP-native Harvest integration. V1 makes holiday-aware time-off blocks convenient; it does not automate ordinary work tracking.
Credentials
-
Open Harvest ID Developers and create a Personal Access Token for this local script.
-
Harvest displays the token and the available Harvest account IDs once. Copy the account ID for the account to track time in.
-
Fill the ignored
.envrcin this repository:export HARVEST_ACCESS_TOKEN="your-personal-access-token" export HARVEST_ACCOUNT_ID="your-harvest-account-id" -
Run
direnv allowif you use direnv; otherwise runsource .envrcin the shell that starts OMP or the CLI.
Personal Access Tokens are the intended Harvest authentication method for personal scripts. Revoke and replace a token from Harvest ID if it is exposed. Harvest authentication documentation.
V1: time off
The approval-gated harvest_time_off OMP tool and harvest-time-off CLI create 7-hour entries for each Yukon business day in an inclusive range. They skip weekends and observed Yukon holidays by default.
harvest-time-off 2026-08-17 2026-08-28 \
--project 'Time Off - Marlen' \
--task 'Vacation / PTO' \
--notes 'regular time off' \
--dry-run
The default holiday region is ca_yt. Add --holiday-region REGION or set HARVEST_HOLIDAY_REGIONS to include other Holidays regions. business_time calculates business days and holidays supplies observed statutory holidays.
A time-off block never creates weekend entries. The underlying marlens-harvest-api-v2 client accepts any ISO date, including weekends, for ordinary work entries.
OMP settings
defaultHours: hours per business day when a tool call omitshours; defaults to7.holidayRegions: comma-separated Holidays regions; defaults toca_yt.command: direct path to theharvest-time-offexecutable.workEntryCommand: direct path to theharvest-work-entryexecutable.projectTimeMappings: JSON mapping from OMP Project Time project names to Harvest project/task names.projectTimeLogPath: optional override for~/.omp/project-time/time-log.json.
V2: OMP Project Time integration
Configure projectTimeMappings with the recorded OMP Project Time project name as the key:
{
"Harvest API": { "project": "Internal", "task": "Development" }
}
harvest_preview_project_time_entries reads the configured time log, splits sessions across local dates, generates descriptions from the project and repository, and checks Harvest for existing or locked entries without writing. harvest_record_project_time_entries performs the same preflight then creates only new entries; OMP treats it as a write requiring approval. Unmapped sessions are reported and never written.
Release
Before merging a release PR, self-review its complete diff, address every actionable review comment, and rerun focused QA after fixups. Record the review and QA evidence on the PR. Then merge to main, build and publish the Ruby gem when its marlens-harvest-api-v2 dependency is available on RubyGems, install the released OMP plugin from GitHub, and verify it:
ruby test_harvest_time_off.rb
npm run test:omp
harvest-time-off 2026-08-17 2026-08-28 \
--project 'Time Off - Marlen' \
--task 'Vacation / PTO' \
--holiday-region ca_yt \
--dry-run
gem build harvest-time-off.gemspec
gem push harvest-time-off-<version>.gem
omp plugin install --force github:klondikemarlen/harvest-time-off
omp plugin list
harvest-time-off --help
harvest-work-entry --help