@kszongic/chunk-cli
v1.0.0
Published
Split files or stdin into chunks of N lines — zero dependencies
Maintainers
Readme
@kszongic/chunk-cli
Split files or stdin into chunks of N lines. Zero dependencies.
Install
npm i -g @kszongic/chunk-cliUsage
# Split a file into 100-line chunks (default)
chunk-cli bigfile.txt
# Split into 50-line chunks in a specific directory
chunk-cli -n 50 -o parts/ data.csv
# Pipe from stdin
cat server.log | chunk-cli -n 1000 -p log_ -s .log
# Print to stdout with delimiter
chunk-cli --stdout -n 10 file.txtOptions
| Flag | Description | Default |
|------|-------------|---------|
| -n, --lines <num> | Lines per chunk | 100 |
| -o, --output <dir> | Output directory | . |
| -p, --prefix <str> | Filename prefix | chunk_ |
| -s, --suffix <str> | Filename suffix | .txt |
| --stdout | Print to stdout instead of files | off |
| -d, --delimiter <s> | Stdout chunk separator | --- |
License
MIT © 2026 kszongic
