Project Management

The project command allows to create and handle slyft projects. An overview of the subcommands can be displayed using:

$ slyft project

Usage: Slyft project COMMAND [arg...]

Project management

Commands:
  create, c     Create a new project
  settings      Create a new project
  list, ls      List all projects
  show, sh      Show an existing project
  delete, d     Delete an existing project
  build, b      build a project
  validate, v   validate a project
  status, st    job status of a projct

Run 'Slyft project COMMAND --help' for more information on a command.

Create

All slyft code actions are carried out under a project. Using the create subcommand, you can set up a new named project:

$ slyft project create --help

Usage: slyft project create [--name]

Create a new project

Options:
  --name=""    Name for the project

I.e.:

$ slyft project create --name "First Sample"
Project Name: First Sample
Details to the project (optional): My first sample slyft project

---- Project Details ----
     KEY    |             VALUE
+-----------+-------------------------------+
  Name      | First Sample
  Details   | My first sample slyft project
  CreatedAt | 2017-01-11 10:33:58 +0000 UTC
  UpdatedAt | 2017-01-11 10:33:58 +0000 UTC
  Settings  | {}

Settings

Projects may have settings, expressed in simple key/value style:

$ slyft project settings --help

Usage: slyft project settings --name KEY VALUE

Create a new project

Arguments:
  KEY=""       Name of the setting
  VALUE=""     Value of the setting

Options:
  --name=""    Name for the project

I.e.

$ slyft project settings --name "First Sample" file-packaging tar
Was successfully updated

VALUE parameter may be empty.

List

Lists all projects within your user account:

$ bin/slyft project list

  NUMBER |     NAME     |            DETAILS
+--------+--------------+-------------------------------+
       2 | First Sample | My first sample slyft project

Show

Shows details about a project.

$ slyft project show --help

Usage: slyft project show [--name]

Show an existing project

Options:
  --name=""    Name of the project

I.e.

$ slyft project show --name="First Sample"

---- Project Details ----
     KEY    |             VALUE
+-----------+-------------------------------+
  Name      | First Sample
  Details   | My first sample slyft project
  CreatedAt | 2017-01-11 10:33:58 +0000 UTC
  UpdatedAt | 2017-01-11 10:36:25 +0000 UTC
  Settings  | {"file-packaging"=>"tar"}

Validate

This subcommand triggers a validation job within the Slyft service and a given project:

$ slyft project validate --project 'slyft-tut-1'                                        

---- Job Details ----
       KEY      |             VALUE
+---------------+-------------------------------+
  Id            |                           106
  Kind          | validate
  Status        | new
  ProjectId     |                             8
  ProjectName   | slyft-tut-1
  CreatedAt     | 2017-01-16 13:52:28 +0000 UTC
  UpdatedAt     | 2017-01-16 13:52:28 +0000 UTC
  ResultMessage |
  ResultStatus  |                             0

The validate subcommand triggers the validation job, please see the status subcommand for more details on job status.

Build

The build subcommand is similar to validate. It triggers a Build job instead, leading to resulting output files.

$ slyft project build --project 'slyft-tut-1'                                        

---- Job Details ----
       KEY      |             VALUE
+---------------+-------------------------------+
  Id            |                           107
  Kind          | build
  Status        | new
  ProjectId     |                             8
  ProjectName   | slyft-tut-1
  CreatedAt     | 2017-01-16 13:52:28 +0000 UTC
  UpdatedAt     | 2017-01-16 13:52:28 +0000 UTC
  ResultMessage |
  ResultStatus  |                             0

Please see the status subcommand for more details on job status. Upon job completion, results can be viewed using the asset subcommand.

Status

Shows the Build Status of a project. This subcommand is interactive. All Jobs are show, a job can be selected by Row ID, then details are printed out:

$ slyft p status --project 'slyft-tut-1'                                                 

  NUMBER | ID  |   KIND   |  STATUS   | PROJECT NAME
+--------+-----+----------+-----------+--------------+
(...)
      10 | 103 | validate | processed | slyft-tut-1
      11 | 104 | build    | processed | slyft-tut-1
      12 | 105 | validate | processed | slyft-tut-1

Select a job id to show more details: 12

---- Job Details ----
       KEY      |             VALUE
+---------------+-------------------------------+
  Id            |                           105
  Kind          | validate
  Status        | processed
  ProjectId     |                             8
  ProjectName   | slyft-tut-1
  CreatedAt     | 2017-01-16 13:20:23 +0000 UTC
  UpdatedAt     | 2017-01-16 13:20:30 +0000 UTC
  ResultMessage | Successful
  ResultStatus  |                             0

Delete

Deletes a project INCLUDING all uploaded assets, results, settings etc.

$ slyft project delete --help

Usage: slyft project delete [--name]

Delete an existing project

Options:
  --name=""    Name (or part of it) of the project