@teer/cli
v0.9.4
Published
Digiteer CLI commands
Downloads
12
Readme
teer-cli
Digiteer command line utility
Prerequisites
- Nodejs v12.x or higher
- npm v6.x or higher
- rbenv or rvm for RoR projects
- yarn for ReactJs and NodeJs projects
- git source code management
Install
npm i -g @teer/cli
Verify installation by running:
teer --version
If you get a write access error on Windows, you'll need to run WSL or PowerShell as Administrator.
If you don't want to install or having trouble with installation, you can use npx
. See usage below.
Usage
teer <command> [...options]
Using npx
:
npx @teer/cli <command> [...options]
Commands
new-ror
Create a new Ruby on Rails project.
teer new-ror <site-name> [<starter-url>]
| Arguments | Description | | ----------- | ----------------------------------------------------------------------------------------------------------------------------------------- | | site-name | Your Ruby on Rails site name which is also used to create the project directory. | | starter-url | A Ruby on Rails starter URL. Defaults to [email protected]:digiteerbit/ror-starter.git. |
Examples
- Create an RoR site named
my-awesome-site
using the [email protected]:digiteerbit/ror-starter.git.
teer new-ror my-awesome-site
- Create an RoR site named
my-ecom-site
using a different starter repo.
teer new-ror my-ecom-site [email protected]:digiteerbit/kidlat-ror-starter.git
new-react
Create a new ReactJs project
teer new-react <site-name> [<starter-url>]
| Arguments | Description | | ----------- | --------------------------------------------------------------------------------------------------------------------------------------- | | site-name | Your ReactJs site name which is also used to create the project directory. | | starter-url | A ReactJs starter URL. Defaults to [email protected]:digiteerbit/react-starter.git. |
Examples
- Create a ReactJs site named
my-awesome-site
using the [email protected]:digiteerbit/react-starter.git.
teer new-react my-awesome-site
- Create a ReactJs site named
my-ecom-site
using a different starter repo.
teer new-react my-ecom-site [email protected]:digiteerbit/kidlat-react-starter.git
new-api
Create a new API project
teer new-api <api-name> [<starter-url>]
| Arguments | Description | | ----------- | -------------------------------------------------------------------------------------------------------------------------------- | | api-name | Your API name which is also used to create the project directory. | | starter-url | An API starter URL. Defaults to [email protected]:digiteerbit/api-starter.git. |
Examples
- Create an API named
my-awesome-api
using the [email protected]:digiteerbit/api-starter.git.
teer new-api my-awesome-api
- Create an API named
my-ecom-api
using a different starter repo.
teer new-api my-ecom-api [email protected]:digiteerbit/kidlat-api-starter.git
heroku
Execute heroku commands
teer heroku <command> [...]
| commands | Description | | --------- | ------------------------------------------------------------------------------------------------------ | | setup | Setup RoR project. If app does not exist, it will be created if you are using Digiteer heroku account. | | pg:modify | Modify PostgreSQL server plan. | | pg:backup | Create and download PostgreSQL backup. |
aws
Execute aws commands
teer aws <command> [...]
| commands | Description | | -------- | ----------------------------------------------- | | create | Create AWS Account under Digiteer Client group. |
Contributing
Clone
git clone [email protected]:digiteerbit/teer-cli.git cd teer-cli
Create your feature branch from
next
branch. Example:feature/new-feature-name
.git checkout next git checkout -b feature/new-feature-name
Install packages.
npm i
On a different terminal window, run
build:watch
.npm run build:watch
The script will build the project when it detects code changes.
Link this package locally so you can run it without publishing to npm.
npm link
Start coding your new feature.
Assuming you did steps 4 and 5 correctly, test your changes locally by going to any folder and running the
teer
command.Create automated test for your new feature if possible.
When you're done testing locally, unlink your package.
npm unlink
Push your branch
feature/new-feature-name
.Create pull request.
Nudge your peers to approve your pull request.
Wait for it to be merged.