# \`parseAsRoot\` analogue that returns the full command stack?

**URL:** <https://forums.swift.org/t/parseasroot-analogue-that-returns-the-full-command-stack/82479>\
**Category:** ArgumentParser\
**Created:** [October 2, 2025, 12:21pm UTC](https://forums.swift.org/t/parseasroot-analogue-that-returns-the-full-command-stack/82479 "2025-10-02T12:21:34Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![XDR](https://avatars.discourse-cdn.com/v4/letter/x/dbc845/32.png) [@XDR](https://forums.swift.org/u/XDR)\
**Post date:** [October 2, 2025, 12:21pm UTC](https://forums.swift.org/t/parseasroot-analogue-that-returns-the-full-command-stack/82479/1 "2025-10-02T12:21:34Z")

</div>

Is there a `parseAsRoot` analogue that returns the full command stack instead of just the last (sub)command (i.e. returns `[ParsableCommand]` instead of `ParsableCommand`)?

I need to access the root `ParsableCommand` instance for testing.

I know about the pending `@ParentCommand` for 1.6.2, but it would be nice to have a built-in way to get the whole command stack.

Thanks.
