Skip to content

Commit 2946147

Browse files
committed
Muse Code on Linux: reproducible AppImage build
0 parents  commit 2946147

11 files changed

Lines changed: 221 additions & 0 deletions

File tree

‎.github/workflows/build.yml‎

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: build-appimage
2+
on:
3+
push:
4+
branches: [main]
5+
pull_request:
6+
workflow_dispatch:
7+
schedule:
8+
- cron: "0 9 * * 1" # weekly: catch new Muse Code releases
9+
permissions:
10+
contents: read
11+
jobs:
12+
build:
13+
runs-on: ubuntu-24.04
14+
steps:
15+
- uses: actions/checkout@v4
16+
- name: Install deps
17+
run: sudo apt-get update && sudo apt-get install -y --no-install-recommends file desktop-file-utils
18+
- name: Validate desktop file
19+
run: desktop-file-validate packaging/muse-code.desktop
20+
- name: Build AppImage (fetches + sha256-verifies Meta's binary)
21+
run: ./build-appimage.sh
22+
- name: Check --version
23+
run: |
24+
out="$(./Muse-Code-x86_64.AppImage --version)"
25+
echo "$out"
26+
echo "$out" | grep -E '^Muse Code [0-9]+\.[0-9]+\.[0-9]+'
27+
# The AppImage is intentionally NOT uploaded as an artifact or release:
28+
# Muse Code is Meta's proprietary binary and is not redistributed here.

‎.gitignore‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
*.AppImage
2+
build/
3+
muse
4+
muse-x86-linux
5+
muse-*-linux
6+
*.part
7+
AppDir/

‎LICENSE‎

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
MIT License
2+
3+
Copyright (c) 2026 Neal Frazier
4+
5+
This license covers ONLY the build scripts, packaging files and artwork in
6+
this repository. It does not cover Muse Code itself, which is proprietary
7+
software by Meta Platforms, Inc., is not included here, and is downloaded
8+
from Meta at build time under Meta's own terms.
9+
10+
Permission is hereby granted, free of charge, to any person obtaining a copy
11+
of this software and associated documentation files (the "Software"), to deal
12+
in the Software without restriction, including without limitation the rights
13+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
14+
copies of the Software, and to permit persons to whom the Software is
15+
furnished to do so, subject to the following conditions:
16+
17+
The above copyright notice and this permission notice shall be included in all
18+
copies or substantial portions of the Software.
19+
20+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
23+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
24+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
25+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
26+
SOFTWARE.

‎README.md‎

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
<p align="center"><img src="assets/hero.png" alt="Muse Code on Linux — AppImage" width="100%"></p>
2+
3+
# Muse Code on Linux (AppImage)
4+
5+
Build a single-file **AppImage** of Meta's official **Muse Code** CLI for x86_64 Linux.
6+
Run it from a terminal, or double-click it and it opens in Konsole (or your system terminal).
7+
Tested on **ZOTHOS** (KDE Plasma).
8+
9+
> **Unofficial community packaging. Not affiliated with, endorsed by, or supported by Meta.**
10+
> This repo contains **no Meta binaries**. `build-appimage.sh` downloads `muse-x86-linux`
11+
> from Meta's own release channel at build time and verifies its sha256 against Meta's
12+
> manifest before packaging it. Don't redistribute the resulting AppImage.
13+
14+
## Quickstart
15+
16+
```bash
17+
git clone https://github.com/<you>/muse-code-linux.git
18+
cd muse-code-linux
19+
./build-appimage.sh # needs curl, python3, sha256sum
20+
./Muse-Code-x86_64.AppImage --version # -> Muse Code 1.4.6 (1.4.6-R6000.1)
21+
./Muse-Code-x86_64.AppImage login # first run: sign in
22+
```
23+
24+
Optional: put it on your PATH as `muse`:
25+
26+
```bash
27+
mkdir -p ~/Applications ~/.local/bin
28+
mv Muse-Code-x86_64.AppImage ~/Applications/
29+
ln -sf ~/Applications/Muse-Code-x86_64.AppImage ~/.local/bin/muse
30+
```
31+
32+
## How the build works
33+
34+
1. Fetches the channel file `https://api.meta.ai/muse-code/channels/muse-stable`.
35+
2. Reads `manifest_url` and fetches Meta's lookaside manifest.
36+
3. Downloads the `x86_linux` artifact (`muse-x86-linux`) and checks its **sha256** against the manifest. A mismatch aborts the build.
37+
4. Assembles an AppDir (`AppRun`, `.desktop`, icon) and runs `appimagetool` (downloaded automatically if not installed).
38+
39+
Environment overrides: `CHANNEL_URL`, `ARTIFACT`, `WORK`, `OUT`, `APPIMAGETOOL`.
40+
41+
## Signing in
42+
43+
On first use run `muse login`. Meta's launcher notes Muse Code availability may be limited
44+
(e.g. to Meta employees), so your account may be refused even though the download works.
45+
This packaging doesn't change access; it only wraps Meta's binary.
46+
47+
## Notes
48+
49+
- The AppImage doesn't self-update. Re-run `./build-appimage.sh` to pick up a new release.
50+
- CI (`.github/workflows/build.yml`) builds weekly and checks `--version`. It does not publish the AppImage.
51+
52+
## License
53+
54+
The scripts, packaging files and artwork here are MIT (see `LICENSE`).
55+
Muse Code itself is proprietary Meta software under Meta's terms. "Muse" and "Meta" are trademarks of their owners.

‎assets/hero.png‎

697 KB
Loading

‎assets/muse-mark.svg‎

Lines changed: 14 additions & 0 deletions
Loading

‎assets/social-card.png‎

436 KB
Loading

‎build-appimage.sh‎

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
#!/usr/bin/env bash
2+
# Reproducible build of an unofficial Muse Code AppImage for x86_64 Linux.
3+
# The Muse Code binary is NOT stored in this repo: it is fetched from Meta's
4+
# official release channel at build time and verified against Meta's sha256 manifest.
5+
set -euo pipefail
6+
7+
CHANNEL_URL="${CHANNEL_URL:-https://api.meta.ai/muse-code/channels/muse-stable}"
8+
ARTIFACT="${ARTIFACT:-x86_linux}" # manifest key for muse-x86-linux
9+
ARCH=x86_64
10+
HERE="$(cd "$(dirname "$0")" && pwd)"
11+
WORK="${WORK:-$HERE/build}"
12+
OUT="${OUT:-$HERE/Muse-Code-${ARCH}.AppImage}"
13+
APPIMAGETOOL_URL="${APPIMAGETOOL_URL:-https://github.com/AppImage/appimagetool/releases/download/continuous/appimagetool-x86_64.AppImage}"
14+
15+
need() { command -v "$1" >/dev/null 2>&1 || { echo "missing required tool: $1" >&2; exit 1; }; }
16+
for t in curl python3 sha256sum; do need "$t"; done
17+
CURL=(curl --fail --silent --show-error --location --proto '=https' --tlsv1.2 --retry 3)
18+
19+
mkdir -p "$WORK"
20+
echo "==> channel: $CHANNEL_URL"
21+
"${CURL[@]}" -o "$WORK/channel.json" "$CHANNEL_URL"
22+
MANIFEST_URL="$(python3 -c 'import json,sys;print(json.load(open(sys.argv[1]))["manifest_url"])' "$WORK/channel.json")"
23+
VERSION="$(python3 -c 'import json,sys;print(json.load(open(sys.argv[1]))["version"])' "$WORK/channel.json")"
24+
echo "==> version: $VERSION"
25+
"${CURL[@]}" -o "$WORK/manifest.json" "$MANIFEST_URL"
26+
27+
read -r BIN_URL BIN_SHA BIN_SIZE < <(python3 - "$WORK/manifest.json" "$ARTIFACT" <<'PY'
28+
import json, sys
29+
m = json.load(open(sys.argv[1]))
30+
assert m.get("checksum_algorithm") == "sha256", "unexpected checksum algorithm"
31+
a = m["artifacts"][sys.argv[2]]
32+
print(a["url"], a["checksum"].lower(), a.get("size", 0))
33+
PY
34+
)
35+
36+
BIN="$WORK/muse-x86-linux"
37+
if [[ -f "$BIN" ]] && echo "$BIN_SHA $BIN" | sha256sum -c --status; then
38+
echo "==> cached binary verified"
39+
else
40+
echo "==> downloading muse-x86-linux (${BIN_SIZE} bytes)"
41+
"${CURL[@]}" -o "$BIN.part" "$BIN_URL"
42+
mv "$BIN.part" "$BIN"
43+
fi
44+
echo "==> verifying sha256 against Meta manifest"
45+
echo "$BIN_SHA $BIN" | sha256sum -c - || { echo "CHECKSUM MISMATCH, refusing to package" >&2; rm -f "$BIN"; exit 1; }
46+
47+
echo "==> assembling AppDir"
48+
APPDIR="$WORK/AppDir"
49+
rm -rf "$APPDIR"; mkdir -p "$APPDIR/usr/bin" "$APPDIR/usr/share/applications" "$APPDIR/usr/share/icons/hicolor/512x512/apps"
50+
install -m 0755 "$BIN" "$APPDIR/usr/bin/muse"
51+
install -m 0755 "$HERE/packaging/AppRun" "$APPDIR/AppRun"
52+
install -m 0644 "$HERE/packaging/muse-code.desktop" "$APPDIR/muse-code.desktop"
53+
install -m 0644 "$HERE/packaging/muse-code.desktop" "$APPDIR/usr/share/applications/muse-code.desktop"
54+
install -m 0644 "$HERE/packaging/muse-code.png" "$APPDIR/muse-code.png"
55+
install -m 0644 "$HERE/packaging/muse-code.png" "$APPDIR/usr/share/icons/hicolor/512x512/apps/muse-code.png"
56+
ln -sf muse-code.png "$APPDIR/.DirIcon"
57+
58+
TOOL="${APPIMAGETOOL:-$(command -v appimagetool || true)}"
59+
if [[ -z "$TOOL" ]]; then
60+
TOOL="$WORK/appimagetool"
61+
[[ -x "$TOOL" ]] || { "${CURL[@]}" -o "$TOOL" "$APPIMAGETOOL_URL"; chmod +x "$TOOL"; }
62+
fi
63+
echo "==> appimagetool"
64+
ARCH=$ARCH APPIMAGE_EXTRACT_AND_RUN=1 "$TOOL" --no-appstream "$APPDIR" "$OUT"
65+
echo "==> built $OUT"
66+
"$OUT" --version

‎packaging/AppRun‎

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/bin/bash
2+
# Run muse directly in a terminal; when launched from a desktop menu (no TTY,
3+
# no args) open it in Konsole or the system terminal instead.
4+
HERE="$(dirname "$(readlink -f "$0")")"
5+
MUSE="$HERE/usr/bin/muse"
6+
if [ -t 0 ] || [ -t 1 ] || [ "$#" -gt 0 ]; then
7+
exec "$MUSE" "$@"
8+
fi
9+
if command -v konsole >/dev/null 2>&1; then
10+
exec konsole -e "$MUSE"
11+
elif command -v x-terminal-emulator >/dev/null 2>&1; then
12+
exec x-terminal-emulator -e "$MUSE"
13+
else
14+
exec "$MUSE"
15+
fi

‎packaging/muse-code.desktop‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
[Desktop Entry]
2+
Type=Application
3+
Name=Muse Code
4+
GenericName=AI coding agent
5+
Comment=Muse Code CLI (unofficial AppImage packaging)
6+
Exec=muse
7+
Icon=muse-code
8+
Terminal=true
9+
Categories=Development;
10+
Keywords=muse;ai;agent;cli;

0 commit comments

Comments
 (0)