Skip to content

Commit 8a6ce05

Browse files
committed
docs: update README
1 parent 5a94348 commit 8a6ce05

File tree

2 files changed

+32
-9
lines changed

2 files changed

+32
-9
lines changed

README.md

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -39,31 +39,33 @@ You can install the CLI as a binary or run it with [Cargo][3].
3939
To install as a binary into `~/.cargo/bin`:
4040

4141
```shell
42-
> cargo install --path .
42+
~ cargo install --path .
4343
```
4444

4545
Then you can run it:
4646

4747
```shell
48-
> redis-async-cli
48+
~ redis-async-cli
4949
```
5050

5151
To build and run without installation:
5252

5353
```shell
54-
> cargo build --release --bin redis-async-cli
54+
~ cargo build --release --bin redis-async-cli
5555
```
5656

5757
Then you can run it:
5858

5959
```shell
60-
> ./target/release/redis-async-cli
60+
~ ./target/release/redis-async-cli
6161
```
6262

6363
To use the CLI, you first need to run a Redis server. Then you can run this CLI in either interactive mode or command line mode:
6464

6565
+ Interactive mode:
6666

67+
In interactive mode, commands are case insensitive, but arguments are not, which means, `Ping`, `ping`, `PING` they refer to the same Redis command.
68+
6769
```shell
6870
> redis-async-cli
6971
Interactive mode. Type 'exit' to quit.
@@ -77,10 +79,19 @@ OK
7779

7880
+ Command line mode:
7981

80-
For available commands and options, run:
82+
```shell
83+
~ redis-async-cli ping
84+
PONG
85+
~ redis-async-cli set key value
86+
OK
87+
~ redis-async-cli get key
88+
"value"
89+
```
90+
91+
For all available commands and options:
8192

8293
```shell
83-
> redis-async-cli --help
94+
~ redis-async-cli -h
8495
```
8596

8697
## TLS/SSL
@@ -128,9 +139,11 @@ To build the CLI:
128139
~ cargo build --bin redis-async-cli
129140
```
130141

131-
TBD. Thinking of which may people prefer if they don't want to install Redis on their local.
142+
For [just][19] users, refer to the local [justfile](./justfile) for a list of targets:
132143

133-
Also due to gotchas from different RESP versions and Redis versions. A local dev may be necessary to for reproducible build and test environment.
144+
```shell
145+
~ just -l
146+
```
134147

135148
### Docs
136149

@@ -160,3 +173,4 @@ The project is licensed under the [MIT license](./LICENSE).
160173
[16]: https://redis.io/docs/latest/commands/rpop/
161174
[17]: https://redis.io/docs/latest/commands/lrange/
162175
[18]: https://redis.io/
176+
[19]: https://github.com/casey/just

justfile

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,38 +2,47 @@
22
@help:
33
just -l
44

5+
# show module tree
56
@module-tree:
67
echo "Showing module tree"
78
cargo modules structure --lib
89

10+
# show dependency tree
911
@dependency-tree:
1012
echo "Showing dependency tree"
1113
cargo tree
1214

15+
# format using rustfmt
1316
@format:
1417
echo "Formatting code"
1518
cargo fmt --all -- --check
1619

20+
# lint code using clippy
1721
@lint:
1822
echo "Linting code"
1923
cargo clippy --all --examples --tests --benches -- -D warnings
2024

25+
# run cargo fix
2126
@fix:
2227
echo "Fixing code"
2328
cargo fix --all --allow-dirty
2429

30+
# run all test suites
2531
@test:
2632
echo "Running tests"
27-
cargo test
33+
cargo test --all
2834

35+
# build the cli
2936
@build-cli:
3037
echo "Building CLI"
3138
cargo build --release --bin redis-async-cli
3239

40+
# run the cli
3341
@run-cli:
3442
echo "Running CLI"
3543
cargo run --release --bin redis-async-cli
3644

45+
# build the library
3746
@build-lib:
3847
echo "Building library"
3948
cargo build --release --lib

0 commit comments

Comments
 (0)