A command-line tool for Harvest time tracking.
curl -sL https://raw.githubusercontent.com/aktech/harvest-go-cli/main/install.sh | shCreate ~/.config/harvest/.env:
HARVEST_TOKEN=your_token_here
HARVEST_ACCOUNT_ID=your_account_idGet your token from: https://id.getharvest.com/developers
# Start a timer (interactive)
harvest start
# Start with fuzzy matching
harvest start "project" "task"
harvest start "project" "task" "notes"
# Stop timer
harvest stop
# Log time entry
harvest log
harvest log "project" "task" 2.5 "notes"
# Log for a past (or future) date, non-interactive
harvest log -d YYYY-MM-DD "project" "task" 2.5 "notes"
# Update an existing entry (find ID via `harvest view`)
harvest update --id <id> --hours 1.5
harvest update --id <id> --notes "new notes"
harvest update --id <id> -d YYYY-MM-DD
# Delete an entry
harvest delete <id>
# View entries (IDs shown in [brackets] for use with update/delete)
harvest view today
harvest view week
harvest view --from YYYY-MM-DD --to YYYY-MM-DD
# List projects/tasks
harvest ls projects
harvest ls tasks -p <project_id>
# Status (for tmux)
harvest status# Zsh
mkdir -p ~/.zsh/completions
harvest completion zsh > ~/.zsh/completions/_harvest
# Add to ~/.zshrc:
fpath=(~/.zsh/completions $fpath)
autoload -Uz compinit && compinit
# Bash
harvest completion bash > /etc/bash_completion.d/harvestAdd to ~/.tmux.conf:
set -g status-right "#(harvest status) | %H:%M"
set -g status-interval 60