Skip to content

Commit

Permalink
CLI default to help & CLI subpackage (#395)
Browse files Browse the repository at this point in the history
  • Loading branch information
expede authored Aug 30, 2020
1 parent 57a199d commit a71ae79
Show file tree
Hide file tree
Showing 421 changed files with 1,326 additions and 400 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,4 @@ jobs:

- name: Test
run: |
stack --no-terminal test --fast
stack test --no-terminal
113 changes: 0 additions & 113 deletions Makefile

This file was deleted.

102 changes: 1 addition & 101 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,104 +7,4 @@

Seamlessly deploy websites and store secure user data

## QuickStart

### MacOS

```shell
# IPFS on MacOS, otherwise https://docs.ipfs.io/introduction/install/
brew install ipfs
brew services start ipfs

brew install fission-suite/fission/fission-cli
```

Or to build from source:

```shell
# Dependencies
brew install stack
brew install postgresql

# Go to the Fission repo
cd $FISSION_REPO

# Build & install
stack install --no-nix fission:fission-cil

# Build only
stack build --no-nix fission:fission-cli
```

### Binary Releases

Grab the latest binary for your operating system from our [release page](https://github.com/fission-suite/fission/releases).

You'll find the most up to date instructions for [installation](https://guide.fission.codes/hosting/installation) and [getting started](https://guide.fission.codes/hosting/getting-started) in our [Guide](https://guide.fission.codes).

If using Linux, install `libpq-dev`

### Seamless Deployments
Deployments are just one step: `fission app publish`


```
$ fission up hello-universe/
🚀 Now live on the network
👌 QmRVvvMeMEPi1zerpXYH9df3ATdzuB63R1wf3Mz5NS5HQN
📝 DNS updated! Check out your site at:
🔗 hello-universe.fission.name
```

Simple as that!

If you'd like to redeploy everytime you change a file, use `fission app publish --watch`

## Web API Documentation

Available at https://runfission.com/docs

## Development

### Setup

Install [Haskell Stack](https://docs.haskellstack.org/en/stable/README/#how-to-install).

Install PostgreSQL database.

On MacOS with Homebrew:

`brew install stack`
`brew install postgresql`

### Create Database

```shell
$ psql
> CREATE DATABASE web_api;

```

Migrations will be performed automatically when running the server

### Commands

There is a `Makefile` filled with helpful commands. The most used in development is `make watch`.

```shell
# Setup env variables
make init

# Install development tools
make setup

# Watch project for changes, validating types and syntax
make dev

# Live code checking
make live

# Run server in debug/verbose mode
DEBUG=true make serve
```

This project can build multiple binaries. Please refer to the README for the specific package (e.g. fission-cli, fission-core).
File renamed without changes.
80 changes: 80 additions & 0 deletions fission-cli/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
# Fission CLI

![Continuous Integration](https://github.com/fission-suite/fission/workflows/Continuous%20Integration/badge.svg)
![License](https://img.shields.io/github/license/fission-suite/fission)
[![Discord](https://img.shields.io/discord/478735028319158273.svg)](https://fission.codes/discord)
[![Discourse](https://img.shields.io/discourse/https/talk.fission.codes/topics)](https://talk.fission.codes)

Seamlessly deploy websites and store secure user data

## QuickStart

### MacOS

```shell
# IPFS on MacOS, otherwise https://docs.ipfs.io/introduction/install/
brew install ipfs
brew services start ipfs

brew install fission-suite/fission/fission-cli
```

Or to build from source:

```shell
# Dependencies
brew install stack
brew install postgresql

# Go to the Fission repo
cd $FISSION_REPO

# Build & install
stack install --no-nix fission:fission-cil

# Build only
stack build --no-nix fission:fission-cli
```

### Binary Releases

Grab the latest binary for your operating system from our [release page](https://github.com/fission-suite/fission/releases).

You'll find the most up to date instructions for [installation](https://guide.fission.codes/hosting/installation) and [getting started](https://guide.fission.codes/hosting/getting-started) in our [Guide](https://guide.fission.codes).

If using Linux, install `libpq-dev`

### Seamless Deployments
Deployments are just one step: `fission app publish`


```
$ fission up hello-universe/
🚀 Now live on the network
👌 QmRVvvMeMEPi1zerpXYH9df3ATdzuB63R1wf3Mz5NS5HQN
📝 DNS updated! Check out your site at:
🔗 hello-universe.fission.name
```

Simple as that!

If you'd like to redeploy everytime you change a file, use `fission app publish --watch`

## Development

### Setup

Install [Haskell Stack](https://docs.haskellstack.org/en/stable/README/#how-to-install).

Install PostgreSQL database.

On MacOS with Homebrew:

`brew install stack`
`brew install postgresql`

### Build

``` shell
stack install fission-cli
```
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ shortcuts =
[ commandGroup "Shortcuts"
, metavar "SHORTCUT"
, command "setup" $ Command.User . User.Register <$> User.Register.parserWithInfo
, command "up" $ Command.App . App.Up <$> App.Up.parserWithInfo
, command "up" $ Command.App . App.Up <$> App.Up.parserWithInfo
]

subCommands :: Parser Command
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ parser :: Parser Options
parser = do
let verboseFlag = VerboseFlag False

_ <- switch $ mconcat
_ <- flag' () $ mconcat
[ help "Print version"
----------
, long "version"
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,23 @@ module Fission.Web.Client.App
, mkUpdateReq
) where

import Fission.Prelude
import qualified Crypto.PubKey.Ed25519 as Ed25519
import Network.IPFS.CID.Types

import Servant
import Servant.API
import Servant.Client

import Fission.Prelude

import Fission.Web.Client as Client
import Fission.Web.Routes (AppPrefix)
import qualified Fission.Web.App.Create as App.Create
import qualified Fission.Web.App.Update as App.Update
import qualified Fission.Web.Auth.Types as Auth
import qualified Fission.Web.App.Create as App.Create
import qualified Fission.Web.App.Update as App.Update
import Fission.Web.Auth.Token
import qualified Fission.Web.Auth.Types as Auth
import Fission.Web.Client as Client
import Fission.Web.Routes (AppPrefix)

import qualified Crypto.PubKey.Ed25519 as Ed25519
import Network.IPFS.CID.Types

import Fission.URL
import Fission.Authorization.ServerDID

import Fission.URL

type Create
= AppPrefix
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,15 @@ module Fission.Web.Client.Peers
, getPeers
) where

import Fission.Prelude
import qualified Network.IPFS.Types as IPFS

import Servant
import Servant.API
import Servant.Client

import qualified Fission.Web.IPFS.Peer as Peer
import Fission.Prelude

import Fission.Web.Client

import qualified Network.IPFS.Types as IPFS
import qualified Fission.Web.IPFS.Peer as Peer

import qualified Fission.CLI.Display.Cursor as Cursor
import qualified Fission.CLI.Display.Wait as CLI.Wait
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@ module Fission.Web.Client.User
, UpdatePK
) where

import Servant
import qualified Fission.Web.User as User
import Servant.API

import Fission.Web.Routes (UserPrefix)
import qualified Fission.Web.User as User

type Register = UserPrefix :> User.RegisterRoute
type Verify = UserPrefix :> User.VerifyRoute
Expand Down
File renamed without changes.
Loading

0 comments on commit a71ae79

Please sign in to comment.