chaser
chaser is a lightweight file path tracker.
| English | Chinese |
|---|---|
| English Version | 简体中文 |
Introduction
chaser is an automated file path synchronization tool. It solves a common pain point: when paths or files referenced in configuration files change, you always need to manually update the corresponding paths in the configuration files.
With chaser, you only need to perform simple configuration, and it will automatically monitor changes to specified paths and update related references in configuration files in real-time. It can be closed after use.
In the future, it will also support running as a daemon process.
Features
- Automatically tracks file and directory path changes (renaming, moving).
- Updates the corresponding paths in specified configuration files.
- Lightweight and easy to configure.
- (Planned) Can be run as a daemon.
How to Use
-
Install Rust (if not already installed):
| -
Clone the repository:
-
Build and run:
-
Basic commands:
- Add a path to monitor:
cargo run -- add /path/to/monitor - Remove a path:
cargo run -- remove /path/to/monitor - List monitored paths:
cargo run -- list - Set language:
cargo run -- set-lang en(orzh-cn) - Show available languages:
cargo run -- available-lang
- Add a path to monitor:
-
Configuration: The configuration file is automatically created at
~/.config/chaser/config.jsonon first run.
How to Build
Prerequisites
- Rust 1.70 or later
Build Steps
-
Clone the repository:
-
Build the project:
-
Run tests:
-
Install globally (optional):
Dependencies
This project uses the following crates:
| Crate | Version | Description |
|---|---|---|
| notify | 8.2.0 | Real-time file system monitoring for path change detection |
| serde | 1.0.228 | Configuration file serialization and deserialization |
| serde_json | 1.0.145 | JSON format support for configuration storage |
| serde_yaml_ng | 0.10 | YAML configuration file parsing and writing |
| toml | 0.8 | TOML format configuration file support |
| csv | 1.3 | CSV file reading and updating for tabular data |
| clap | 4.0 | Command-line interface with subcommands and options |
| dirs | 6.0 | Cross-platform system configuration directory discovery |
| anyhow | 1.0 | Simplified error handling with context and chaining |
| sys-locale | 0.3 | System language preference detection for internationalization |
| owo-colors | 4.0 | Terminal color output for enhanced user experience |
Contributing
Contributions are welcome! Whether you want to fix a bug, add a feature, or improve the documentation, feel free to:
- Submit an Issue or Pull Request.
- Share ideas and discuss the architecture.
License
This project is licensed under either of
- Apache License, Version 2.0, (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.