Skip to content
This repository has been archived by the owner on Jan 1, 2025. It is now read-only.

Commit

Permalink
Increase the cli version to v1.0.9 (#109)
Browse files Browse the repository at this point in the history
  • Loading branch information
shomix authored Apr 27, 2023
1 parent 210aa02 commit 9bf8904
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 44 deletions.
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

74 changes: 33 additions & 41 deletions packages/cli/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

<p align="center">

<picture>
Expand All @@ -13,23 +12,17 @@

</p>



<h1 align="center">Spheron CLI</h1>



<p align="center">
🧰 CLI tool for creating and deploying dapps to web3.
</p>



<p align="center">

<a href="https://www.npmjs.com/package/@spheron/storage" target="_blank" rel="noreferrer">

<img src="https://img.shields.io/static/v1?label=npm&message=v1.0.8&color=green" />
<img src="https://img.shields.io/static/v1?label=npm&message=v1.0.9&color=green" />

</a>

Expand All @@ -53,94 +46,93 @@

</p>



## Usage:



<p>To use Spheron CLI, you need to first install it using the following command:</p>

<pre><code>sudo npm install -g @spheron/cli</code></pre>

<p>Once you have installed the CLI, you can use the following commands to create and deploy dapps to web3:</p>

#

<h3>spheron create-dapp</h3>
<p>Use <code>spheron create-dapp</code> to create a template project that will easily be deployed on Spheron later. </p>
<pre><code>spheron create-dapp</code></pre>
This will open up a prompter that will allow you to select what kind of a template you want to create.

<code>spheron init --protocol {protocol} [--project {project_name}] [--path {path}] [--framework {framework}]]</code>
<code>spheron init --protocol {protocol} [--project {project_name}] [--path {path}] [--framework {framework}]]</code>

#

<h3>spheron init</h3>
<p>Use <code>spheron init</code> 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 <code> spheron publish </code> command. See more in spheron publish command section.</p>
<pre><code>spheron init</code></pre>
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:
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:

<code>spheron init --protocol {protocol} [--project {project_name}] [--path {path}] [--framework {framework}]]</code>
<code>spheron init --protocol {protocol} [--project {project_name}] [--path {path}] [--framework {framework}]]</code>
You can update this file manually afterwards to change default settings.

***Params options***
**protocol*** - [arweave/filecoin/ipfs]
**_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]
**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)

**Note**: * stands for mandatory (if all of mandatory params are not sent, prompter will be opened)
#

<h3>spheron publish</h3>
<p>Use <code>spheron publish</code> to upload your project configuration described in spheron.json file of your project. </p>
<pre><code>spheron publish</code></pre>
This command will look up at your spheron.json file and use its configuration to upload the project.

#

<h3>spheron upload</h3>
<p>Use <code>spheron upload</code> 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 <code>spheron login</code> before upload. </p>
<pre><code>spheron upload</code></pre>
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:

<code>spheron upload --path {file_path} --protocol {protocol} [--project {project_name}] [--organization {organizationId}] </code>
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:

<code>spheron upload --path {file_path} --protocol {protocol} [--project {project_name}] [--organization {organizationId}] </code>

***Params options***
**path*** - where is the location of dir/file that you want to upload (default is ./)
**protocol*** - [arweave/filecoin/ipfs]
**_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 <code>spheron login</code>

**Note**: * stands for mandatory (if all of mandatory params are not sent, prompter will be opened)
**Note**: \* stands for mandatory (if all of mandatory params are not sent, prompter will be opened)

#

#
<h3>spheron create-organization</h3>
<p>Use <code>spheron create-organization</code> 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 <code>spheron login</code> command, you will get new organization created if you already didn't have one set up. </p>
<pre><code>spheron create-organization</code></pre>
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:
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:

<code>spheron upload --name {organization_name} --username {organization_username} </code>
<code>spheron upload --name {organization_name} --username {organization_username} </code>

***Params options***
**name*** - name of your organization
**username*** - username represent short name for your organization.
**_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)

#

**Note**: * stands for mandatory (if all of mandatory params are not sent, prompter will be opened)

#
<h3>spheron login</h3>
<p>Use <code>spheron login</code> to connect to your Spheron account. This command will allow you to authenticate to Spheron and is mandatory to execute before doing <code>upload</code> or <code>publish</code> commands.</p>
<pre><code>spheron login</code></pre>
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:
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:

<code>spheron login [--github | --gitlab | --bitbucket] </code>

<code>spheron login [--github | --gitlab | --bitbucket] </code>

## Learn More

You can learn more about Spheron and Spheron CLI here:



- [Spheron Discord](https://discord.com/invite/ahxuCtm)

- [Spheron Twitter](https://twitter.com/SpheronFdn)
2 changes: 1 addition & 1 deletion packages/cli/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@spheron/cli",
"version": "1.0.8",
"version": "1.0.9",
"description": "CLI for working on projects and deploying them via Spheron ",
"keywords": [
"CLI",
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/configuration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import path from "path";
const configuration = {
spheronServerAddress: "https://api-v2.spheron.network",
spheronFrontendAddress: "https://app.spheron.network",
version: "1.0.8",
version: "1.0.9",
configFilePath: path.join(
process.env.HOME ? process.env.HOME : "/home/ubuntu",
".spheron/config.json"
Expand Down

0 comments on commit 9bf8904

Please sign in to comment.