MCPcopy Index your code
hub / github.com/egoist/get-packages

github.com/egoist/get-packages @v1.0.1

Chat with this repo
repository ↗ · DeepWiki ↗ · release v1.0.1 ↗ · + Follow
7 symbols 20 edges 2 files 0 documented · 0% 13 cross-repo links
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

💛 You can help the author become a full-time open-source maintainer by sponsoring him on GitHub.


@egoist/get-packages

npm version npm downloads

Get packages from a monorepo (pnpm, yarn, npm, lerna)

Install

npm i @egoist/get-packages

Usage

import { getPackages } from "@egoist/get-packages"

const workspace = await getPackages(".")

// For a monorepo:
// workspace.type => 'monorepo'
// workspace.npmClient => 'pnpm' | 'yarn' | 'npm'
// workspace.root => { data, path }
// workspace.packages => [{ data, path }]

// For a non-monorepo:
// workspace.type => 'non-monorepo'
// workspace.npmClient => 'pnpm' | 'yarn' | 'npm'
// workspace.package => { data, path }

Type docs: https://paka.dev/npm/@egoist/get-packages

Sponsors

sponsors

License

MIT © EGOIST

Core symbols most depended-on inside this repo

readJsonFile
called by 2
src/index.ts
getNpmClient
called by 2
src/index.ts
getPackages
called by 2
src/index.ts
loadSync
called by 0
src/index.ts

Shape

Function 7

Languages

TypeScript100%

Modules by API surface

src/index.ts4 symbols
test/index.test.ts3 symbols

For agents

$ claude mcp add get-packages \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page