# Confuse of yakut subcommand source code

**URL:** <https://forum.opencyphal.org/t/confuse-of-yakut-subcommand-source-code/1479>\
**Category:** CLI tools (Cynic/Yakut)\
**Created:** [October 11, 2021, 7:43am UTC](https://forum.opencyphal.org/t/confuse-of-yakut-subcommand-source-code/1479 "2021-10-11T07:43:59Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Cherish-forever](https://forum.opencyphal.org/user_avatar/forum.opencyphal.org/cherish-forever/32/802_2.png) [@Cherish-forever](https://forum.opencyphal.org/u/Cherish-forever)\
**Post date:** [October 11, 2021, 7:43am UTC](https://forum.opencyphal.org/t/confuse-of-yakut-subcommand-source-code/1479/1 "2021-10-11T07:43:59Z")

</div>

I am reading yakut source code, I have some confuse:

in file main.py Line 200, this line is hard to read.

```auto
subcommand: Callable[..., Callable[..., Any]] = main.command

```

what is the relatitionship between with

```auto
@yakut.subcommand()

```

and why no use

```auto
@click.group()

cli.add_command()

```

---

<div class="post-metadata">

**Author:** ![pavel.kirienko](https://forum.opencyphal.org/user_avatar/forum.opencyphal.org/pavel.kirienko/32/9_2.png) [@pavel.kirienko](https://forum.opencyphal.org/u/pavel.kirienko)\
**Post date:** [October 11, 2021, 7:49am UTC](https://forum.opencyphal.org/t/confuse-of-yakut-subcommand-source-code/1479/2 "2021-10-11T07:49:55Z")

</div>

I am not sure what `add_command()` is supposed to do. We use the `command` decorator (here as `main.command`) as [suggested by the docs](https://click.palletsprojects.com/en/7.x/commands/), except that it is aliased for brevity as `subcommand`. I don’t see any issues with this code.
