Skip to content

Comments

Add claudelog CLI for terminal usage outside Claude Code#1

Merged
RemoteCTO merged 2 commits intomainfrom
add-cli-bin
Feb 12, 2026
Merged

Add claudelog CLI for terminal usage outside Claude Code#1
RemoteCTO merged 2 commits intomainfrom
add-cli-bin

Conversation

@RemoteCTO
Copy link
Owner

Summary

  • Add bin/claudelog CLI entry point that dispatches report and backfill subcommands via child process spawn
  • No changes to existing scripts — uses execFileSync to avoid touching CLI guard patterns
  • Add bin field to package.json for npm tooling awareness
  • Document CLI usage and two PATH setup options (symlink / shell profile) in README

Test plan

  • claudelog with no args prints usage to stderr, exits 1
  • claudelog --help and claudelog help print usage to stdout, exit 0
  • Unknown subcommand prints error + usage, exits 1
  • claudelog report --help passes through to report script
  • Exit codes forwarded from subcommands
  • claudelog backfill runs without error
  • Full test suite passes (128/129 — 1 pre-existing local config failure)
  • Lint clean

Dispatches report/backfill subcommands via child process
spawn, avoiding changes to existing script guards. Includes
PATH setup instructions in README.
Copilot AI review requested due to automatic review settings February 12, 2026 14:16
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds a unified CLI entry point for the Claude Code timelog plugin, enabling users to run claudelog commands from any terminal without an active Claude Code session. The implementation uses a lightweight dispatcher pattern that spawns child processes to execute existing scripts, preserving their CLI guard patterns.

Changes:

  • Add bin/claudelog dispatcher for report and backfill subcommands
  • Register CLI entry point in package.json bin field
  • Add comprehensive test coverage for CLI usage patterns
  • Document CLI usage and PATH setup options in README
  • Correct license in package-lock.json to match actual Apache-2.0 license

Reviewed changes

Copilot reviewed 2 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
bin/claudelog New CLI dispatcher that validates commands and spawns subcommand scripts via execFileSync
package.json Adds bin field mapping claudelog command to bin/claudelog
package-lock.json Updates license from MIT to Apache-2.0 to match LICENSE file
test/bin/claudelog.test.mjs Comprehensive test suite covering help, unknown commands, argument forwarding, and exit codes
README.md Documents CLI usage with examples and two PATH setup approaches (symlink and shell profile)

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@RemoteCTO RemoteCTO merged commit 75389a1 into main Feb 12, 2026
4 checks passed
@RemoteCTO RemoteCTO deleted the add-cli-bin branch February 12, 2026 14:38
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