PHPackages                             automattic/jetpack-stub-generator - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [CLI &amp; Console](/categories/cli)
4. /
5. automattic/jetpack-stub-generator

ActiveProject[CLI &amp; Console](/categories/cli)

automattic/jetpack-stub-generator
=================================

Extract stubs for specific functions/classes/etc from a codebase.

v2.0.1(3mo ago)2172GPL-2.0-or-laterPHPPHP &gt;=7.4CI passing

Since May 22Pushed 1mo ago2 watchersCompare

[ Source](https://github.com/Automattic/jetpack-stub-generator)[ Packagist](https://packagist.org/packages/automattic/jetpack-stub-generator)[ RSS](/packages/automattic-jetpack-stub-generator/feed)WikiDiscussions trunk Synced 1mo ago

READMEChangelogDependencies (8)Versions (6)Used By (0)

stub-generator
==============

[](#stub-generator)

Extract stubs for specific functions/classes/etc from a codebase.

This is intended for situations where you want stubs for specific parts of a large code base. If you want to extract stubs for everything, something like [php-stubs/generator](https://packagist.org/packages/php-stubs/generator) might work better for you.

Usage
-----

[](#usage)

This is a fairly simple command-line application:

```
vendor/bin/jetpack-stub-generator definition-file.php

```

### Options

[](#options)

\--json : Definition file is JSON rather than PHP.

\--output *&lt;file&gt;*: Write the stubs to the specified file, rather than to standard output.

### Definition file

[](#definition-file)

The definition file specifies which stubs are extracted from which files, and some other configuration.

The annotated example here is in PHP format. Equivalent JSON structure may be used with the `--json` flag.

```
