1 | # cloudstitch-cli
|
2 |
|
3 | ## Install
|
4 |
|
5 | ```
|
6 | npm install -g @cloudstitch/cli
|
7 | ```
|
8 |
|
9 | The Cloudstitch CLI provides command line access to Cloudstitch, as well as a web server to facilitate easy development of widgets.
|
10 |
|
11 | ## Commands
|
12 |
|
13 | The following commands can be invoked by typing `cloudstitch <command>` on the command line.
|
14 |
|
15 | No login required:
|
16 |
|
17 | * `pull user/app` - Pulls down files to local disk
|
18 | * `serve` - Serves the current directory as a Cloudstitch widget.
|
19 | * `signup` - Helps you create and log into a new Cloudstitch account
|
20 | * `login` - Helps you log into Cloudstitch save your API key to ~/.config/cloudstitch.json
|
21 | * `use [<folder>]` - Provides usage information base of your widget
|
22 |
|
23 | Login required:
|
24 |
|
25 | * `clone <user>/<app> [folder]` - Clones the user/app on Cloudstitch and does a pull into `[folder]`. If `[folder]` is not specificed, creates one named `<app>`.
|
26 | * `create` - Helps you create a new app based on one of seven base project types.
|
27 | * `push [filename]` - Pushes `[filename]` (default: all files) to the remote Cloudstitch project.
|
28 | * `publish [--configure]` - Publishes static site to github repository. NOTE: you must complete github authentication on cloutstitch.com before this can be used.
|
29 |
|
30 | ## Cloudstitch Package format
|
31 |
|
32 | Cloudstitch project record information in a `cloudstitch.json` file stored at the project root.
|
33 |
|
34 | Available properties:
|
35 |
|
36 | * `user` - The username of the widget instance on Cloudstitch
|
37 | * `app` - The appname of the widget instance on Cloudstitch
|
38 | * `kind` - The type of widget (`widget` | `jekyll`, etc.)
|
39 |
|
40 | ## Authentication and Configuration
|
41 |
|
42 | Your command line configuration, including API key, is stored in file called `~/.config/cloudstitch.json`.
|
43 |
|
44 | The format of the config file is:
|
45 |
|
46 | ```json
|
47 | {
|
48 | "ApiKey": "Your API Key"
|
49 | }
|
50 | ```
|