How to create a new cluster and do the server set up with command-line or an SDK? ⛏️

When first installing Couchbase Server, how can I create a new cluster or join a cluster, and set up and create new (default) nodes, with command-line or an SDK? Instead of using the web console UI.