> For the complete documentation index, see [llms.txt](https://docs.swplabs.com/peanut-for-wordpress/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.swplabs.com/peanut-for-wordpress/getting-started/coding-examples.md).

# Coding Examples

### Peanut examples GitHub repo

We've created a [repository](https://github.com/swplabs/peanut-examples) with example elements that show how to build with Peanut for Wordpress.

```bash
git clone git@github.com:swplabs/peanut-examples.git
```

This repo contains a sample "peanut.config.json" file that you'll need to update with your local Wordpress information. (See our "[Quickstart](/peanut-for-wordpress/getting-started/quickstart.md)" section for more information)

Once you've set everything up, get ready to take these examples for a spin. In the root directory of the cloned repo, you can run the following commands to get started:

```bash
npm install
npx peanut #this will compile the example elements
```

Once the compilation runs, you can go to your local Wordpress Admin area and enable the "Example Theme (Peanut For Wordpress)" theme.

If you have the Peanut for Wordpress CLI installed globally, you can run the following from your command line:

```bash
peanut -s /replace/with/path/to/repo/peanut-examples
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.swplabs.com/peanut-for-wordpress/getting-started/coding-examples.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
