Pick the next ClickUp ticket and start a Claude Code session on it. One command from terminal to PR.
Project description
clickup-work
A tiny CLI that picks the next ClickUp ticket assigned to you, cuts the right branch in the right repo, and launches a Claude Code session with the ticket pre-loaded. On exit, it opens a GitHub PR.
One command, from terminal to solving the problem.
What it does
$ clickup-work --repo my-app
urgent in progress Fix flaky checkout tests [Sprint 12]
high to do Add dark-mode toggle [Sprint 12]
normal to do Refactor notification queue [Infra]
pick a ticket >
Ticket: Add dark-mode toggle (86c9abc)
Repo: /home/you/projects/my-app (nickname: my-app)
Base: main (resolved from config [repos.my-app].base_branch)
Branch: feat/add-dark-mode-toggle → PR into main
launching Claude Code… (exit the session to come back here)
(you work with Claude, commit, exit)
1 commit(s) to push; opening PR…
PR opened: https://github.com/you/my-app/pull/42
Why
Because switching context between ClickUp, your terminal, your git branches, and your editor is the slowest part of shipping a ticket. This automates the mechanical parts and hands control to Claude Code for the actual work.
- Picks the right ticket (interactive fzf picker, or
--topto auto-pick) - Cuts a conventional branch (
feat/<slug>,fix/<slug>,docs/<slug>, inferred from ClickUp task type — or override with--prefix) - Never guesses the base branch (explicit per-repo config,
origin/HEADfallback, verified against origin before any git operation) - Opens a PR automatically via
ghwhen Claude's session ends with commits - Skips the PR cleanly if no commits were made (no noise, no force-push)
Requirements
- Python 3.11+
claude— Claude Code CLIgitandgh, withgh auth logindonefzf(optional; falls back to a numbered picker)- A ClickUp API token (generate one under Settings → Apps → API Token)
Install
With pipx (recommended)
pipx install clickup-work
Don't have pipx? pip install --user clickup-work also works on most systems.
On Arch/Debian-managed Pythons (PEP 668), use pipx or a venv.
Install the latest dev version directly from GitHub
pipx install git+https://github.com/Azhar-ud/clickup-work.git
From source
git clone https://github.com/Azhar-ud/clickup-work.git
cd clickup-work
python -m venv .venv && source .venv/bin/activate
pip install -e .
clickup-work is now on your PATH.
Configure
1. Token
export CLICKUP_API_TOKEN=pk_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Add this to ~/.zshrc / ~/.bashrc so it persists across shells.
2. Config file
Copy the example and edit:
mkdir -p ~/.config/clickup-work
cp config.toml.example ~/.config/clickup-work/config.toml
$EDITOR ~/.config/clickup-work/config.toml
The quickest way to add a repo is the built-in helper — no TOML syntax to remember:
clickup-work add-repo ~/projects/my-app
# Found repo at /home/you/projects/my-app
# Detected default branch: main
# Nickname for this repo [my-app]: my-app
# Added [repos.my-app] to ~/.config/clickup-work/config.toml
Or hand-write a block:
[repos.my-app]
path = "/home/you/projects/my-app"
base_branch = "main"
# branch_prefix = "feat" # optional override
See config.toml.example for all fields.
Usage
# Pick a ticket from the fzf picker, open it in the named repo
clickup-work --repo my-app
# Skip the picker; take the top-priority ticket
clickup-work --repo my-app --top
# One-off overrides
clickup-work --repo my-app --base staging # target a different base
clickup-work --repo my-app --prefix fix # force fix/… prefix
clickup-work --repo my-app --draft # open PR as a draft
# Preview only — no git, no Claude
clickup-work --repo my-app --dry-run
# See every API call and git command
clickup-work --repo my-app --verbose
# Register a new repo in config
clickup-work add-repo ~/projects/new-repo [--name nickname] [--base-branch main]
Full flag list
| Flag | Purpose |
|---|---|
--repo NAME_OR_PATH |
Repo nickname from config, or an absolute/~ path |
--base BRANCH |
Override base branch for this run |
--prefix NAME |
Override branch prefix (feat, fix, chore, docs, …) |
--top, -t |
Auto-pick top-priority ticket (skip picker) |
--draft |
Open the resulting PR as a draft |
--dry-run |
Preview the ticket + plan, touch nothing |
--verbose, -v |
Print every HTTP request and shell command |
How it picks the base branch
Resolution order, first non-empty wins:
--base <branch>flag[repos.<name>].base_branchin configgit symbolic-ref refs/remotes/origin/HEAD(auto-detect)- Error out — the tool refuses to guess
Before any branching, it verifies the resolved base exists on origin:
git ls-remote --exit-code --heads origin <base>
If it doesn't, the tool aborts with a clear message — no stray branches, no PRs targeting a dead base.
How it picks the branch prefix
| Condition | Prefix |
|---|---|
--prefix <name> |
Whatever you pass |
[repos.<name>].branch_prefix in config |
That value |
| ClickUp task type contains "bug" / is incident/hotfix | fix |
| ClickUp task type contains "doc" | docs |
| Anything else | feat |
Post-session behavior
When you exit Claude:
ahead = git rev-list --count origin/<base>..HEAD
ahead == 0→ print "no new commits on the branch — skipping PR", exit 0ahead ≥ 1→git push -u origin <branch>thengh pr create --base <base> --head <branch>--draftpassed → PR is opened as a draft
Safety
- Plaintext of your token never leaves
CLICKUP_API_TOKEN(env) or your shell rc. Nothing is written back to disk by this tool. - The tool never does
git reset --hard, force-pushes, or amends. - If a feature branch already exists, it's reused (not reset) — good for resuming partial work.
--dry-runruns everything up to "touch disk", including the branch-exists-on-origin check, and stops there.
License
MIT. See LICENSE.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file clickup_work-0.1.0.tar.gz.
File metadata
- Download URL: clickup_work-0.1.0.tar.gz
- Upload date:
- Size: 18.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9d2a4e8d418b1713ed723977ab197b42358455a3b32e5ac42ac32bcbe1f090c3
|
|
| MD5 |
f45fa1701149b0b888367eec4f62c0d3
|
|
| BLAKE2b-256 |
bfe14887c09ca23b208cb48354a7ec77cf85d0dff1c47df9a0aff9ad1d9542f3
|
Provenance
The following attestation bundles were made for clickup_work-0.1.0.tar.gz:
Publisher:
publish.yml on Azhar-ud/clickup-work
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
clickup_work-0.1.0.tar.gz -
Subject digest:
9d2a4e8d418b1713ed723977ab197b42358455a3b32e5ac42ac32bcbe1f090c3 - Sigstore transparency entry: 1366284913
- Sigstore integration time:
-
Permalink:
Azhar-ud/clickup-work@ec456681bbb673ab3ff96b89630913af66f2dc8c -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/Azhar-ud
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@ec456681bbb673ab3ff96b89630913af66f2dc8c -
Trigger Event:
push
-
Statement type:
File details
Details for the file clickup_work-0.1.0-py3-none-any.whl.
File metadata
- Download URL: clickup_work-0.1.0-py3-none-any.whl
- Upload date:
- Size: 17.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
874e12c75d334de78d80e87e615e7d4851b0fd9dff8cbb87047c66aa74f92b83
|
|
| MD5 |
e3094953d8755bb6ce1936a66b0faaea
|
|
| BLAKE2b-256 |
1807da4166260fea5f6ca2c1f912671ec2869b0f5febd4fa7ca2624f771df4aa
|
Provenance
The following attestation bundles were made for clickup_work-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on Azhar-ud/clickup-work
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
clickup_work-0.1.0-py3-none-any.whl -
Subject digest:
874e12c75d334de78d80e87e615e7d4851b0fd9dff8cbb87047c66aa74f92b83 - Sigstore transparency entry: 1366284995
- Sigstore integration time:
-
Permalink:
Azhar-ud/clickup-work@ec456681bbb673ab3ff96b89630913af66f2dc8c -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/Azhar-ud
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@ec456681bbb673ab3ff96b89630913af66f2dc8c -
Trigger Event:
push
-
Statement type: