feat(purpleflow): add PurpleFlow desktop app
CI / check (push) Has been cancelled

This commit is contained in:
2026-11-13 10:40:13 +03:00
parent f2abdc96f9
commit 7672ff56d3
4 changed files with 131 additions and 29 deletions
+30 -29
View File
File diff suppressed because one or more lines are too long
+2
View File
@@ -53,6 +53,7 @@ A custom Nix overlay and flake providing additional packages not found in upstre
| `omniroute` | Unified AI router with 160+ providers, auto fallback, MCP/A2A, OpenAI-compatible APIs | AI LLM Gateway |
| `open-code-review` | AI-powered code review CLI combining deterministic pipelines with an LLM agent for line-level review comments | AI Coding Agents |
| `pilotdeck` | Task-oriented AI Agent productivity platform (source-built Electron desktop app, plus a headless server command) with WorkSpace isolation, white-box memory, and smart routing | AI Agents |
| `purpleflow` | Desktop orchestrator that runs Claude Code and Codex through plan, implementation, review and acceptance stages | AI Coding Agents |
| `pdfcraft` | PDF reader and editor written from scratch in Rust — comments, forms, page organizing, redaction — plus a headless `pdfcraft-cli` with an opt-in MCP server | PDF Tools |
| `relay-free-llm` | RESTful API to route user prompts to various AI model providers with automatic failover and intent-based routing | AI LLM Gateway |
| `stakpak` | DevOps AI agent that generates infrastructure code, debugs Kubernetes, configures CI/CD, and automates deployments | AI Agents |
@@ -418,6 +419,7 @@ nix-overlay/
│ ├── omniroute/ # Unified AI router with 160+ providers
│ ├── open-code-review/ # AI code review CLI (deterministic + LLM agent)
│ ├── pilotdeck/ # Task-oriented AI Agent platform (source-built Electron desktop app)
│ ├── purpleflow/ # Electron orchestrator for Claude Code and Codex stages
│ ├── pdfcraft/ # PDF reader and editor in Rust, with pdfcraft-cli
│ ├── radar/ # Kubernetes UI (topology, timeline, Helm, GitOps)
│ ├── relay-free-llm/ # AI model provider routing gateway
+2
View File
@@ -0,0 +1,2 @@
{ pkgs, ... }:
pkgs.callPackage ./package.nix { }
+97
View File
@@ -0,0 +1,97 @@
{
lib,
buildNpmPackage,
fetchFromGitHub,
electron_44,
makeWrapper,
copyDesktopItems,
makeDesktopItem,
git,
nodejs_22,
}:
buildNpmPackage rec {
pname = "purpleflow";
version = "0.3.2";
src = fetchFromGitHub {
owner = "PurpleSchool";
repo = "purpleflow";
rev = version;
hash = "sha256-KfXWP5XMFPEerb7AazbAwfbwmJ5djqh6X0J3FRjxk88=";
};
# npm workspaces (core + app).
npmDepsFetcherVersion = 2;
npmDepsHash = "sha256-dfbC0y6Ot28crCG4qE4jxzlm5puw8F8zgFpiqc88TLA=";
# electron-vite only needs the electron package metadata, not the binary.
env.ELECTRON_SKIP_BINARY_DOWNLOAD = "1";
nativeBuildInputs = [
makeWrapper
copyDesktopItems
];
desktopItems = [
(makeDesktopItem {
name = "purpleflow";
desktopName = "PurpleFlow";
comment = "Run Claude Code and Codex through plan, implementation, review and acceptance stages";
exec = "purpleflow %U";
icon = "purpleflow";
categories = [ "Development" ];
terminal = false;
})
];
# Upstream's packaged build bundles the core into the main process and ships
# no node_modules; only out/ and the stage prompts are needed at runtime.
installPhase = ''
runHook preInstall
appRoot=$out/lib/purpleflow
mkdir -p $appRoot/app $appRoot/core
cp -r app/out $appRoot/app/out
cp app/package.json $appRoot/app/package.json
cp -r core/prompts $appRoot/core/prompts
# app.isPackaged stays false because Electron loads the app directory, as
# in `npm run dev`. The main process then resolves prompts as
# ../core/prompts from the app directory, which this layout satisfies; the
# updater and telemetry are disabled in that mode.
makeWrapper ${electron_44}/bin/electron $out/bin/purpleflow \
--add-flags "$appRoot/app" \
--add-flags "--no-sandbox" \
--prefix PATH : ${
lib.makeBinPath [
git
nodejs_22
]
}
mkdir -p $out/share/icons/hicolor/1024x1024/apps
cp app/build/icon.png $out/share/icons/hicolor/1024x1024/apps/purpleflow.png
runHook postInstall
'';
passthru = {
category = "AI Coding Agents";
updateScript = [
"nix-update"
"--flake"
".#purpleflow"
];
};
meta = with lib; {
description = "Desktop orchestrator that runs Claude Code and Codex through plan, implementation, review and acceptance stages";
homepage = "https://github.com/PurpleSchool/purpleflow";
changelog = "https://github.com/PurpleSchool/purpleflow/releases/tag/${version}";
license = licenses.mit;
sourceProvenance = with sourceTypes; [ fromSource ];
mainProgram = "purpleflow";
platforms = platforms.linux;
};
}