Running base64 with no FILE fell into the stdin branch and sat in a read
loop. That is exactly what GNU does, but on Windows it presents as a dead
terminal: the console echoes keystrokes so it looks like a prompt, output
buffers into 32K chunks so nothing comes back as you type, and there is no
hint that it is waiting for Ctrl+Z.
Guard the implicit case only. With no FILE operand and stdin attached to a
console, print the help text to stderr and exit 1. Pipes and '<' redirects
are untouched, so pipelines and the parity harness see no change -- the
harness always hands the child a stdin pipe via input=. An explicit '-'
still reads the console for anyone who does want to type input by hand.
Uses std::io::IsTerminal, so the crate stays dependency-free.
Runs both binaries over 154 cases and compares stdout, stderr and exit
code: encoding at every wrap width, decode round-trips, canonical-tail
rules, padding placement, concatenated streams, every prefix of a known
encoding, usage errors and file operands.
Locates a genuine GNU base64 rather than trusting /usr/bin/base64, since
distributions increasingly ship uutils there and it disagrees with GNU on
most malformed input — running against it fails 51 of the 154 cases, which
doubles as a negative control for the harness itself.
The three known differences are asserted as expected rather than ignored.
Windows has no base64 command; certutil is file-only, adds PEM markers
and cannot be piped. This is a real base64.exe matching GNU coreutils:
same flags (-d, -i, -w), stdin/stdout streaming, exit codes and error
messages, so existing muscle memory and scripts carry over.
Verified against coreutils 9.7 with a 153-case differential test. The
subtle behaviours are reproduced: bytes are emitted incrementally so a
stream that goes bad still writes its valid prefix, unpadded tails are
accepted only when canonically encoded, concatenated streams decode as
one, and -w0 suppresses the trailing newline.
Deliberate deviation: '\r' is skipped when decoding alongside '\n', as
CRLF base64 files are routine on Windows and GNU rejects them.
Zero dependencies, so the build works offline.
Single-file browser tool that decodes a base64 string and saves the
result back out as a file. No server, no dependencies, nothing uploaded.
Input cleanup covers data URIs, URL-safe alphabet, missing padding,
line wrapping, percent-encoding and wrapping quotes. Type detection
runs magic bytes (~30 signatures), then the data URI's declared MIME,
then UTF-8 content sniffing for SVG/HTML/XML/JSON/PEM; unrecognised
payloads fall back to .bin with a hex dump. Images, audio, video, PDF
and text are previewed inline before download.
C++ WebView2 host app driving a Python/rembg engine as a JSON-stdio
sidecar, with live before/after preview for images and video frames.
Also includes the original CLI (removebg.py) built on the same
core/ engine.
The WebView2 SDK is fetched on demand via
native/third_party/fetch-webview2.ps1 (wired into the Makefile)
rather than vendored, since it's ~15MB of prebuilt/generated
Microsoft SDK content. A Makefile provides make sync/build/run/clean
as the standard entry points.
- Add jwtf to cd into the repo root (with pass-through command support,
same pattern as phok)
- Add phok-dev alias forcing software H.264/H.265 decode and disabling
DMA-BUF rendering, working around this laptop's Intel iHD VA-API driver
corrupting hardware-decoded frames during Phokus dev builds
- Move nvm/bun/PATH setup above zinit init so PATH is fully resolved
before zoxide's hook and zinit's scheduler register - fixes intermittent
"command not found: zoxide/sleep/true" errors
- Drop zinit wait lucid turbo mode; its async scheduler was the source
of the above errors
- Rename up()'s local path var to target to avoid shadowing zsh's
special path array
Python tool to check for any merge or rebase conflicts between two branches
All operations done in temporary git worktrees leaving all dev repo's untouched
- Ctrl-managed configs are preferred.
- Repo-local duplicates for the same name + cwd are hidden
- Each service is one line: index, app name, source, cwd, config
- list-all still shows every discovered ecosystem file when you need to debug
stale/duplicate configs.
Add tool description covering auto-detection behviour, the ComfyUI and
Ollama model payload, skip-if-present logic, build/run instructions, and
the Windows requirement.