Skip to content

Latest commit

History

15 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

worklog

BuildGo Report CardGo versionGitHub releaseLicense: GPL v3GitHub last commit

A single command that turns your GitHub and GitLab activity into a ready-to-post standup report. Worklog collects your PRs, reviews, commits, issues, comments, CI failures, and pending review requests so you can quickly share what you worked on.

Install

go install github.com/latiif/worklog@latest

Quick start

# Set at least one token (see "Creating tokens" below)export GITHUB_TOKEN="github_pat_..."export GITLAB_TOKEN="glpat-..."# Default: last 7 days
worklog
# Yesterday only
worklog --since yesterday --until yesterday
# Custom range
worklog --since "2 weeks ago" --until "last friday"# Table or JSON output
worklog -o table
worklog -o json

Tokens can also be placed in a .env file in the working directory. Real environment variables take precedence over .env values.

Flags

FlagShortDefaultDescription
--since7 days agoStart date (inclusive). Accepts YYYY-MM-DD or natural language like "yesterday", "2 weeks ago".
--untiltodayEnd date (inclusive). Same formats as --since.
--output-otextOutput format: text, table, or json.

What it reports

  • Pull Requests / Merge Requests — opened, merged, closed
  • Code Reviews — approvals, changes requested
  • Review Comments — inline review comments
  • Issues — opened, closed
  • Comments — issue and discussion comments
  • Commits — pushes
  • CI Pipeline Failures — your failed workflow runs / pipelines
  • Pending Reviews — open PRs/MRs currently awaiting your review

Creating tokens

GitHub Personal Access Token

  1. Go to Settings > Developer settings > Personal access tokens > Fine-grained tokens (direct link).
  2. Give the token a descriptive name (e.g. worklog).
  3. Set an expiration.
  4. Under Repository access, select All repositories to include private repos. Limiting to specific repos will hide commits and events from any repo not in the list.
  5. Under Permissions > Repository permissions, grant:
    • Actions — Read-only (needed for CI failure reporting)
    • Contents — Read-only (needed for commit details, including commits to private repos)
    • Issues — Read-only
    • Pull requests — Read-only
    • Metadata — Read-only (automatically selected)
  6. Click Generate token and copy the value.
  7. Export it: export GITHUB_TOKEN="github_pat_..." or add GITHUB_TOKEN=github_pat_... to your .env file.

GitLab Personal Access Token

  1. Go to Preferences > Access Tokens (direct link for gitlab.com).
  2. Give the token a descriptive name (e.g. worklog).
  3. Set an expiration date.
  4. Select the following scopes:
    • read_api — read access to events, merge requests, pipelines, and projects
  5. Click Create personal access token and copy the value.
  6. Export it: export GITLAB_TOKEN="glpat-..." or add GITLAB_TOKEN=glpat-... to your .env file.

For self-hosted GitLab, also set GITLAB_URL:

export GITLAB_URL="https://gitlab.yourcompany.com"

Environment variables

VariableRequiredDescription
GITHUB_TOKENAt least one token requiredGitHub personal access token
GITLAB_TOKENAt least one token requiredGitLab personal access token
GITLAB_URLNoGitLab instance URL (defaults to https://gitlab.com)

About

A CLI that helps remote developers remember and share what they worked on

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Contributors

Languages