You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thank you for your interest in contributing to gim! This document outlines the process and guidelines for contributing to the project.
4
+
5
+
## Project Overview
6
+
7
+
gim is a fast, high-performance, modular system metrics and diagnostics CLI tool written in Rust. It collects and displays system metrics like CPU, memory, disk, and network usage.
8
+
9
+
## Getting Started
10
+
11
+
1. Fork the repository
12
+
2. Clone your fork: `git clone https://github.com/your-username/gim.git`
13
+
3. Create a new branch: `git checkout -b feature/your-feature-name`
14
+
4. Make your changes
15
+
5. Test thoroughly
16
+
6. Submit a pull request
17
+
18
+
## Development Setup
19
+
20
+
```bash
21
+
# Install Rust if you don't have it
22
+
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
23
+
24
+
# Build the project
25
+
cargo build
26
+
27
+
# Run the project
28
+
cargo run
29
+
30
+
# Run tests
31
+
cargo test
32
+
33
+
# Format code
34
+
cargo fmt
35
+
36
+
# Check for linting issues
37
+
cargo clippy
38
+
```
39
+
40
+
## Project Structure
41
+
42
+
```
43
+
src/
44
+
├── lib.rs # Main application logic
45
+
├── main.rs # Entry point
46
+
├── cli/ # Command line interface parsing
47
+
├── core/ # Core data structures and traits
48
+
├── modules/ # Metric collection modules
49
+
├── output/ # Output formatting logic
50
+
└── tui/ # Terminal UI (planned future feature)
51
+
```
52
+
53
+
## Adding New Modules
54
+
55
+
To add a new metric collection module:
56
+
57
+
1. Create a new file in `src/modules/` (e.g., `disk.rs`)
58
+
2. Implement the `MetricCollector` trait
59
+
3. Add the module to `src/modules/mod.rs`
60
+
4. Register the module in the main function in `src/lib.rs`
61
+
5. Update the CLI to accept your module as an argument (if needed)
gim is a modular system metrics collection library with a CLI interface. The API is designed to be extensible, allowing for new metric collectors to be easily added while maintaining a consistent interface.
6
+
7
+
## Core Components
8
+
9
+
### MetricCollector Trait
10
+
11
+
The `MetricCollector` trait is the core abstraction that all metric collection modules implement:
0 commit comments