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 PASSWORDstork logoutstork me # Project commands stork initstork project:liststork project:createstork project:infostork project:linkstork deploy
Getting Started
Cordova Based Applications (ionic, phone gap, etc)
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.
Step 1 - Install the cli
$ npm install stork-cli
Step 2 - Log into your Stork account
$ stork loginEmail: user@email.comPassword :Logged in as Stork User <user@email.com>
Step 3 - Install the cordova plugin
cordova plugin add https://github.com/StorkHQ/stork-cordova.git
Step 4 - Create your project
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
Step 5 - Set up your info.plist file
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.
Step 6 - Deploy
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.
Standard iOS Applications
Use this tutorial to get a project set up that is raw iOS code with a web view.
Step 1 - Install the cli
$ npm install stork-cli
Step 2 - Log into your stork account
$ stork loginEmail: user@email.comPassword :Logged in as Stork User <user@email.com>
Step 3 - Add Stork to your podfile
pod 'Stork', :git => 'https://github.com/StorkHQ/stork-ios.git'
Step 4 - Create your project
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
Step 5 - Add Stork init code to your web view
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
for more info on this SDK, see https://github.com/StorkHQ/stork-ios
Step 6 - Deploy
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.
Login
Will log you in with the stork API and store your session for future commands. This is a pre-requisite for most other commands.
--username or -u
email address used on storkhq.io--password or -p
password used on storkhq.io
$ stork login -u nick@computer.org -p hunter2Logged in as email@computer.org
$ stork loginPlease enter your stork credentials.Email: email@computer.orgPassword :Logged in as Stork User <email@computer.org>
Me
Requires Authentication
Will display the email address of the user currently logged in.
$ stork meemail@computer.org
Projects
Requires Authentication
project:list
Will display the list of all of the active projects for the currently logged in user.
$ stork project:list
alias - project:init
)
init (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
project:create
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
project:info
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
project:link
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
Deploy
Requires Authentication
Will deploy the current project to stork on the current version.
$ stork deploy/ Deploying... Deployed!0w909uwt0349ut029t0293u50293u5