npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

workctl

v0.8.0

Published

Unified CLI for task management across providers (ClickUp, Linear, etc.)

Readme

workctl

Unified CLI for tasks and documents across providers. One interface, multiple backends.

Currently supports ClickUp and Linear — configured at the same time and selectable per command with --provider. Create, move, and migrate tasks between providers, and manage documents (list/view/create/edit/delete). More providers on the roadmap. Designed for two audiences: developers working from the terminal, and AI agents / CI pipelines consuming structured JSON.

Table of Contents

Installation

npm install -g workctl

Requires Node.js >= 20.

Configuration

Interactive setup

workctl config init

The prompts first ask which provider to configure (ClickUp or Linear), then guide you through credentials. For either provider, the team/workspace is auto-discovered from the API key when possible.

  • ClickUp: generate an API token at https://app.clickup.com/settings/integrations/api; the Workspace ID is detected (or found as the last number in https://app.clickup.com/settings/workspace).
  • Linear: create a Personal API key at https://linear.app/settings/api; the team is detected (pick one if you belong to several).

Configuration is stored in ~/.config/workctl/config.json (mode 0600).

Non-interactive setup

For CI or agent environments:

# ClickUp (default)
workctl config init --api-key pk_xxx --team-id 12345 --format json

# Linear
workctl config init --provider linear --api-key lin_api_xxx --team-id <team-uuid> --format json

Alternatively, skip the config file entirely and run with environment variables only.

Environment variables

Env vars always take precedence over file values:

