> For the complete documentation index, see [llms.txt](https://darkobits.gitbook.io/saffron/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://darkobits.gitbook.io/saffron/reference/api-reference.md).

# API Reference

Saffron exports two functions: `command` and `init`. The `command` function is almost identical to Yargs' `command()` function (object form) with several additional options. The `init` function is analogous to "calling" `yargs.argv` to initialize the argument parser.

When building CLIs with Saffron, `command` **must** be called once for each command the application needs to register. Then, `init` **must** be called to initialize the application.

{% content-ref url="/spaces/WaHfroU3mCFJQYNRDAOE/pages/h4ym6eaRJdmvh1Pf9eri" %}
[command](/saffron/reference/api-reference/command.md)
{% endcontent-ref %}

{% content-ref url="/spaces/WaHfroU3mCFJQYNRDAOE/pages/LjNmpBtPpDV0n7ZPT2Jv" %}
[init](/saffron/reference/api-reference/init.md)
{% endcontent-ref %}
