Skip to content

Commit 89afa8d

Browse files
authored
Create README.md
1 parent 65fdff7 commit 89afa8d

File tree

1 file changed

+52
-0
lines changed

1 file changed

+52
-0
lines changed

README.md

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# `home-watcher`
2+
3+
`home-watcher` is a Linux utility that monitors your home directory for file creation activities outside of the [XDG Base Directory Specification](https://specifications.freedesktop.org/basedir-spec/latest/) and logs these interactions into an SQLite database.
4+
It's usefull for finding out which applications keep creating random files with such incredibly descriptive names such as `-6000.`, `.swo`, and `.serverauth.11972` 🤔.
5+
6+
## Usage
7+
8+
Home Watcher will need to run as root to access the Linux Audit system, but does not need any arguments.
9+
```sh
10+
sudo home-watcher
11+
```
12+
13+
### Options
14+
| Option | Description | Default |
15+
|-----------------------|----------------------------------------------------------------------------------------------|---------------------------------|
16+
| `-e, --excluded-dirs` | Specify additional directories to exclude from monitoring (relative to your home directory). | None |
17+
| `-l, --log-file` | Path to the SQLite database file for logging. | `XDG_DATA_HOME/home-watcher.db` |
18+
| `-i, --interval` | Interval (in milliseconds) to check audit logs. | 1500 |
19+
| `-h, --help` | Display the help message with usage details. | |
20+
| `-V, --version` | Display the current version of `home-watcher`. | |
21+
22+
Note: Common user directories like `Documents`, `Downloads`, `Pictures`, `Videos`, `Desktop`, and `Music` are excluded by default.
23+
24+
## Installation
25+
26+
1. **Build from Source**
27+
Clone the repository and compile the Rust project:
28+
```bash
29+
git clone https://github.com/QazCetelic/home-watcher.git
30+
cd home-watcher
31+
cargo build --release
32+
```
33+
The compiled binary will be available in the `target/release` directory.
34+
35+
2. **Install the Binary**
36+
Move the binary to a directory in your `PATH`, such as `/usr/local/bin`:
37+
```bash
38+
sudo mv target/release/home-watcher /usr/local/bin/
39+
```
40+
41+
## Database
42+
The database contains an `interaction` table with the following data.
43+
| **Name** | **Column** | **Description** |
44+
|------------|------------|----------------------------------------------------------|
45+
| **Id** | `id` | Identifies a specific interaction |
46+
| **Time** | multiple | When the file or directory was created |
47+
| **File** | `file` | The location of the newly created file or directory |
48+
| **Source** | `source` | The path of the program responsible for the creation |
49+
50+
## Contributing
51+
52+
If you find bugs, have suggestions, or want to contribute features, feel free to open an issue or submit a pull request.

0 commit comments

Comments
 (0)