Skip to content

feat: update libscope CLI as monorepo meta-package #497

@RobertLD

Description

@RobertLD

Summary

Part of #488. Update the root libscope package to function as a CLI meta-package that depends on all @libscope/* sub-packages, and move remaining orchestration code (src/LibScope.ts, file watcher, workspace utilities) here.

Problem / Motivation

Once the sub-packages are extracted, the root libscope package needs to be updated to depend on them rather than containing their code directly. It also remains the one justified "kitchen-sink" entry point — end users installing the CLI tool expect everything to work out of the box.

Proposed Solution

  • Update root package.json to depend on all @libscope/* packages
  • Move src/LibScope.ts (main orchestration class), src/core/watcher.ts, src/core/workspace.ts, and src/core/repo.ts into the CLI package (these are lifecycle/process-management concerns)
  • Keep src/cli/ here as the Commander.js entry point
  • Ensure all existing CLI commands continue to work by importing from the appropriate sub-packages

Acceptance Criteria

  • Root libscope package depends on all @libscope/* sub-packages in its package.json
  • All 30+ CLI commands pass integration tests after the migration
  • src/LibScope.ts is the orchestration entry point and imports from sub-packages (not from internal src/core/ paths)
  • npm install -g libscope installs the CLI and all sub-packages correctly
  • dist/cli/index.js, dist/mcp/server.js, and dist/core/index.js continue to exist at their current paths for backwards compatibility

Out of Scope

  • Changes to CLI command behaviour or flags
  • Changes to the LibScope public API class interface

Technical Notes

  • This is the last step — should be done after all sub-packages are extracted and publishing is set up
  • src/LibScope.ts currently imports directly from src/core/ — all those imports need to point to @libscope/core instead
  • Lifecycle modules to keep here: watcher.ts (chokidar), scheduler.ts (node-cron, moves from connectors or stays here), workspace.ts, repo.ts

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestrefactorCode refactoring

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions