Skip to content

Commit 19cf4a4

Browse files
authored
[#16] feat: improve README by adding new sections and info (#21)
* [#16] feat: improve README by adding new sections and info * [#16] feat: add examples and help output * [#16] feat: improve license section
1 parent 3d40fcf commit 19cf4a4

File tree

1 file changed

+116
-1
lines changed

1 file changed

+116
-1
lines changed

README.md

+116-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,117 @@
11
# fu
2-
A du replacement with more features
2+
3+
`fu` is a `du` alike CLI. It comes with a set a new features and a better output. For example, it allows you to sort and limit the number of entries and provides a colorized output to highlight heaviest entries.
4+
5+
## Installation
6+
7+
_TODO_
8+
9+
## Usage
10+
11+
```
12+
$ fu --help
13+
fu
14+
Search for a pattern in a file and display the lines that contain it
15+
16+
USAGE:
17+
fu [OPTIONS] <PATH>
18+
19+
ARGS:
20+
<PATH> The path to the file to read
21+
22+
OPTIONS:
23+
-h, --help Print help information
24+
--no-colors Disable the colors in the output
25+
--no-header Hide the headers from the output
26+
-s, --sort Sort the output based on the size
27+
-t, --top <TOP> Sort and limit the output to the N heaviest entries
28+
```
29+
30+
### Sort the entries by size
31+
32+
```
33+
$ fu --sort ./
34+
DISK BYTES PATH
35+
258M 238M target
36+
492K 71K .git
37+
12K 11K LICENSE
38+
8K 6K Cargo.lock
39+
12K 4K src
40+
4K 1K README.md
41+
4K 361B Cargo.toml
42+
4K 263B .github
43+
4K 131B .gitignore
44+
```
45+
46+
### Just the sum of the folder
47+
48+
```
49+
$ fu .
50+
DISK BYTES PATH
51+
259M 239M .
52+
```
53+
54+
### Sort and show top N entries
55+
56+
```
57+
$ fu --top 2 ./
58+
DISK BYTES PATH
59+
258M 238M target
60+
492K 71K .git
61+
```
62+
63+
### Use glob
64+
65+
```
66+
$ fu ./*.md
67+
DISK BYTES PATH
68+
4K 1K ./README.md
69+
```
70+
71+
### Hide headers
72+
73+
```
74+
$ fu --top 2 --no-headers ./
75+
258M 238M target
76+
492K 71K .git
77+
```
78+
79+
## Development
80+
81+
To develop `fu` you need to install the Rust language on your environment:
82+
83+
- [Get started with Rust](https://www.rust-lang.org/learn/get-started)
84+
85+
Then, you need to clone the project and start exploring the CLI:
86+
87+
```
88+
# Clone the repo
89+
git clone https://github.com/Angelmmiguel/fu.git && cd fu
90+
91+
# Run the CLI (development) against the current folder
92+
cargo run -- ./
93+
94+
# Run tests
95+
cargo tests
96+
97+
# Build the CLI
98+
cargo build
99+
100+
# Build using the release profile
101+
cargo build --release
102+
```
103+
104+
## Why?
105+
106+
I developed `fu` for two main reasons:
107+
108+
- I love to use small projects to learn new languages, frameworks, patterns, etc. So, I use `fu` as an excuse to start learning Rust language.
109+
- Try to offer an alternative and add missing features for well known CLIs I use everyday. I use `du`, although most of the times I combine it with other CLIs that helps me to filter and sort.
110+
111+
That's all! Feel free to request new features and let's discuss about how we can improve `fu` :)
112+
113+
## License
114+
115+
`fu` is released under the Apache License v2.0 (See [LICENSE](https://github.com/Angelmmiguel/fu/blob/main/LICENSE)).
116+
117+
Copyright 2022 [Angel M Miguel](https://angel.kiwi).

0 commit comments

Comments
 (0)