textileio / textile

Textile hub services and buckets lib
MIT License
227 stars 45 forks source link

`hub threads create` command #553

Open talentlessguy opened 3 years ago

talentlessguy commented 3 years ago

Would be cool to have a command to create new database threads instead of running the code manually.

import {Client, Identity, ThreadID, UserAuth} from '@textile/hub'

async function createDB (client: Client) {
  const thread: ThreadID = await client.newDB()
  return thread
}

the syntax would be this:

hub threads create <bucket_name>

> Success!
> New thread has been deployed on https://hub.textile.io/thread/<IPFS link>