Skip to content

Add a plain-text task count CLI - #78

Merged
eksno merged 1 commit into
alphafrom
testing/none-3s8dnqwb-390655c9
Sep 2, 2026
Merged

eksno merged 1 commit into
alphafrom
testing/none-3s8dnqwb-390655c9

Conversation

@eksno

@eksno eksno commented Sep 2, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Add a zero-dependency command that counts complete, incomplete, and total checkbox tasks.
  • Accept a file path or standard input.
  • Add usage instructions and examples.

Validation

  • npm run doctor
  • Representative piped input: 2 complete, 2 incomplete, 4 total.
  • README file input: 2 complete, 1 incomplete, 3 total.

View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

Summary by CodeRabbit

  • New Features

    • Added a command-line tool to count complete, incomplete, and total checklist tasks.
    • Supports checklist files and standard input, including common checkbox formats and optional Markdown bullets.
    • Added help output and clear error messages for invalid input or files without tasks.
    • Added an npm script for running the task-count tool.
  • Documentation

    • Added usage instructions, supported checklist formats, output details, and runtime requirements.

Station-Trailer-Version: 1
Station-Session-Id: 13d4318e-c31b-4605-8fff-0fb1cffa0391
Station-Item-Id: j57d2rvqqp60ba05974vz5nb3s8dnqwb
Station-Project-Id: jx75hdtjz30edfd9tt1xnzchvd877ac8
Station-Org-Id: jd70cbrtvqndraj07ebe09a56d860esj
@railway-app

railway-app Bot commented Sep 2, 2026

Copy link
Copy Markdown

🚅 Deployed to the testing-pr-78 environment in testing

1 service not affected by this PR
  • testing

@eksno
eksno enabled auto-merge (rebase) September 2, 2026 10:19
@coderabbitai

coderabbitai Bot commented Sep 2, 2026 •

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Team

Run ID: 76fe0a2a-4353-4825-9eef-b7ebdfbd3b4b

📥 Commits

Reviewing files that changed from the base of the PR and between 8869607 and 6ea4a05.

📒 Files selected for processing (3)
  • package.json
  • tools/task-count/README.md
  • tools/task-count/task-count.mjs

📝 Walkthrough

Walkthrough

Adds a Node.js task-count CLI that counts checklist tasks from a file or standard input. It includes argument validation, help text, formatted output, error handling, documentation, and an npm script entry.

Changes

Task count tool

Layer / File(s) Summary
Checklist counting contract
tools/task-count/task-count.mjs
countTasks counts complete markers ([x], [X]) and incomplete markers ([ ]) and returns complete, incomplete, and total counts.
CLI input and output flow
tools/task-count/task-count.mjs
The CLI validates arguments, reads a file or standard input, renders count results, handles help requests, and reports errors.
Tool wiring and usage documentation
package.json, tools/task-count/README.md
The npm script runs the tool. The README documents checklist formats, usage, Node.js requirements, and output.

Estimated code review effort: 2 (Simple) | ~10 minutes

Sequence Diagram(s)

sequenceDiagram
  participant User
  participant task-count CLI
  participant readTasks
  participant countTasks
  User->>task-count CLI: Provide file path or -
  task-count CLI->>readTasks: Read UTF-8 task source
  readTasks-->>task-count CLI: Return source text
  task-count CLI->>countTasks: Count checklist tasks
  countTasks-->>task-count CLI: Return counts
  task-count CLI-->>User: Print rendered counts or error
Loading

Poem

I hop through checklists, neat and bright,
[x] and [ ] come into sight.
Counts bloom in rows of three,
The npm script runs with glee,
A tidy task tally for me.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch testing/none-3s8dnqwb-390655c9

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@eksno
eksno merged commit 456ff35 into alpha Sep 2, 2026
2 of 3 checks passed
@eksno
eksno deleted the testing/none-3s8dnqwb-390655c9 branch September 2, 2026 10:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant