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
A lightweight, cross-platform CLI suite for indexing, visualizing, and navigating disk storage. Built for developers and power users who need to analyze large directory structures and explore them offline.
4
4
@@ -10,54 +10,43 @@ A lightweight, cross-platform CLI suite for indexing, visualizing, and navigatin
10
10
-**OS-Aware Exclusions**: Pre-configured to skip virtual filesystems (Linux) and protected system folders (Windows).
11
11
-**Centralized Config**: Control targets, output names, and verbosity via _config.ini_.
12
12
-**Silent Logging**: Comprehensive error tracking using the `logging` module to keep your terminal clean.
13
+
-**Cross-Platform**: Works seamlessly on Windows and Linux with the same codebase.
14
+
-**Global Usage**: Run the analyzer and navigator from any directory, with outputs saved to the current working directory.
13
15
14
16
## 🚀 Quick Start
15
17
16
-
### 1. Prerequisites
18
+
### 1. **Clone the Repository**
17
19
18
-
Ensure you have Python 3.10 or higher installed. Install the required dependencies:
The installer will guide you through setting up the necessary Python environment, installing dependencies, and configuring your default targets, as well as optionally adding the tools to your system for global access.
44
+
This works by creating scripts in your system PATH that point to the main Python files, allowing you to run `disk-nls` and `disk-nav` from any terminal.
45
+
46
+
Keep in mind that **erasing the files in the repository will break this functionality.** I'm working on a future update which will include an uninstaller script to clean up these PATH entries if needed.
47
+
48
+
If you do, however, want to remove the tools manually, simply delete the `disk-nls` and `disk-nav` scripts from your system PATH (e.g., `/usr/local/bin/` on Linux or the PATH environment variable on Windows).
49
+
61
50
## 📖 Usage Guide
62
51
63
52
### Step 1: Indexing _disk-nls.py_
@@ -66,11 +55,17 @@ Run the analyzer to create a JSON snapshot of your drive and a visual PDF chart.
66
55
67
56
```Bash
68
57
# Uses the default target from config.ini
69
-
python disk-nls.py
58
+
python3 disk-nls.py
70
59
71
60
# Manually specify a target and enable verbose logging
72
-
python disk-nls.py --target /var/www --verbose
61
+
python3 disk-nls.py --target /var/www --verbose
62
+
63
+
```
73
64
65
+
Or, if you have set up the global command:
66
+
67
+
```Bash
68
+
disk-nls # Optionally specify a target with --target and enable verbose logging with --verbose
74
69
```
75
70
76
71
### Step 2: Navigating _disk-nav.py_
@@ -79,7 +74,13 @@ Explore the generated index interactively using our built-in CLI tool:
79
74
80
75
```Bash
81
76
# Loads the default JsonOutput from config.ini
82
-
python disk-nav.py
77
+
python3 ./disk-nav.py
78
+
```
79
+
80
+
Or, if you have set up the global command:
81
+
82
+
```Bash
83
+
disk-nav # Optionally specify a source JSON snapshot with --source
83
84
```
84
85
85
86
#### Navigator Commands
@@ -91,7 +92,24 @@ python disk-nav.py
91
92
- help: Show available commands.
92
93
- exit: Close the navigator.
93
94
94
-
## ⚠️ Known Issues (Alpha)
95
+
## Notes
96
+
97
+
1. System directories and virtual filesystems are automatically excluded based on the OS, but you can customize this in the _config.ini_ file under the `[EXCLUSIONS]` section. If you get permission errors during indexing, run the program as administrator/root or adjust the exclusions to skip problematic directories. **NOTE THAT THIS IS VERY INCONVENIENT**, as the next time you want to analyze the disk, or even access the log, chart or index files, you will have to run the program with elevated permissions again. Run as an administrator/root only if you _NEED_ to analyze protected system folders or virtual filesystems, and be cautious when doing so, as it can lead to unintended consequences if you modify or delete important files.
98
+
99
+
```Bash
100
+
sudo disk-nls # Reads config.ini and runs with elevated permissions on Linux
101
+
# Or:
102
+
sudo python3 disk-nls.py --target / # Run with elevated permissions on Linux
103
+
# Or:
104
+
python3 disk-nls.py --target /home # Skip non-user directories on Linux
105
+
```
106
+
107
+
## ⚠️ Known Issues (Stable)
95
108
96
-
1. Some system-level folders remain inaccessible without Admin/Sudo privileges. Check _nls-errors.log_ for details when indexing system directories.
97
-
2. Very large disk indexes (multi-terabyte) may consume significant RAM during JSON generation. While we work on a solution for this, you might want to avoid indexing non-user directories.
109
+
1. The Ring Chart may not display correctly if there are too many small files or directories, as they can clutter the visualization.
110
+
2. The navigator does not currently support searching or filtering within the index, which can make it difficult to find specific items in large datasets. Future updates will include search functionality.
111
+
3. The tool does not currently handle symbolic links or shortcuts, which may lead to inaccurate size calculations or navigation issues.
112
+
4. The installer does not currently check for existing PATH entries before adding new ones, which could lead to conflicts if the tools are already installed or if there are naming collisions. I recommend reviewing your PATH after installation and removing any duplicates if necessary.
113
+
5. The tool does not currently support incremental updates to the index, meaning that you will need to re-run the analyzer to reflect any changes in the filesystem.
114
+
6. The navigation REPL is still very raw and prone to styling errors.
115
+
7. The tool is known to log some directories with incorrect sizes due to permission issues or special filesystem features. In some occasions, these might be reflected in the index with a size larger than the disk's own capacity. This is a known issue that I am working on fixing in a future update.
f"{Fore.YELLOW}Note: Long scan times may indicate a very large target or performance issues. Consider excluding more directories or running with verbose mode for detailed logging."
182
+
)
183
+
print(
184
+
f"{Fore.BLUE}Tip: If you get permission errors during scans, consider skipping system directories or running the tool with elevated permissions (e.g., as administrator or with sudo)."
185
+
)
175
186
176
187
generate_visuals(full_structure, args.output)
177
188
print(f"{Fore.GREEN}Index and chart saved successfully.")
0 commit comments