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

# 1. Plugin Definition

> Scaffold the project, define the plugin class, validate, and run locally

<Note>
  This is **part 1** of the [Your First Plugin](/developers/plugins/your-first-plugin) tutorial.
</Note>

## Scaffold the project

Use the Noxus CLI to create a new plugin:

```bash theme={null}
pip install noxus-sdk
noxus plugin create --output-dir ./my-plugins
```

This creates the following structure:

```
my-plugin/
├── my_plugin/
│   └── __init__.py
├── pyproject.toml
└── manifest.json
```

Or create it manually. Start with `pyproject.toml`:

```toml theme={null}
[build-system]
requires = ["setuptools>=67", "wheel"]
build-backend = "setuptools.build_meta"

[project]
name = "weather-plugin"
version = "0.1.0"
description = "A weather data plugin for Noxus"
dependencies = [
  "noxus-sdk>=0.1.0",
  "httpx>=0.27.0",
]
```

## Define the plugin class

Create `weather_plugin/__init__.py`:

```python theme={null}
from noxus_sdk.plugins import BasePlugin, PluginConfiguration
from noxus_sdk.plugins.types import PluginCategory


class WeatherPluginConfig(PluginConfiguration):
    """Plugin-level configuration — empty for now."""
    pass


class WeatherPlugin(BasePlugin[WeatherPluginConfig]):
    name = "weather-plugin"
    display_name = "Weather Plugin"
    version = "0.1.0"
    description = "Provides weather data nodes and integrations"
    category = PluginCategory.GENERAL
    author = "Your Name"

    def nodes(self):
        return []  # We'll add nodes in the next section

    def integrations(self):
        return []  # We'll add integrations later
```

Every plugin needs:

| Field          | Description                                      |
| -------------- | ------------------------------------------------ |
| `name`         | Unique identifier (used for lookups and storage) |
| `display_name` | Human-readable name shown in the UI              |
| `version`      | Semantic version string (e.g. `"0.1.0"`)         |
| `description`  | Short description of what the plugin does        |
| `category`     | One of `GENERAL`, `DOCUMENT`, or `OTHER`         |
| `author`       | Author name                                      |

The `nodes()` and `integrations()` methods return lists of classes your plugin provides. We'll populate them in the next sections.

## Validate the structure

```bash theme={null}
noxus plugin validate --path ./weather-plugin
```

<Note>
  The `validate` command checks your plugin class, generates the manifest, and reports any issues. Run it often as you develop.
</Note>

## Run locally

```bash theme={null}
noxus plugin serve --path ./weather-plugin
```

This starts a local FastAPI server. You'll see output like:

```
PLUGIN_PORT:8505
INFO:     Started server process
INFO:     Waiting for application startup
INFO:     Application startup complete
```

Visit `http://localhost:8505/health` to verify it's running. The plugin won't do much yet — let's add a node.

<Card title="Next: First Node →" icon="arrow-right" href="/developers/plugins/tutorial/first-node">
  Create your first node with inputs, outputs, and logic.
</Card>
