Skip to main content

Prerequisites

You need the following tools installed before building Progflow:
ToolVersionPurpose
Rust toolchain1.70 or newerCompiler and Cargo
gitAny recent versionCloning the repository
build-essentialC linker (gcc, make) required by some crates
Install Rust via rustup — it manages toolchain versions and makes upgrades straightforward.

Clone and build

1

Clone the repository

git clone https://github.com/Rehanasharmin/Progflow.git
cd Progflow
2

Compile a release binary

cargo build --release
The compiled binary is written to target/release/progflow.
3

Install the binary

Copy the binary to a directory on your $PATH:
cp target/release/progflow ~/.local/bin/
Verify the install:
progflow --version

Release profile

The [profile.release] section in Cargo.toml applies aggressive size and performance optimizations:
[profile.release]
opt-level = "z"
lto = true
codegen-units = 1
strip = true
SettingValueEffect
opt-level"z"Optimize for binary size rather than speed
ltotrueLink-time optimization across all crates
codegen-units1Single codegen unit for maximum optimization
striptrueStrip debug symbols from the final binary
These settings produce a small, self-contained binary with no runtime dependencies.

Dependencies

Progflow’s direct dependencies are declared in Cargo.toml:
CrateVersionPurpose
clap4Argument parsing (derive feature)
serde + serde_json1Config serialization and deserialization
dirs5Cross-platform config directory lookup
libc0.2Sending SIGTERM to tracked processes
once_cell1Lazy static for Termux detection
chrono0.4Date/time (available, reserved for future use)

Project structure

src/
├── main.rs          # CLI entry point — clap parser and command dispatch
├── config.rs        # FlowConfig struct, lockfile I/O
├── error.rs         # AppError enum (User, Io, Json)
├── platform.rs      # is_termux() detection, URL opener
└── commands/
    ├── on.rs        # progflow on
    ├── off.rs       # progflow off
    ├── list.rs      # progflow list
    ├── edit.rs      # progflow edit
    ├── new.rs       # progflow new
    └── note.rs      # progflow note

Design decisions

No async runtime. Progflow uses blocking I/O throughout. There are no concurrent operations that benefit from async, and removing the async runtime keeps the binary smaller and the code simpler. Platform detection. The is_termux() function in src/platform.rs checks two signals at startup: the $PREFIX environment variable (set by Termux to a path beginning with /data/data/com.termux) and the presence of the termux-open-url binary on $PATH. The result is cached with once_cell so the check only runs once. Lockfiles. When a flow is activated, Progflow writes a JSON lockfile to ~/.config/flow/<name>.lock containing the PIDs of all spawned processes. progflow off reads this file and sends SIGTERM to each PID before deleting the file. Exit codes. The binary exits with 0 on success, 1 for user errors (wrong arguments, flow not found), and 2 for IO or JSON parse errors.

Build docs developers (and LLMs) love