npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@warpgogol/repo-extract

v1.2.8

Published

Extract apps and packages from a TurboRepo monorepo into standalone public repositories

Downloads

1,116

Readme

@warpgogol/repo-extract

License CI npm Issues

Extract apps and packages from a TurboRepo monorepo into standalone public repositories.

Features

  • Extracts one or more workspace projects from a Turborepo monorepo
  • Standalone mode for single-package export (flattens to repo root)
  • Monorepo mode for multi-app export (preserves workspace structure)
  • Declarative post-process rules: copy, patch, delete
  • Optional @warpgogol/changelog-live integration for changelog generation
  • Secret scanning with configurable skip
  • Git history transfer by path prefix
  • Auto-generated CI workflow with npm publish
  • Zod-validated extract.config.yaml configuration
  • CLI + programmatic API

Quick start

# Install
npm install -g @warpgogol/repo-extract

# Extract a project (dry-run first)
repo-extract --config extract.config.yaml --dry-run

# Extract for real
repo-extract --config extract.config.yaml --dest /path/to/dest --verbose

Or use without global install:

npx @warpgogol/repo-extract --config extract.config.yaml --dry-run

CLI flags

| Flag | Description | | ----------------- | ------------------------------------------------ | | --config <path> | Path to extract.config.yaml (required) | | --dest <path> | Destination directory (overrides config default) | | --dry-run | Print plan without writing files | | --verbose | Verbose output |

Configuration

Create an extract.config.yaml in your project:

Standalone single-package export

projectDir: packages/my-package
destName: my-package
standalone: true

git:
  remote: [email protected]:user/my-package.git
  autoPush: true

Standalone mode flattens the package to the repo root — src/, tests/, package.json, etc. become top-level. Workspace dependencies (workspace:*) are replaced with *, and @warpgogol/* devDependencies are stripped (except the package itself).

Multi-app monorepo export

projectDir: apps/my-app
destName: my-app

appDirs:
  - apps/my-app/frontend
  - apps/my-app/backend

projectRootFiles:
  - README.md
  - LICENSE
  - CONTRIBUTING.md

git:
  remote: [email protected]:user/my-app.git
  autoPush: true

Monorepo mode preserves the workspace structure, copies monorepo config files (turbo.json, pnpm-workspace.yaml, etc.), auto-discovers package dependencies, and generates tsconfig.base.json.

Post-process rules

postProcess:
  - action: copy
    from: src/config.yaml
    to: dist/config.yaml
  - action: patch
    file: package.json
    find: "workspace:*"
    replace: "^1.0.0"
  - action: patch
    file: tsconfig.json
    removeLinesMatching: "customConditions"
  - action: delete
    path: AGENTS.md

Secret scanning

By default, the export scans for common secret patterns (AWS keys, private keys, GitHub tokens, generic API keys) before committing. If secrets are found, the export aborts.

skipSecretScan: true  # disable scanning (not recommended)
ignoreDirs:
  - .input
  - spec
excludePathSegments:
  - .input/signing-key
  - secrets
excludeExtensions:
  - .db
  - .sqlite

Optional changelog integration

If changelog.config.yaml exists in the project directory and @warpgogol/changelog-live is installed, the export automatically generates a changelog before committing. The generated commit message includes the AI-generated changelog summary.

Programmatic API

import { extractProject, loadConfig } from "@warpgogol/repo-extract";

const config = await loadConfig("extract.config.yaml");
await extractProject(config, { dest: "../my-package" });

Exports

| Export | Description | | ------------------------------------------ | -------------------------------------------- | | extractProject(config, options) | Run the full extraction pipeline | | loadConfig(path) | Load and validate an extract.config.yaml | | scanForSecrets(dir) | Scan a directory for secret patterns | | transferGitHistory(root, dest, prefixes) | Transfer filtered git history | | commitExport(dest, message, gitConfig) | Commit and optionally push | | generateCiWorkflow() | Generate a GitHub Actions CI workflow string | | fixStandalonePackageJson(dest) | Fix package.json for standalone export | | fixStandaloneVitestConfig(dest) | Fix vitest.config.ts for standalone export |

Changelog

CHANGELOG.md

Community

License

Apache-2.0 — see LICENSE