Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
levkk committed Nov 18, 2024
1 parent 9b860eb commit 05c68b9
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 39 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Rwf ‐ Rust Web Framework

[![Static Badge](https://img.shields.io/badge/documentation-blue?style=flat)](https://levkk.github.io/rwf/)
[![Documentation](https://img.shields.io/badge/documentation-blue?style=flat)](https://levkk.github.io/rwf/)
[![Latest crate](https://img.shields.io/crates/v/rwf.svg)](https://crates.io/crates/rwf)
[![Reference docs](https://img.shields.io/docsrs/rwf)](https://docs.rs/rwf/latest/rwf/)

Expand Down
1 change: 1 addition & 0 deletions rwf-cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ version = "0.1.6"
edition = "2021"
license = "MIT"
description = "Rust Web Framework CLI"
readme = "README.md"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

Expand Down
49 changes: 11 additions & 38 deletions rwf-cli/README.md
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/)**.

0 comments on commit 05c68b9

Please sign in to comment.