> 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/cli-tool.md).

# CLI Tool

## CLI Reference :&#x20;

**DuckyMorph** provides a Typer-based command-line interface that allows users to parse DuckyScript, inspect the AST, and generate code for supported transpilers.

The CLI is designed to be simple, fast, and suitable for both development and experimentation.

## Global Behavior :&#x20;

When running any CLI command, DuckyMorph:

* Initializes internal console manager
* Loads package metadata
* Prepares parser and generator factory
* Optionally displays a startup banner (can be disabled)

To disable the banner:

```bash
duckymorph --no-banner
```

## Available Commands :&#x20;

### info

Displays general information about the installed **DuckyMorph** package.

#### Usage

```bash
duckymorph info
```

#### Output includes:

* Package name
* Version
* Author
* Description

***

### version

Displays the current installed version of **DuckyMorph**.

#### Usage

```bash
duckymorph version
```

***

### parse

Parses a DuckyScript file and converts it into an AST representation.

#### Usage

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

#### Options

* `--output <file.json>`\
  Saves the generated AST into a JSON file.

#### Example

```bash
duckymorph parse payload.ds --output ast.json
```

***

### transpilers

Lists all available code generators (transpilers) registered in the system.

#### Usage

```bash
duckymorph transpilers
```

#### Output

* Available generator names (e.g. `arduino`, etc.)

***

### generate&#x20;

Generates target-specific code from a DuckyScript file using a selected transpiler.

#### Usage

```bash
duckymorph generate payload.ds --transpiler arduino
```

#### Options

* `--transpiler <name>`\
  Selects the code generator to use
* `--output <file>`\
  Saves generated code to a file
* `--cp`\
  Copies generated code to clipboard

#### Example

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


---

# 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/cli-tool.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.
