From b83b568adbb0c9e6d7c06c44b3a4137cee918619 Mon Sep 17 00:00:00 2001 From: Clawdio Date: Tue, 24 Mar 2026 23:43:54 +0000 Subject: [PATCH] feat: add install script for PATH-accessible fawx binary - scripts/install.sh: builds from source, copies to ~/.local/bin/ - Warns if install dir is not on PATH - INSTALL_DIR env var for custom location - README updated with simpler quick start --- README.md | 13 ++++++------- scripts/install.sh | 31 +++++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+), 7 deletions(-) create mode 100755 scripts/install.sh diff --git a/README.md b/README.md index 62edc8c7..6bc34240 100644 --- a/README.md +++ b/README.md @@ -13,17 +13,16 @@ Fawx is a local-first agentic engine. It runs on your machine, calls LLMs for re ## Quick Start ```bash -# Build git clone https://github.com/fawxai/fawx.git -cd fawx && cargo build --release +cd fawx +./scripts/install.sh -# Configure (interactive wizard) -./target/release/fawx setup - -# Run -./target/release/fawx serve +fawx setup +fawx serve ``` +This builds from source, installs the `fawx` binary to `~/.local/bin/`, and walks you through configuration. Set `INSTALL_DIR` to change the install location. + Bring your own API key (Anthropic, OpenAI, or local models). Fawx never sends data anywhere except the LLM provider you choose. --- diff --git a/scripts/install.sh b/scripts/install.sh new file mode 100755 index 00000000..4c5de7e1 --- /dev/null +++ b/scripts/install.sh @@ -0,0 +1,31 @@ +#!/usr/bin/env bash +set -euo pipefail + +REPO_ROOT="$(cd "$(dirname "$0")/.." && pwd)" +INSTALL_DIR="${INSTALL_DIR:-$HOME/.local/bin}" + +main() { + echo "Building Fawx..." + cd "$REPO_ROOT" + cargo build --release -p fx-cli + + echo "Installing to $INSTALL_DIR..." + mkdir -p "$INSTALL_DIR" + cp "target/release/fawx" "$INSTALL_DIR/fawx" + chmod +x "$INSTALL_DIR/fawx" + + if ! echo "$PATH" | tr ':' '\n' | grep -qx "$INSTALL_DIR"; then + echo "" + echo "⚠ $INSTALL_DIR is not in your PATH." + echo " Add it to your shell profile:" + echo "" + echo " export PATH=\"$INSTALL_DIR:\$PATH\"" + echo "" + echo " Then restart your shell or run: source ~/.bashrc" + fi + + echo "" + echo "✓ Fawx installed. Run: fawx setup" +} + +main "$@"