locio 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +90 -0
- package/package.json +35 -0
- package/target/release/locio +0 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Toufiq Hasan Kiron
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
# Locio 📊
|
|
2
|
+
|
|
3
|
+
**A powerful CLI tool to count lines and files in directories with extensive filtering options.**
|
|
4
|
+
|
|
5
|
+
## ✨ Features
|
|
6
|
+
|
|
7
|
+
- 📁 **Count files and lines** recursively in directories
|
|
8
|
+
- 🔍 **Extensive filtering** - patterns, extensions, directories, file names
|
|
9
|
+
- 📏 **Size filtering** - exclude files by minimum/maximum size
|
|
10
|
+
- 🎯 **Binary detection** - automatically exclude binary files
|
|
11
|
+
- 📊 **Multiple formats** - human-readable, JSON, CSV, TSV
|
|
12
|
+
- ⚡ **Fast and efficient** - built with Rust
|
|
13
|
+
- 🛠️ **Rich statistics** - detailed breakdown by file extension
|
|
14
|
+
|
|
15
|
+
## 🚀 Quick Start
|
|
16
|
+
|
|
17
|
+
### Installation
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
npm install -g locio
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
### Your First Count
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
# Count files and lines in current directory
|
|
27
|
+
locio
|
|
28
|
+
|
|
29
|
+
# Count in specific directory
|
|
30
|
+
locio /path/to/directory
|
|
31
|
+
|
|
32
|
+
# Count only Rust files
|
|
33
|
+
locio --include-ext .rs --stats
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## 📚 Documentation
|
|
37
|
+
|
|
38
|
+
**📖 [Full Documentation Available Here](https://github.com/kiron0/locio#readme)**
|
|
39
|
+
|
|
40
|
+
The documentation includes:
|
|
41
|
+
|
|
42
|
+
- Complete CLI reference
|
|
43
|
+
- All filtering options and patterns
|
|
44
|
+
- Advanced examples and use cases
|
|
45
|
+
- Output format specifications
|
|
46
|
+
- Best practices and tips
|
|
47
|
+
|
|
48
|
+
## 🛠️ Basic CLI Usage
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
# Count files and lines
|
|
52
|
+
locio
|
|
53
|
+
|
|
54
|
+
# Count only files
|
|
55
|
+
locio --files-only
|
|
56
|
+
|
|
57
|
+
# Count only lines
|
|
58
|
+
locio --lines-only
|
|
59
|
+
|
|
60
|
+
# Exclude patterns
|
|
61
|
+
locio --exclude ".*\.log$" --exclude-dir node_modules
|
|
62
|
+
|
|
63
|
+
# Include only specific extensions
|
|
64
|
+
locio --include-ext .rs,.ts,.js --stats
|
|
65
|
+
|
|
66
|
+
# Output in JSON format
|
|
67
|
+
locio --output json
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
## 💻 Quick Example
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
# Count Rust source files with statistics
|
|
74
|
+
locio --include-ext .rs --stats
|
|
75
|
+
|
|
76
|
+
# Count TypeScript files excluding node_modules
|
|
77
|
+
locio --include-ext .ts,.tsx --exclude-dir node_modules
|
|
78
|
+
|
|
79
|
+
# Count with size limits and binary exclusion
|
|
80
|
+
locio --max-size 5MB --no-binary --stats
|
|
81
|
+
|
|
82
|
+
# Count with JSON output
|
|
83
|
+
locio --stats --output json > stats.json
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
---
|
|
87
|
+
|
|
88
|
+
**📖 [Visit the full documentation](https://github.com/kiron0/locio#readme) for complete CLI reference, examples, and tutorials.**
|
|
89
|
+
|
|
90
|
+
_"Locio: Count your code, not your worries."_ 📊
|
package/package.json
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "locio",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "A powerful CLI tool to count lines and files in directories with extensive filtering options",
|
|
5
|
+
"bin": {
|
|
6
|
+
"locio": "target/release/locio"
|
|
7
|
+
},
|
|
8
|
+
"scripts": {
|
|
9
|
+
"start": "./target/release/locio",
|
|
10
|
+
"build": "source $HOME/.cargo/env && cargo build --release",
|
|
11
|
+
"prepublishOnly": "npm run build",
|
|
12
|
+
"version:check": "./scripts/version.sh",
|
|
13
|
+
"version:update": "./scripts/npm-version.sh",
|
|
14
|
+
"format": "npx prettier --write \"**/*.{js,json,ts,md}\""
|
|
15
|
+
},
|
|
16
|
+
"keywords": [
|
|
17
|
+
"cli",
|
|
18
|
+
"locio",
|
|
19
|
+
"file-counter",
|
|
20
|
+
"statistics",
|
|
21
|
+
"code-analysis",
|
|
22
|
+
"lines-of-code",
|
|
23
|
+
"code-stats"
|
|
24
|
+
],
|
|
25
|
+
"author": "Toufiq Hasan Kiron <hello@kiron.dev>",
|
|
26
|
+
"license": "MIT",
|
|
27
|
+
"files": [
|
|
28
|
+
"target/release/locio"
|
|
29
|
+
],
|
|
30
|
+
"repository": {
|
|
31
|
+
"type": "git",
|
|
32
|
+
"url": "https://github.com/kiron0/locio.git"
|
|
33
|
+
},
|
|
34
|
+
"homepage": "https://github.com/kiron0/locio#readme"
|
|
35
|
+
}
|
|
Binary file
|