Add clickup changes command for tracking workspace updates#4
Merged
Conversation
…in time Adds 'clickup changes' — a what-changed-since-my-last-visit log for a workspace. Tasks are filtered server-side via date_updated_gt (with automatic pagination); docs have no server-side updated filter, so they are fetched and filtered client-side by date_updated. --since accepts 'last' (run timestamp tracked per workspace in ~/.clickup-cli-state.json, separate from config so the token file is never rewritten), durations (30m/24h/7d/2w), dates, RFC3339, or Unix ms. Also supports --skip-docs, --no-save, and space/folder/list scoping. Also adds the date_updated field to the Doc model (returned by the v3 API but previously dropped during decoding), and fixes a test-harness deadlock in runCommand when command output exceeds the 64KB pipe buffer. https://claude.ai/code/session_019Aexh4uFP9TfNcm8nD42fN
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a new
clickup changescommand that lists tasks and docs updated in a workspace since a point in time. This enables users to quickly see what changed since their last visit, with automatic state tracking per workspace.Changes
New
clickup changescommand (cmd/changes.go):--sinceflag accepts:last(tracked per workspace), durations (30m,24h,7d,2w), dates (2026-06-09), RFC3339 timestamps, or Unix millisecondsdate_updated_gtparameter with automatic pagination (up to 5,000 tasks)date_updated(falling back todate_created) since the v3 Docs API lacks server-side filtering--skip-docs,--no-save,--space-ids,--folder-ids,--list-idsflagsState management (
internal/config/state.go):~/.clickup-cli-state.jsonfile to track the last successfulchanges --since lastrun per workspaceGetLastChangesCheck()andSetLastChangesCheck()functions for reading/writing state"first_run": truein outputAPI enhancements (
internal/api/docs.go):DateUpdatedfield toDocstruct to support client-side filteringComprehensive test coverage (
cmd/changes_test.go):parseSince()covering durations, dates, RFC3339, and Unix ms formatsDocumentation:
docs/api.mdwith full command reference, flags, and usage examplesAGENTS.mdwith change tracking workflows and common patternsREADME.mdandCHANGELOG.mdwith new commandTest infrastructure fix (
cmd/integration_test.go):runCommand()by draining stdout concurrently to handle large outputsChecklist
go build ./...passesgo test ./...passesgo vet ./...passesTestParseSinceand comprehensive integration tests)docs/api.mdupdated with new command, flags, and examples--space-ids,--folder-ids,--list-ids,--skip-docs,--no-save)https://claude.ai/code/session_019Aexh4uFP9TfNcm8nD42fN