stork-cli

CLI for interacting with the stork service

Stork CLI

CLI for interacting with the stork service

Get started with cordova or ionic

Get started with a raw iOS application

# Install
npm install stork-cli
 
# User related commands
stork login -u USERNAME -p PASSWORD
stork logout
stork me
 
# Project commands
stork init
stork project:list
stork project:create
stork project:info
stork project:link
stork deploy

In order to use Stork for your Cordova application, you have to install a few plugins and some configuration values. If you need help getting a basic cordova project created, head over to their docs.

$ npm install stork-cli
$ stork login
Email: user@email.com
Password (typing will be hidden):
Logged in as Stork User <user@email.com>
cordova plugin add https://github.com/StorkHQ/stork-cordova.git

You will need to choose a name for your project and tell Stork where your web code lives. To do this, you will need to include the -d ./www option when creating the projct. This tells Stork that your code lives in the www directory.

stork project:create "Awesome Project" -d ./www

Open your xcodeproj with xcode and navigate to the Info section of your project settings. Right click one of the Custom iOS Target Properties and select "Add Row". In the new row, set the key to StorkProjectToken and set the value to the token returned by the stork project:create command.

The last step necessary is to deploy your web code to Stork. To do this, simply do the following:

stork deploy

This will push the current code in your ./www directory out to any phones that have the app installed.

Use this tutorial to get a project set up that is raw iOS code with a web view.

$ npm install stork-cli
$ stork login
Email: user@email.com
Password (typing will be hidden):
Logged in as Stork User <user@email.com>
pod 'Stork', :git => 'https://github.com/StorkHQ/stork-ios.git'

You will need to choose a name for your project and tell Stork where your web code lives. To do this, you will need to include the -d option. You should provide a path relative to the root project directory to where the web code exists. This directory should have all of your web code and have an index.html in its root.

stork project:create "Awesome Project" -d ./www

Add the following code to your web view controller, "your-project-token" should be the token returned by the $ stork project:create command from step 4.

- (void)viewDidLoad
{
    [super viewDidLoad];
 
    // Initialize binds - configure Stork (default version will be 0.0.0) 
    [[Stork sharedClient] bindWithProjectToken:@"your-project-token" withVersion:@"your-project-version"];
    [[Stork sharedClient] bindWithWebView:self.webView];
 
    // Start Stork - Stork now handles downloads and updates 
    [[Stork sharedClient] start];
}

for more info on this SDK, see https://github.com/StorkHQ/stork-ios

Once you have the new iOS code installed on a phone, you just have to call

stork deploy

to get the latest web code onto your device.


Will log you in with the stork API and store your session for future commands. This is a pre-requisite for most other commands.

$ stork login -u nick@computer.org -p hunter2
Logged in as email@computer.org
$ stork login
Please enter your stork credentials.
Email: email@computer.org
Password (typing will be hidden):
Logged in as Stork User <email@computer.org>

Requires Authentication

Will display the email address of the user currently logged in.

$ stork me
email@computer.org

Requires Authentication

Will display the list of all of the active projects for the currently logged in user.

$ stork project:list

Will create a new project in the current directory. If a slug is provided for an existing project, it will link this local directory to the remote project

  • name the human readable name of the project - this is a positional argument ***required **
  • --slug or -s the unique identifier for this project (e.g. project_name)
  • --directory or -d the local directory where the web code for this project lives (defaults to ./)
$ stork init "New project name" -s awesome-project -d ./www

Will create a new project in the current directory.

  • name the human readable name of the project - this is a positional argument ***required **
  • --slug or -s the unique identifier for this project (e.g. project_name)
  • --directory or -d the local directory where the web code for this project lives (defaults to ./)
$ stork project:create "Awesome Project"  -s awesome-project

Display detailed information about the project linked to the current directory, or to the project identified by --project

  • --project or -p the unique identifier for this project (e.g. project_name)
$ stork project:info -p awesome-project

Will create link this local directory to the remote project identified by --project

  • --project or -p the unique identifier for this project (e.g. project_name) *required
$ stork project:link -p awesome-project

Requires Authentication

Will deploy the current project to stork on the current version.

$ stork deploy
/ Deploying... Deployed!
0w909uwt0349ut029t0293u50293u5