# Creating an Acorn Package

Have you been wondering how to get started with developing an Acorn package? We've updated the [Acorn Package Development](https://roots.io/acorn/docs/package-development/) documentation and published a [acorn-example-package repo](https://github.com/roots/acorn-example-package) to help you get started.

## Why create an Acorn package?

Think about Acorn packages similar to any other dependency, like a WordPress plugin. If you ever want to reuse functionality on your Acorn sites, or release functionality as an open-source library, then creating an Acorn package is the ideal way to do so. By extracting your code into a package, you can make it easier to maintain your reusable code.

Packages can be anything from a simple utility class to a complex system with configuration, views, and WP-CLI commands.

Acorn packages are installed by Composer, just like Acorn itself is.

If you aren't yet familiar with Laravel packages and service providers, make sure to read [Laravel's Package docs](https://laravel.com/docs/9.x/packages).

## Getting started with Acorn package development

Visit the [acorn-example-page repo](https://github.com/roots/acorn-example-package) on GitHub and then click the **Use this template** button to create a new repo with the template.

After creating your repo from the template, run the configure script to replace the placeholder names with your own:

```
$ php configure.php

```

 Copy

The script will prompt you for your vendor name, package name, namespace, and other details. See the [package development docs](https://roots.io/acorn/docs/package-development/) for non-interactive and dry-run usage.

You can work on a package locally by [defining a local repository for the package](https://roots.io/acorn/docs/package-development/#developing-an-acorn-package) on your WordPress project.

## Existing packages to reference

There are several [packages available for Acorn](https://roots.io/acorn/docs/available-packages/). Here are the first-party packages from Roots:

- [roots/acorn-ai](https://github.com/roots/acorn-ai) — WordPress Abilities API integration and AI support
- [roots/acorn-fse-helper](https://github.com/roots/acorn-fse-helper) — Bootstrap FSE support in Acorn-based themes
- [roots/acorn-mail](https://github.com/roots/acorn-mail) — WordPress SMTP using Acorn's mail configuration
- [roots/acorn-post-types](https://github.com/roots/acorn-post-types) — Simple post types and taxonomies using Extended CPTs
- [roots/acorn-prettify](https://github.com/roots/acorn-prettify) — Theme-agnostic front-end modifications
- [roots/acorn-user-roles](https://github.com/roots/acorn-user-roles) — Simple user role management

And a few community packages worth checking out:

- [40q/40q-seo-assistant](https://github.com/40Q/40q-seo-assistant) — Editor-side SEO metadata suggestions
- [generoi/sage-woocommerce](https://github.com/generoi/sage-woocommerce) — WooCommerce support for Sage 10
- [log1x/acf-composer](https://github.com/log1x/acf-composer) — ACF fields, blocks, widgets, and option pages
- [millipress/acorn-millicache](https://github.com/MilliPress/Acorn-MilliCache) — MilliCache integration for Acorn and Bedrock

Create your own packages and share them with us on [Roots Discourse](https://discourse.roots.io/)!