DEV Community

Cover image for Typetron has a CLI now
Ionel Cristian Lupu for Typetron

Posted on

Typetron has a CLI now

A few months ago I released the Beta version of Typetron and since then I've made a few changes to it and added some new features. One of it is the CLI.

The CLI was created to make dev's life easier by giving them a set of tools to automate some parts of the development process.

Installation

Installing Typetron's CLI is easy enough, as you would already expect:

$ npm install -g typetron
Enter fullscreen mode Exit fullscreen mode

This will create a global command called, well, typetron.

This command line tool has a few sub-commands that you can use. Here is a list of them:

  1. The new command
$ typetron new MyProject
Enter fullscreen mode Exit fullscreen mode

As you are already used to in CLIs, the new command creates a new Typetron project with a basic scaffolding and installs its dependecies.

  1. The routes command
$ typetron routes
Enter fullscreen mode Exit fullscreen mode

Tis command will print out all the routes in your Typetron project together with some information about them. It comes in handy when you have a lot of them in a big project.

  1. The migrate, migrate:rollback and migrate:reset commads
$ typetron migrate
Migrating...
Migrating 'CreateUsersTable'
Migrated 'CreateUsersTable'

$ typetron migrate:rollback
Rolling back...
Rolling back the 'CreateUsersTable' migration.
Reverted 'CreateUsersTable' migration.

$ typetron migrate:reset
Resetting database...
Enter fullscreen mode Exit fullscreen mode

These commands are used to manage your Typetron app migrations

Check the website typetron.org
Typetron Twitter @Typetron_
My twitter @ionellupu_
Come and leave a question on Reddit
Join the Facebook group
Let's talk on Slack

Top comments (0)