Production-oriented Rust CLI for javinfo — API client plus local tools.
Docs: docs.javinfo.dev · API: https://api.javinfo.dev
AI / coding agents: see AGENTS.md (CLAUDE.md links to the same file).
curl -fsSL https://javinfo.dev/install.sh | bashUntil that URL is live, use the script from this repo:
curl -fsSL https://raw.githubusercontent.com/javinfo/cli/main/install.sh | bashThe script detects your OS/arch, downloads the matching GitHub Release asset, verifies sha256sums.txt, and installs to ~/.local/bin/javinfo.
| Env | Default | Meaning |
|---|---|---|
VERSION |
latest | Pin a release, e.g. VERSION=0.1.0 |
INSTALL_DIR |
~/.local/bin |
Where to place the javinfo binary |
REPO |
javinfo/cli |
GitHub owner/repo (forks) |
NO_VERIFY |
0 |
Set 1 to skip checksum verification |
# examples
VERSION=0.1.0 curl -fsSL https://javinfo.dev/install.sh | bash
INSTALL_DIR=/usr/local/bin curl -fsSL https://javinfo.dev/install.sh | bashEnsure the install dir is on your PATH.
GitHub Releases ship stripped builds:
| Platform | Archive |
|---|---|
| Linux x86_64 | javinfo-<ver>-x86_64-unknown-linux-gnu.tar.gz |
| Linux arm64 | javinfo-<ver>-aarch64-unknown-linux-gnu.tar.gz |
| macOS Apple Silicon | javinfo-<ver>-aarch64-apple-darwin.tar.gz |
Not shipped as prebuilts (build from source if needed):
- macOS Intel — free GitHub Intel runners retired
- Windows —
servecontrol uses Unix domain sockets (Unix/macOS only for now)
Browse Releases. Each release includes sha256sums.txt.
# Linux x86_64 example (replace VERSION)
VERSION=0.1.0
mkdir -p ~/.local/bin
curl -fsSL \
"https://github.com/javinfo/cli/releases/download/v${VERSION}/javinfo-${VERSION}-x86_64-unknown-linux-gnu.tar.gz" \
| tar -xz -C ~/.local/bin
chmod +x ~/.local/bin/javinfo
javinfo --versionRequires Rust stable (1.85+ recommended; built with 1.97):
# if needed
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
cargo build --release
# binary: target/release/javinfo
# install onto PATH (~/.cargo/bin/javinfo; re-run with --force to update)
cargo install --path . --forceEnsure Cargo’s bin dir is on your PATH (export PATH="$HOME/.cargo/bin:$PATH" or source "$HOME/.cargo/env"). Without installing, run ./target/release/javinfo … or cargo run --release -- ….
- Bump
versioninCargo.toml(must match the git tag without thevprefix). - Commit, then tag and push:
git tag v0.1.0
git push origin v0.1.0- The Release workflow builds multi-platform binaries and publishes the GitHub Release.
Get a key (jvi_…) from app.javinfo.dev, then:
javinfo login
# or non-interactive
javinfo login --api-key jvi_your_key_here
# or
export JAVINFO_API_KEY=jvi_your_key_hereConfig is stored at ~/.config/javinfo/config.toml (or $XDG_CONFIG_HOME/javinfo/config.toml), mode 0600:
api_key = "jvi_..."
# base_url = "https://api.javinfo.dev" # optional override
[players]
vlc = "/usr/bin/vlc"
mpv = "/usr/bin/mpv"javinfo login also scans PATH for video clients (vlc, mpv, ffplay, iina, celluloid, smplayer) and writes absolute paths under [players]. Use --no-scan-players to leave that table unchanged.
Key resolution order:
JAVINFO_API_KEYenv- config file
- error → run
javinfo login
Requests send the key as the x-javinfo-key header.
Look up a title via /movie. No provider pin by default (API waterfall). Optionally restrict with --providers.
javinfo movie EBOD-391
javinfo movie SSIS-001 --json
javinfo movie EBOD-391 --providers missav
javinfo movie CAWD-001 --providers fanza,missavHuman output (streams only when the answering provider has them, e.g. missav):
EBOD-391 source=missav …
master https://surrit.com/…/playlist.m3u8
variant https://surrit.com/…/1280x720/video.m3u8
…
Save API key to local config and scan PATH for video clients (see Auth above).
Local overview: API key (source + masked preview), configured players, and serve daemon.
javinfo status
javinfo status --jsonDoes not call the API or print the full key. Daemon section is non-fatal when the process is down (unlike javinfo serve status, which errors if nothing is running).
LAN HLS re-stream daemon with opaque session tokens. Resolve goes through the javinfo API (missav streams); the proxy injects Referer + browser UA, picks a height-capped variant, and rewrites .jpeg segments to .ts for ffmpeg-based players.
# One-shot: auto-starts the daemon if needed, prints a play URL
javinfo open EBOD-391
javinfo open EBOD-391 --with vlc # launch configured player
javinfo open EBOD-391 --with mpv
javinfo serve open EBOD-391 --ttl 2 # optional TTL (hours)
javinfo open EBOD-391 --json # machine-readable
# Daemon lifecycle
javinfo serve # foreground (logs to terminal)
javinfo serve --daemon # or: javinfo serve start
javinfo serve status
javinfo serve stopExample open output:
EBOD-391 …
play http://<lan-ip>:8787/s/<token>/EBOD-391.m3u8
meta http://<lan-ip>:8787/s/<token>/meta.json
poster https://…
with vlc (/usr/bin/vlc)
--with uses paths from [players] in config (filled by login); falls back to PATH if the entry is missing/stale. You can also pass an absolute binary path. The playlist path ends with {code}.m3u8 so players show the DVD code as the media title. Sessions do not expire by default; pass --ttl <hours> to override. Codes are no longer accepted as auth — only tokens issued by open.
| Flag | Env | Default |
|---|---|---|
--port / -p |
PORT |
8787 |
--max-height |
MAX_HEIGHT |
1080 |
--bind |
— | 0.0.0.0 |
--ttl (open) |
— | none (no expiry) |
--with (open) |
— | print URL only |
--no-start (open) |
— | auto-start daemon |
Runtime files (socket / pid / log): $XDG_RUNTIME_DIR/javinfo/ (fallback /tmp/javinfo-$UID/).
Global: -v / -vv for debug/trace logs (RUST_LOG also works).
src/
main.rs # entry, tracing, dispatch
cli.rs # clap root + subcommands
config.rs # ~/.config/javinfo
players.rs # detect/launch vlc, mpv, …
api/ # api.javinfo.dev client
commands/ # login, movie, open, serve, status
serve/ # HLS proxy domain logic
util/ # shared helpers
Add a future command by: new file under commands/, new Commands variant in cli.rs, dispatch arm in main.rs.
Agent-oriented architecture notes and conventions: AGENTS.md.