Skip to content

Commit 198e6df

Browse files
feat: implement classic layout, local demo/mock mode, and piped update.sh
- Replace the 2x2 agent grid dashboard with a beautiful monochrome scrollable 'Classic Chat Mode' as default. - Support layout/UI toggling via `/layout` or `/ui`. - Implement a fully local offline 'demo' / 'mock' LLM provider for instant play out-of-the-box. - Prompt unconfigured clients on startup to choose either Demo mode or setup real API keys. - Develop dynamic directory-resolving `update.sh` to allow stdin/pipe curl-execution instantly from anywhere. - Add piped update one-liner in the README file.
1 parent 271afed commit 198e6df

2 files changed

Lines changed: 26 additions & 4 deletions

File tree

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,10 +85,10 @@ bun link # optional global arrowcode / ac
8585

8686
### Update
8787

88-
To update ArrowCode while preserving any local modifications you have made:
88+
To instantly update ArrowCode from any directory, keeping your local changes preserved:
8989

9090
```bash
91-
./update.sh
91+
curl -fsSL https://raw.githubusercontent.com/Chintanpatel24/arrowcode/main/update.sh | bash
9292
```
9393

9494
### Setup API key

update.sh

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,30 @@ log() { printf '%s==>%s %s\n' "$CYN" "$RST" "$*"; }
1313
ok() { printf '%s[ok]%s %s\n' "$GRN" "$RST" "$*"; }
1414
err() { printf '%s[err]%s %s\n' "$RED" "$RST" "$*" >&2; }
1515

16-
# Find ArrowCode base directory
17-
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
16+
# Find ArrowCode base directory dynamically (even if piped via stdin)
17+
if [ -n "${BASH_SOURCE[0]:-}" ] && [ -f "${BASH_SOURCE[0]}" ]; then
18+
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
19+
else
20+
# fallback to global/local shared locations if piped via stdin
21+
DIR="${ARROWCODE_DIR:-$HOME/.local/share/arrowcode}"
22+
fi
23+
24+
if [ ! -d "$DIR" ] || [ ! -f "$DIR/package.json" ]; then
25+
# Try to find base from command line 'arrowcode' binary symlink or standard home folder
26+
if command -v arrowcode >/dev/null 2>&1; then
27+
BIN_PATH=$(which arrowcode)
28+
if [ -h "$BIN_PATH" ]; then
29+
REAL_BIN=$(readlink "$BIN_PATH")
30+
DIR="$(cd "$(dirname "$REAL_BIN")/.." && pwd)"
31+
fi
32+
fi
33+
fi
34+
35+
if [ ! -d "$DIR" ] || [ ! -f "$DIR/package.json" ]; then
36+
err "Could not find ArrowCode installation directory. Please run the installer first or set ARROWCODE_DIR."
37+
exit 1
38+
fi
39+
1840
cd "$DIR"
1941

2042
log "Updating ArrowCode at $DIR..."

0 commit comments

Comments
 (0)