How create documentation using terminal for application?

It is a part of the nightly toolchains - a change that happened only a week or two ago. Unless you're after a latest & greatest & EXPERIMENTAL branch, getting swift-docc and swift-docc-render from source and compiling them locally for use (as @Kyle-Ye suggests) is the much easier path to follow.

If you do get the nightly toolchain, then you can also use some new options to dump protected and private access symbols into the symbol graph and render documentation from that, which may be useful to you - depending on what you're trying to document for your app.