> ## Documentation Index
> Fetch the complete documentation index at: https://docs.wp-content.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Start a new plugin

> wpc plugin:start

Create a folder with a minimal plugin file. If no arguments or options are passed to the command, they can be entered interactively.

## Usage

```bash theme={null}
wpc plugin:start [options] [--] [<name> [<slug>]]
```

## Arguments

<ParamField body="name" type="string" required>
  Name of the plugin.
</ParamField>

<ParamField body="slug" type="string">
  This will be the folder name and the slug of the plugin. If you don’t specify the slug, the name will be used to create one.
</ParamField>

## Options

The options allow you to set the information in your plugin’s header ([see the WordPress documentation](https://developer.wordpress.org/plugins/plugin-basics/header-requirements/)).

<ParamField body="--plugin-uri" type="string">
  Plugin URI plugin header
</ParamField>

<ParamField body="--description" type="string">
  Description plugin header
</ParamField>

<ParamField body="--plugin-version" type="string" default="1.0.0">
  Version plugin header
</ParamField>

<ParamField body="--requires-at-least" type="string">
  Requires at least plugin header
</ParamField>

<ParamField body="--requires-php" type="string">
  Requires PHP plugin header
</ParamField>

<ParamField body="--author" type="string" default="<Organization Name>">
  Author plugin header
</ParamField>

<ParamField body="--author-uri" type="string" default="<Organization Website>">
  Author URI plugin header
</ParamField>

<ParamField body="--license" type="string">
  License plugin header
</ParamField>

<ParamField body="--license-uri" type="string">
  License URI plugin header
</ParamField>

<ParamField body="--text-domain" type="string">
  Text Domain plugin header
</ParamField>

<ParamField body="--domain-path" type="string">
  Domain Path plugin header
</ParamField>

<ParamField body="--network" type="string">
  Network plugin header
</ParamField>

<ParamField body="--no-interaction" type="boolean">
  Do not ask any interactive question
</ParamField>

## Examples

<Tabs>
  <Tab title="Create a plugin without any interaction">
    <CodeGroup>
      ```bash Input theme={null}
      $ cd /Users/mkey/Wordpress/wp-content/plugins/

      $ wpc plugin:start --author="Happy Monkey" --author-uri="https://mkey.fr" --plugin-version=1.0.0 --no-interaction dummy
      Plugin initialized at path : /Users/mkey/Wordpress/wp-content/plugins/dummy
      ```

      ```php Output file: dummy/dummy.php theme={null}
      <?php
       /**
       * Plugin Name: dummy
       * Description:
       * Version: 1.0.0
       * Author: Happy Monkey
       * Author URI: https://mkey.fr
       * Update URI: https://registry.wp-content.io
       *
       * Generated by WPC-CLI Generator (https://wp-content.io).
       */
      ```
    </CodeGroup>
  </Tab>

  <Tab title="Create a plugin interactively">
    <CodeGroup>
      ```bash Input theme={null}
      $ wpc plugin:start
      Plugin name: <dummy>
      Would you like to define plugin additional headers ? [N/y] <y>
      Plugin URI: <>
      Description: <Lorem ipsum dolor sit amet>
      Version: <1.0.1>
      Requires at least: <6.0>
      Requires PHP: <8.2>
      Author: <Happy Monkey>
      Author URI: <https://mkey.fr>
      License: <>
      License URI: <>
      Text Domain: <dummy>
      Domain Path: <>
      Network:<>

      Plugin initialized at path : /Users/mkey/Wordpress/wp-content/plugins/dummy
      ```

      ```php Output file: dummy/dummy.php theme={null}
      <?php
       /**
       * Plugin Name: dummy
       * Description: Lorem ipsum dolor sit amet
       * Version: 1.0.1
       * Requires at least: 6.0
       * Requires PHP: 8.2
       * Author: Happy Monkey
       * Author URI: https://mkey.fr
       * Text Domain: dummy
       * Update URI: https://registry.wp-content.io
       *
       * Generated by WPC-CLI Generator (https://wp-content.io).
       */
      ```
    </CodeGroup>
  </Tab>
</Tabs>
