-
-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
13 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,54 +1,27 @@ | ||
# Rwf CLI | ||
|
||
Rwf comes with its own command-line interface (CLI) which helps managing projects. | ||
[![Documentation](https://img.shields.io/badge/documentation-blue?style=flat)](https://levkk.github.io/rwf/) | ||
[![Latest crate](https://img.shields.io/crates/v/rwf-cli.svg)](https://crates.io/crates/rwf-cli) | ||
|
||
[Rwf](https://levkk.github.io/rwf/) comes with its own command-line tool that helps managing projects. The CLI can generate code for controllers, models, and migrations, and | ||
deploy Rwf-powered applications to production. | ||
|
||
## Installation | ||
|
||
Install the CLI using Cargo: | ||
You can install `rwf-cli` using `cargo`: | ||
|
||
``` | ||
$ cargo install rwf-cli | ||
``` | ||
|
||
If you have configured Cargo correctly, you should be able to use the CLI directly: | ||
|
||
``` | ||
$ rwf-cli --help | ||
``` | ||
|
||
If not, add `~/.cargo/bin/` to your `PATH`. | ||
|
||
## Commands | ||
|
||
Rwf CLI supports the following features: | ||
|
||
- migrations | ||
- project setup | ||
|
||
### Migrations | ||
|
||
#### Adding a migration | ||
|
||
``` | ||
$ rwf migrate add --name "name_of_your_migration" | ||
``` | ||
|
||
#### Running migrations | ||
The CLI should now be available globally. If not, make sure that `~/.cargo/bin/` is in your `PATH`. | ||
|
||
``` | ||
$ rwf migrate run | ||
``` | ||
|
||
#### Reverting the latest migration | ||
## Using the CLI | ||
|
||
``` | ||
$ rwf migrate revert | ||
$ rwf-cli --help | ||
``` | ||
|
||
#### Re-create database | ||
|
||
This will revert all migrations (**deleting all data**) and re-create all tables and indexes: | ||
## Documentation | ||
|
||
``` | ||
$ rwf migrate flush | ||
``` | ||
📘 The documentation **[is available here](https://levkk.github.io/rwf/)**. |