CtrlK
CommunityDocumentationLog inGet started
Tessl Logo

tessl/npm-lerna--init

tessl install tessl/npm-lerna--init@6.6.0

Create a new Lerna repo or upgrade an existing repo to the current version of Lerna

Agent Success

Agent success rate when using this tile

75%

Improvement

Agent success rate improvement when using this tile compared to baseline

1.36x

Baseline

Agent success rate without this tile

55%

task.mdevals/scenario-6/

Monorepo Cleanup Tool

Build a command-line tool that helps developers clean their monorepo workspace by removing node_modules directories and optionally build artifacts from packages.

Requirements

The tool should provide the following capabilities:

Command-Line Interface

Create a CLI tool with the following commands:

  1. clean-all: Remove node_modules from all packages in the workspace
  2. clean-scoped: Remove node_modules from packages matching a specified pattern
  3. preview: Show what would be cleaned without actually removing anything

Features

  • Accept a package name pattern as an argument for the clean-scoped command
  • Support a --yes flag to skip confirmation prompts
  • Display a list of packages that will be cleaned before proceeding
  • Show a summary after cleanup (number of packages cleaned, directories removed)
  • Handle cases where node_modules doesn't exist gracefully

Expected Behavior

  • The tool should discover all packages in the workspace
  • When cleaning specific packages, use pattern matching to filter packages
  • Before removing directories, ask for user confirmation unless --yes is provided
  • Report which packages were cleaned successfully

Test Cases

  • Running the preview command lists all packages and their node_modules directories without removing them @test
  • Running clean-scoped with pattern "auth-*" only cleans packages whose names start with "auth-" @test
  • Running clean-all removes node_modules from all packages in the workspace @test

Implementation

@generates

Dependencies { .dependencies }

lerna { .dependency }

Provides monorepo workspace management and package discovery capabilities.

Version

Workspace
tessl
Visibility
Public
Created
Last updated
Describes
npmpkg:npm/@lerna/init@6.6.x
tile.json