https://github.com/peterfication/num-peek
A CLI tool to peek into *.npy files
https://github.com/peterfication/num-peek
cli numpy python rust
Last synced: 7 days ago
JSON representation
A CLI tool to peek into *.npy files
- Host: GitHub
- URL: https://github.com/peterfication/num-peek
- Owner: peterfication
- License: mit
- Created: 2025-09-12T06:43:25.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2025-09-14T09:42:43.000Z (4 months ago)
- Last Synced: 2025-09-20T07:51:28.464Z (4 months ago)
- Topics: cli, numpy, python, rust
- Language: Rust
- Homepage:
- Size: 104 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# num-peek
A CLI tool that can peek into `*.npy` files.
## Installation
### Cargo
```bash
cargo install num-peek
```
### Homebrew
```bash
brew install peterfication/num-peek/num-peek
```
## Usage example
```bash
$ num-peek assets/demo.npy
Peek into assets/demo.npy
----------------------------------------
Dimensions: 2
Shape: [2, 3]
Type: Int8
----------------------------------------
Number of unique values: 6
Unique values: [1, 3, 4, 8, 12, 22]
Min value: 1
Max value: 22
```
### Yazi previewer
`num-peek` can be used together with [`piper`](https://github.com/yazi-rs/plugins/tree/main/piper.yazi) as a [Yazi](https://yazi-rs.github.io/) previewer:
```toml
# yazi.toml
[plugin]
prepend_previewers = [
{ name = "*.npy", run = 'piper -- num-peek $1' },
]
```
## Development
### Prerequisites
- Rust version >= `1.88.0`
- [just](https://github.com/casey/just) task runner
### Getting started
```bash
just ci
just run
```
## Roadmap
- Limit showing unique values to 10 values
- If there are more than 10 values, show the smallest 10 and the highest 10
- Mean, Standard Deviation, Median
- Different output formats: text, json, ...
- Some ASCII graph representation of the data
## License
This project is licensed under the MIT license ([LICENSE](LICENSE) or [opensource.org/licenses/MIT](https://opensource.org/licenses/MIT))