# Creating a Grasshopper Plug-In Package

This is a step by step guide to creating a package for a Grasshopper plug-in.

Note: Yak is cross-platform. Not everything is hooked up on the Mac side yet, however. So, for now, this guide is aimed at Windows users only.

First, let’s assume you have a folder on your computer which contains all the files that you would like to distribute in your package. Something like this…

C:\Users\Bozo\dist
├── Marmoset.gha
├── Marmoset.dll
└── misc\


We’re going to use the Yak CLI tool to create the package, so open up a Command Prompt and navigate to the directory above.

> cd C:\Users\Bozo\dist


Now, we need a manifest.yml file! You can easily create your own by studying the reference. Alternatively, you can use the spec command to generate a skeleton file. We’ll do the latter here.

> "C:\Program Files\Rhino WIP\System\Yak.exe" spec

Found a Grasshopper plug-in: Plankton.gha

---
name: marmoset
version: 1.0.0
authors:
- <author>
description: <description>
url: <url>
secret:
id: c9beedb9-07ec-4974-a0a2-44670ddb17e4

Saved to C:\Users\Bozo\dist\manifest.yml


The spec command takes a look at the current directory and, if present, will glean useful information from the .gha assembly and use it generate a manifest.yml with name, version, authors, etc. pre-populated. If you haven’t added this information, then placeholders will be used.

Note: You might notice your plug-in's GUID lurking in the secret/id key. More information on how this is used can be found in the "Package Restore in Grasshopper" guide.

Open the manifest file with your favourite editor and fill in the gaps.

Afterwards, you should have something that looks a little like this…

---
name: marmoset
version: 1.0.0
authors:
- Will Pearson
description: >
This plug-in does something. I'm not really sure exactly what it's supposed to
do, but it does it better than any other plug-in.
url: example.com
secret:
id: c9beedb9-07ec-4974-a0a2-44670ddb17e4


Now that we have a manifest file, we can build the package!

> "C:\Program Files\Rhino WIP\System\Yak.exe" build

Building package from contents of C:\Users\Bozo\dist

Found manifest.yml for package: marmoset (1.0.0)
Found a Grasshopper plug-in: Marmoset.gha
Creating marmoset-1.0.0.yak

---
name: marmoset
version: 1.0.0
authors:
- Will Pearson
description: >
This plug-in does something. I'm not really sure exactly what it's supposed to
do, but it does it better than any other plug-in.
url: example.com
secret:
id: c9beedb9-07ec-4974-a0a2-44670ddb17e4

C:\Users\Bozo\dist\marmoset-1.0.0.yak
├── Marmoset.dll
├── Marmoset.gha
├── manifest.yml