| Variable | Purpose | |----------|---------| | WORKCTL_PROVIDER | Provider name: clickup (default) or linear | | WORKCTL_CLICKUP_API_KEY | ClickUp API token | | WORKCTL_CLICKUP_TEAM_ID | ClickUp Workspace ID | | WORKCTL_LINEAR_API_KEY | Linear Personal API key | | WORKCTL_LINEAR_TEAM_ID | Linear team UUID | | WORKCTL_PROFILE | Profile from the global config to apply (overrides .workctl.json's profile) |

With the matching provider's API key and team ID set (e.g. WORKCTL_LINEAR_API_KEY + WORKCTL_LINEAR_TEAM_ID and WORKCTL_PROVIDER=linear), no config file is needed.

Profiles

The global config supports a profiles map for working across multiple workspaces, clients, or providers — a single install can hold both ClickUp and Linear credentials and switch between them per repo or per command:

{
  "provider": "clickup",
  "clickup": { "apiKey": "pk_xxx", "teamId": "111" },
  "linear": { "apiKey": "lin_api_xxx", "teamId": "team-uuid" },
  "profiles": {
    "acme": {
      "clickup": { "teamId": "222" },
      "defaults": { "listId": "list-acme" },
      "statusShortcuts": { "done": "shipped" }
    },
    "boxful-linear": {
      "provider": "linear"
    }
  }
}

A profile overlays the base config: any field it defines wins over the global value, including switching provider. This lets a Linear repo and a ClickUp repo coexist on the same machine with zero manual switching.

Both providers can be configured at once (the global config holds both a clickup and a linear block — config init merges, it does not overwrite). A single command targets one provider, resolved in this order:

  1. The --provider clickup|linear flag (per-command, highest).
  2. The active profile / WORKCTL_PROFILE / .workctl.json.
  3. The configured default provider.

So with both configured you can run workctl task view ENG-42 --provider linear and workctl task list --provider clickup --list 123 back to back without switching anything.

Per-repo config (.workctl.json)

Drop a .workctl.json at your repo root. It is discovered walking up from the current directory, stopping at the .git boundary:

{
  "profile": "acme",
  "defaults": { "listId": "list456", "branchPrefix": "feat" },
  "statusShortcuts": { "done": "shipped" }
}

Rules:

  • Credentials are rejected in .workctl.json. API keys live only in the global config.
  • Precedence (highest first): env vars > .workctl.json > referenced profile > global config.
  • With defaults.listId set, task list and task create no longer need --list.
  • In ClickUp, --list also takes a list URL or a saved view URL (app.clickup.com/<ws>/v/l/<view>); a view resolves to the list that holds it.

Policy and templates

A policy manifest (workctl.policy.json, version: 1) describes team conventions. This release uses templatesDir; branchPattern, lint and events are parsed and validated for later releases.

{ "version": 1, "templatesDir": "templates" }

templatesDir is resolved relative to the manifest file. The manifest is resolved in this order: --policy <file> > WORKCTL_POLICY > policy in .workctl.json (relative to that file) > policy in the active profile.

A template is a markdown file with YAML frontmatter (type, tags, optional priority) and a body used as the task description:

---
type: bug
tags: [bug]
priority: high
---
## Resumen
workctl template list --format json
workctl template show bug
workctl task create "[Bug] Login fails" --list abc123 --template bug --priority urgent

--template is mutually exclusive with --description / --description-file; explicit --tags and --priority override the template, and the command fails if no policy resolves.

Lint

workctl task lint checks a task against the policy's lint section (definition of ready). Rules: common.titlePattern, requireFields (priority|tags|description), tagsAnyOf, minDescriptionLength, and per-type requiredSections (## Heading, case- and accent-insensitive, name or any alias). A required section that is present but empty (only list markers or checkboxes), or that still holds a template hint such as <What fails> (text inside inline code or code blocks is ignored), is reported as emptySection:<name> / placeholder:<name>. The type comes from --type or is inferred from tags via typeFromTags; if undetermined only common rules run and a type-undetermined warning is reported.

workctl task lint abc123 --format json
workctl task lint --file draft.md --type bug --policy ./workctl.policy.json   # no provider needed
workctl task create "[Bug] Login fails" --list abc123 --template bug --lint

Output is { "ok": bool, "violations": [{ "rule", "message", "severity" }] }. Only error violations make ok false; then the exit code is 6 (LINT_FAILED) and the JSON is still printed on stdout. task create --lint creates nothing on failure, and task update --lint updates nothing: it lints the task as it would end up (the changed fields over the current ones). A draft file may carry frontmatter (title, type, tags, priority); without title the first # heading is used.

Command Reference

All commands accept --format json for structured output and --provider clickup|linear to target a provider (defaults to the configured default).

| Command | Description | |---------|-------------| | task search | Search tasks across the entire workspace | | task mine | List tasks assigned to you | | task list --list <ID> | List tasks from a specific list | | task view [ID] | View task details; --tree includes subtasks | | task create <NAME> --list <ID> | Create a task; --if-not-exists for idempotency, --parent for subtasks | | task update <ID> | Update status, priority, name, description, parent, tags, due date, custom fields | | task start [ID] | Move a task to the in-progress status of its list | | task done [ID] | Move a task to the done status of its list | | task branch <ID> | Create and switch to a git branch named after the task | | task pr-link [ID] | Comment the current branch's PR URL on the task | | task comments <ID> | List comments of a task | | task comment <ID> <TEXT> | Add a comment to a task (Markdown rendered as rich text in ClickUp) | | task attach <ID> --file <PATH> | Upload files as task attachments (--file repeatable; ClickUp only) | | task move <ID> --to-list <ID> | Move a task to a different list (same provider) | | task migrate <ID> --to <provider> --to-list <ID> | Copy a task to another provider (source left untouched) | | task delete <ID> | Delete a task | | task bulk | Bulk update tasks matching search filters; --dry-run to preview | | doc list | List documents in the workspace | | doc view <ID> | View a document in detail (full markdown) | | doc create <TITLE> | Create a document; --content / --content-file | | doc edit <ID> | Edit a document's title and/or content | | doc delete <ID> | Delete a document (Linear trashes; ClickUp unsupported via API) | | workspace spaces | List spaces in the workspace | | workspace members | List workspace members (ID, username, email) for --assignee | | workspace lists <SPACE_ID> | List task lists in a space | | list statuses <LIST_ID> | Show the valid statuses of a list | | config init | Configure API keys and provider | | introspect | Show the full API contract (for agents/tooling) |

Commands with [ID] accept an optional task ID: when omitted, the ID is derived from the current git branch (see Git bridge).

Working with Tasks

Task IDs

All commands accept both internal IDs (abc123) and custom IDs (DEV-123). Custom IDs are auto-detected.

The literal me resolves to your user ID wherever an assignee is accepted:

workctl task mine --status "in progress"
workctl task search --assignee me --format json

Git bridge

task branch creates a branch named <prefix>/<id>-<slug> from the task name and switches to it. Slugs longer than 40 characters are cut at the last word boundary that fits. On such a branch, view, start, done and pr-link no longer need an explicit task ID:

workctl task branch DEV-123          # -> feat/DEV-123-fix-login-flow
workctl task start                   # moves DEV-123 to in-progress
gh pr create && workctl task pr-link # comments the PR URL on DEV-123
workctl task done                    # moves DEV-123 to done

Prefix resolution: --prefix flag > defaults.branchPrefix in config or .workctl.json > feat.

The shape is configurable with the tokens {prefix}, {id} and {slug}: --pattern flag > policy branchPattern > defaults.branchPattern > {prefix}/{id}-{slug}. Task ID detection keeps working on custom shapes:

workctl task branch DEV-123 --pattern "{prefix}/preview-{id}-{slug}"   # -> feat/preview-DEV-123-fix-login-flow

task pr-link detects the PR of the current branch via the gh CLI; pass --url <URL> to skip detection (useful in CI or without GitHub).

Events

workctl event <name> runs the ordered actions the policy defines under events (requires a resolved policy). Actions are idempotent, so re-running an event changes nothing:

workctl event pr-opened --pr-url https://github.com/org/repo/pull/42
workctl event preview-deployed --task DEV-123 --preview-url https://pr-42.example.com
workctl event merged-dev --task DEV-123 --dry-run
  • status: moves the task to the first candidates entry that exists in its list (case-insensitive); no-op if already there, skipped with a warning if none exists.
  • comment: posts text with a hidden <!-- workctl:<marker> -->; skipped when a comment with that marker exists.
  • field: mode set (default) or append (adds the value only if absent).

Template variables: {{prUrl}}, {{previewUrl}}, {{branch}} (from --pr-url, --preview-url, --branch) plus any --var key=value. Task ID comes from --task or the git branch. Output is { event, taskId, dryRun, actions: [{ action, applied, skipped?, detail }] }; --dry-run writes nothing. Unknown events fail listing the known ones.

Status shortcuts

task start / task done resolve the right status per list: done picks the first done-type status, start the first custom-type status by order. Lists with several custom statuses can make start ambiguous — pin it explicitly with statusShortcuts in the config or .workctl.json:

{ "statusShortcuts": { "start": "in development", "done": "shipped" } }

Inspect a list's statuses with workctl list statuses <LIST_ID>.

Custom fields

task view shows custom fields with values; JSON output includes them as customFields. Dropdown and label fields are resolved to their option names on read.

Set fields with --field "Name=value" (repeatable). Field names are case-insensitive; dropdown/labels accept option names (labels take comma-separated values); numbers, dates (ISO) and checkboxes (true/false) are coerced automatically:

workctl task update DEV-123 --field "Severity=high" --field "Env=staging"
workctl task update DEV-123 --field "Areas=backend,infra"

Filter search results by field value (applied client-side on the fetched pages — combine with --all for workspace-wide filtering):

workctl task search --status open --field "Sprint=12" --all --format json

Unknown field or option names fail with the list of available ones.

Filter by task creator with --creator <name> (repeatable, case-insensitive substring, applied client-side): workctl task search --creator alice --all --format json.

Subtasks

Create a subtask with --parent; inspect a task's direct subtasks with --tree:

workctl task create "Write tests" --list abc123 --parent DEV-123
workctl task view DEV-123 --tree

In JSON output, --tree adds a subtasks array to the task object.

Idempotent creation

--if-not-exists skips creation when an open task with the same name (case-insensitive, exact match) already exists in the list, returning the existing task instead. Useful for agent loops and CI jobs that may retry:

workctl task create "Nightly report" --list abc123 --if-not-exists --format json

In JSON output the existing task carries "created": false.

Tags and due dates

workctl task create "Fix bug" --list abc123 --tags "bug,frontend" --due 2025-02-15
workctl task update DEV-123 --tags "bug"        # replaces the full tag set
workctl task update DEV-123 --clear-due
workctl task update DEV-123 --parent DEV-100    # make it a subtask of DEV-100
workctl task search --tag bug --due-before 2025-03-01

Note (ClickUp): the update endpoint ignores tags, so --tags diffs against the current tags via the tag endpoints — this costs one extra GET per update.

Markdown descriptions

Descriptions support full Markdown, inline or from a file:

workctl task create "Feature spec" --list abc123 --description-file ./spec.md
workctl task update DEV-123 --description-file ./updated-spec.md

In task view (human mode), Markdown is rendered for the terminal.

Comments accept Markdown too (task comment DEV-123 --file ./notes.md). ClickUp comments do not render Markdown, so workctl converts it to ClickUp rich text: bold, italic, inline code, links, bullet/numbered lists, checklists and fenced code blocks. Headings become bold lines and tables become code blocks, because ClickUp documents neither for comments. Linear receives the Markdown unchanged.

Assignees

--assignee / -a accepts a numeric ID, me, an email or a username. Emails and usernames are resolved against workctl workspace members (ClickUp); an unknown or ambiguous value fails before anything is written. On Linear, values pass through unchanged.

workctl task update DEV-123 -a me -a [email protected]

Attachments

workctl task attach DEV-123 --file ./spec.pdf --file ./catalog.xlsx --format json

Every path is checked before the first upload, so a typo does not leave a task half-attached. ClickUp only; Linear fails with an actionable error.

Search and pagination

task search supports repeatable filters (--status, --assignee, --tag), date ranges and closed-task inclusion:

workctl task search --created-after "2025-01-01" --updated-before "2025-03-31" --format json
workctl task search --assignee me --include-closed --format json

task list, task search and task mine accept --page <N> or --all (fetches every page, capped at 50 with a warning on stderr).

Bulk updates

task bulk combines search filters with a set of updates. Always preview first:

workctl task bulk --filter-status "in review" --set-status "done" --dry-run --format json
workctl task bulk --filter-status "in review" --set-status "done" --format json

Updates run with bounded concurrency. Failures do not abort the run: the result reports updated, taskIds and a failed array with per-task errors. There is no rollback — the underlying APIs are not transactional.

Moving tasks (ClickUp limitation)

ClickUp API v2 has no native "move task" endpoint. task move emulates it by adding the task to the destination list and removing it from the current one. This requires the "Tasks in Multiple Lists" ClickApp enabled in your Workspace, and ClickUp does not allow removing a task from its home list — in that case the task ends up in both lists and the command reports it.

workctl task move DEV-123 --to-list list456 --format json

Migrating tasks across providers

task migrate copies a task from one provider to another — the source task is left untouched (no close, no delete). --provider selects the source (defaults to the configured default); --to and --to-list select the destination.

# Copy a Linear issue into a ClickUp list
workctl task migrate ENG-42 --provider linear --to clickup --to-list 123 --format json

Portable fields (name, description, priority, tags, due date) carry over. Provider-scoped fields — assignees, parent, custom fields — do not cross and are reported in the skipped array. The copy takes the destination list's default status unless you pass --status.

Documents

workctl manages documents alongside tasks. --provider selects the backend, same as task commands.

workctl doc list --provider clickup --format json
workctl doc view <DOC_ID> --provider linear               # full markdown content
workctl doc create "Spec" --content-file spec.md --provider linear
workctl doc edit <DOC_ID> --content-file updated.md --provider clickup
workctl doc delete <DOC_ID> --provider linear

Provider differences:

  • ClickUp docs are hierarchical (a doc contains pages). doc view returns the concatenation of the pages as content and lists each page under pages; doc edit targets the doc's first page. ClickUp exposes no public delete endpoint, so doc delete returns PROVIDER_ERROR — remove the doc from the ClickUp UI.
  • Linear docs are flat markdown (no pages). doc delete trashes/archives the document.

Provider notes

Linear

Linear is backed by its official GraphQL API. Task IDs accept both the internal UUID and the human identifier (ENG-123), auto-detected like ClickUp custom IDs. In Linear a team plays the role of both "space" and "list" — use the team UUID wherever a list ID is required (e.g. defaults.listId), so task start / task done can resolve the team's workflow states.

Current coverage: search, mine, list, view, create, update, start, done, delete, comment(s), the git bridge (branch, pr-link), documents (doc list/view/create/edit/delete), and task migrate as a destination. The following are not yet supported and fail with an actionable error:

  • task move — change the workflow state with task update --status instead.
  • task bulk and custom fields (--field).
  • task attach and workspace members.
  • Numeric --page beyond page 0 — Linear uses opaque cursors; use --all to fetch every page.

Projects, cycles and labels-as-first-class are on the roadmap.

Agent and Programmatic Use

Every command supports --format json:

  • stdout: JSON result data
  • stderr: JSON error objects ({ "error", "code", "message" })

Exit codes are stable and mapped to error codes:

| Exit code | Error code | Meaning | |-----------|------------|---------| | 0 | — | Success | | 1 | VALIDATION_ERROR / unknown | Invalid input or unexpected failure | | 2 | CONFIG_ERROR | Configuration missing or invalid | | 3 | AUTH_ERROR | Authentication failed | | 4 | PROVIDER_ERROR | Provider API error | | 5 | RATE_LIMIT | Rate limit exceeded (after automatic retries) |

The HTTP client retries on 429 (honoring Retry-After) and 5xx with exponential backoff, and preemptively throttles using the provider's rate-limit headers.

Get the full machine-readable API contract (commands, flags, output examples, error specs, workflows):

workctl introspect --format json

Generate a .cursor/rules/workctl.mdc file for LLM workspace context:

workctl introspect --emit-rules

Generate a Claude Code skill (auto-loaded when task-management context appears):

# User-global: ~/.claude/skills/workctl/SKILL.md
workctl introspect --emit-rules --target claude

# Custom directory (e.g. project-level or ctk skill distribution)
workctl introspect --emit-rules --target claude --out .claude/skills

Generate an AGENTS.md block for Codex and any agent that reads AGENTS.md (alias: --target codex):

# ./AGENTS.md (created, or only the marked block is replaced; rest preserved)
workctl introspect --emit-rules --target agents

# Custom directory: <out>/AGENTS.md
workctl introspect --emit-rules --target agents --out ./docs

The block is wrapped in <!-- workctl:begin --> / <!-- workctl:end -->; re-running is idempotent. If the file has no markers, the block is appended.

To let Claude Code run workctl without permission prompts, add to .claude/settings.json:

{ "permissions": { "allow": ["Bash(workctl:*)"] } }

When installed via claude-master-toolkit, ctk install claude can invoke the --out form to place the skill alongside the rest of the ctk skill set.

Architecture

src/
  commands/         CLI commands (oclif)
  domain/           Models and ports (TaskProvider, WorkspaceProvider, DocumentProvider)
  providers/        Provider implementations (ClickUp, Linear, ...)
  shared/           Base command, errors, contract, formatters
  lib/              HTTP client, config service, git service, logger

Hexagonal architecture: commands depend on ports (interfaces), not implementations. Adding a new provider means implementing TaskProvider / WorkspaceProvider (and DocumentProvider for docs) and registering it in the factory, which resolves the active provider per command from --provider or the configured default.

Development

git clone https://github.com/itboxful/workctl.git
cd workctl
npm install
npm run build
./bin/dev.js task search

Run tests:

npm test

License

MIT