🧰 CLI tool for creating and deploying dapps to web3.
To use Spheron CLI, you need to first install it using the following command:
sudo npm install -g @spheron/cli
Once you have installed the CLI, you can use the following commands to create and deploy dapps to web3:
Use spheron create-dapp
to create a template project that will easily be deployed on Spheron later.
spheron create-dapp
This will open up a prompter that will allow you to select what kind of a template you want to create.
spheron init --protocol {protocol} [--project {project_name}] [--path {path}] [--framework {framework}]]
Use spheron init
to initialize a new Spheron project. This will create a new spheron.json file in your current path. This spheron.json file is a file describing your project. It will be used for spheron publish
command. See more in spheron publish command section.
spheron init
This will open up a prompter that will prompt you to describe your project. If you want to directly call it without prompter you can use:
spheron init --protocol {protocol} [--project {project_name}] [--path {path}] [--framework {framework}]]
You can update this file manually afterwards to change default settings.
Params options protocol* - [arweave/filecoin/ipfs] project - name (if not provided, path last segment will be taken by default) path - where is the location of dir/file that you want to upload (default is ./) framework -[static/react/vue/angular/next/preact/nuxt2/docusaurus/hugo/eleventy/svelte/gatsby/sanity/ionicreact/vite/scully/stencil/brunch/ionicangular]
Note: * stands for mandatory (if all of mandatory params are not sent, prompter will be opened)
Use spheron publish
to upload your project configuration described in spheron.json file of your project.
spheron publish
This command will look up at your spheron.json file and use its configuration to upload the project.
Use spheron upload
if you want to directly upload your file/directory to the specific protocol without need to setup the project. Using this command expects you to be logged in previously. To do that use spheron login
before upload.
spheron upload
This will open up a prompter that will prompt you to describe how you want to upload your directory/file. If you want to directly call it without prompter you can use:
spheron upload --path {file_path} --protocol {protocol} [--project {project_name}] [--organization {organizationId}]
Params options
path* - where is the location of dir/file that you want to upload (default is ./)
protocol* - [arweave/filecoin/ipfs]
project - name (if not provided, path last segment will be taken by default)
organization - you can override organizationId that will be used. By default it will take one that you have received after executing spheron login
Note: * stands for mandatory (if all of mandatory params are not sent, prompter will be opened)
Use spheron create-organization
if you want to create a new organization. This will set that organization as default and will use it later for upload/publish commands by default. Keep in mind that first time you execute spheron login
command, you will get new organization created if you already didn't have one set up.
spheron create-organization
This will open up a prompter that will help you set up your new organization. If you want to directly call it without prompter you can use:
spheron upload --name {organization_name} --username {organization_username}
Params options name* - name of your organization username* - username represent short name for your organization.
Note: * stands for mandatory (if all of mandatory params are not sent, prompter will be opened)
Use spheron login
to connect to your Spheron account. This command will allow you to authenticate to Spheron and is mandatory to execute before doing upload
or publish
commands.
spheron login
This will open up a prompter that will help you set up your new organization. If you want to directly call it without prompter you can use:
spheron login [--github | --gitlab | --bitbucket]
You can learn more about Spheron and Spheron CLI here: