https://github.com/igapyon/miku-grep-java
miku grep java
https://github.com/igapyon/miku-grep-java
Last synced: about 2 months ago
JSON representation
miku grep java
- Host: GitHub
- URL: https://github.com/igapyon/miku-grep-java
- Owner: igapyon
- License: apache-2.0
- Created: 2026-05-02T08:49:56.000Z (about 2 months ago)
- Default Branch: devel
- Last Pushed: 2026-05-02T11:17:28.000Z (about 2 months ago)
- Last Synced: 2026-05-02T11:23:51.150Z (about 2 months ago)
- Language: Java
- Size: 146 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# miku-grep-java
Java straight-conversion runtime for `miku-grep`.
This repository ports the upstream Node.js / TypeScript `miku-grep` CLI into a
Java 1.8-compatible Maven runtime while preserving the stdin / stdout JSON
contract as the primary compatibility target.
The Java CLI contract is documented in `docs/miku-grep-cli-spec.md`.
## Usage
Build the executable runtime jar:
```bash
mvn package
```
Run the CLI:
```bash
java -jar target/miku-grep.jar < request.json > result.json
java -jar target/miku-grep.jar --version
java -jar target/miku-grep.jar --help
```
The primary input is stdin JSON. The primary output is stdout JSON.
stdout is reserved for result JSON except for `--version` and `--help`.
## Minimal Request
```json
{
"version": 1,
"root": ".",
"query": {
"type": "literal",
"text": "RepositoryMap"
},
"search": {
"target": "content",
"recursive": true,
"maxDepth": 8
}
}
```
## Build Outputs
`mvn package` creates:
- `target/miku-grep.jar`
- executable shaded runtime jar
- `target/miku-grep-sources.jar`
- source jar
- `target/miku-grep-0.5.0-dist.zip`
- distribution zip containing the versioned runtime jar, README, LICENSE,
and runtime-oriented docs
## Development
Primary verification:
```bash
mvn test
mvn package
```
Repository-specific migration state is tracked in
`docs/remaining-migration-items.md`.
CLI JSON compatibility policy is tracked in `docs/cli-json-parity.md`.
## Runtime Differences
The Java runtime intentionally documents these accepted differences:
- regex search uses Java `Pattern` instead of Node.js `RegExp`
- Shift_JIS decoding uses Java charset handling instead of upstream Node
dependencies
Other observable JSON contract differences should be treated as regressions
unless explicitly recorded in the follow-up log.