> For the complete documentation index, see [llms.txt](https://0xlava.gitbook.io/ducky-morph/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://0xlava.gitbook.io/ducky-morph/quick-start.md).

# Quick Start

## Installation :&#x20;

You can install DuckyMorph either from PyPI or directly from source.

#### Install from PyPI

```bash
pip install duckymorph
```

#### Install from Source

```bash
git clone https://github.com/0xLava101/duckymorph.git
cd duckymorph
pip install -e .
```

### Basic Usage :&#x20;

Once installed, you can start using DuckyMorph programmatically in Python.

#### Parse DuckyScript and Generate Code

```python
from duckymorph.core.ducky_parser import DuckyParser
from duckymorph.core.code_generators.factory import CodeGeneratorsFactory

# Initialize parser
parser = DuckyParser()

# Parse DuckyScript input
parser.parse("""
REM Example payload
STRING Hello World
DELAY 1000
STRINGLN Done
""")

# Get AST
ast = parser.get_ast()

# Select generator
generator = CodeGeneratorsFactory.get_generator("arduino")

# Generate target code
code = generator.generate_code(ast)

print(code)
```

### CLI Quick Example :&#x20;

You can also use the CLI directly:

#### Parse a file

```bash
duckymorph parse payload.ds
```

#### Generate Arduino code

```bash
duckymorph generate payload.ds --transpiler arduino --output out.ino
```

#### List available transpilers

```bash
duckymorph transpilers
```


---

# 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, and the optional `goal` query parameter:

```
GET https://0xlava.gitbook.io/ducky-morph/quick-start.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
