A saner Elixir library for launching and communicating with external OS processes, built on Erlang ports.
Porcelain is an Elixir library that provides a cleaner, more ergonomic interface for launching and communicating with external operating system processes. It solves the problem of Erlang's complex port API by offering sensible defaults and richer functionality for process management.
Elixir developers who need to interact with external system commands, shell scripts, or other OS processes from their applications.
Developers choose Porcelain because it dramatically simplifies working with external processes compared to raw Erlang ports, provides multiple I/O strategies, and offers both synchronous and asynchronous execution modes with a consistent API.
Work with external processes like a boss
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Replaces Erlang's complex port interface with intuitive functions like `exec()` and `spawn()`, making it straightforward to launch and manage external processes.
Supports multiple input/output methods including files, Elixir streams, and direct messaging, as shown with options like `in: {:path, 'input.txt'}` and `out: :stream`.
Allows asynchronous process spawning with `spawn()` for continuous data exchange, enabling real-time interaction with external programs.
Optional external driver provides advanced features like OS signal sending, extending functionality beyond basic process management when installed.
Advanced features require installing the goon binary separately, adding deployment complexity and potential portability issues.
The README admits known crashes when using Porcelain across two Erlang nodes, limiting reliability in distributed systems.
Error handling with the Goon driver is not fully shaped out, which could lead to unpredictable behavior in production.