UNPKG

3.13 kBMarkdownView Raw
1# `alwaysai` [![Build Status](https://travis-ci.com/alwaysai/cli.svg?branch=master)](https://travis-ci.com/alwaysai/cli)
2The [alwaysAI](https://alwaysai.co) command-line interface (CLI)
3
4## Development strategy
5TODO Talk up front about the different development strategies because that would influence where the developer does things???
6
7- On the board
8- Host + ssh to board
9- Host + container
10
11## Prerequisites
12[Node.js](https://en.wikipedia.org/wiki/Node.js) is an open-source, cross-platform JavaScript run-time environment.
13Install Node.js using:
14
15- For Mac/Linux [nvm](https://github.com/nvm-sh/nvm#installation-and-update)
16- For Windows [nvm-windows](https://github.com/coreybutler/nvm-windows)
17
18Now open up a *new* terminal and do:
19```
20$ node --version
21```
22It should print something like "v12.2.0".
23
24
25## Install the `alwaysai` CLI
26Use the `npm` package manager, which ships with Node.js, to install the alwaysAI CLI:
27```
28$ npm install --global alwaysai
29```
30
31If you installed Node.js using the installer from [nodejs.org](https://nodejs.org/en/) instead of using `nvm`, you may need to do:
32```
33$ sudo npm install --global alwaysai
34```
35and enter your OS password.
36
37Verify that the CLI has been installed by running:
38```
39$ alwaysai version
40```
41It should print e.g. `0.2.10`.
42
43### Log in
44[Sign up](https://alwaysai.co/signup) for an alwaysAI account and complete the first-time login flow throw the web. Now authenticate yourself with the CLI:
45```
46$ alwaysai user login
47```
48You'll be prompted to enter your username and password. You're ready to start developing your first alwaysAI deep-learning computer vision application!
49
50### Initialize your application
51An alwaysAI application is a versioned collection of models, configuration files, and python code. In a terminal do:
52
53```
54$ mkdir my-app
55$ cd foo
56$ alwaysai app init
57```
58The `app init` command prompts you to configure your current directory as alwaysAI application. It creates the application configuration file `alwaysai.app.json` as well as a stub application `app.py` and `requirements.txt` if there isn't one already.
59
60### Find a model
61The alwaysAI model catalog is a collection of computer vision (CV) models that you can use in your application:
62```
63$ alwaysai app models search mobilenet
64@alwaysai/MobileNetSSD
65```
66
67```py
68TODO PYTHON
69```
70
71### Add a model to your application configuration
72You can add a model to your application using the command-line interface like so:
73```
74$ alwaysai app models add alwaysai/MobileNetSSD
75Added alwaysai/MobileNetSSD
76```
77Now you'll see in your application config file:
78
79```json
80{
81 "id": "alice/my-app",
82 "version": "0.0.0",
83 "models": {
84 "alwaysai/MobileNetSSD": "4.0.8"
85 },
86}
87```
88
89Models get pulled down from the alwaysAI cloud by the `app install` and/or `app target install` commands...
90
91
92### Install the application
93```
94$ alwaysai app install
95TODO
96```
97
98## More information
99If you encounter any bugs or have any questions or feature requests, please don't hesitate to file an issue or submit a pull request on this project's repository on GitHub.
100
101## Related
102
103## License
104MIT © [alwaysAI, Inc.](https://alwaysai.co)