Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
73 changes: 73 additions & 0 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
name: macOS

# The native macOS app (macos/, Swift + SwiftUI). Separate from the Tauri
# CI so a change to one doesn't wait for the other.
on:
push:
branches: [main]
paths: ["macos/**", ".github/workflows/macos.yml"]
pull_request:
paths: ["macos/**", ".github/workflows/macos.yml"]
workflow_dispatch:

concurrency:
group: macos-${{ github.ref }}
cancel-in-progress: true

jobs:
build:
runs-on: macos-15
defaults:
run:
working-directory: macos
steps:
- uses: actions/checkout@v5
- run: swift --version
- name: Build
run: swift build
- name: Test
run: swift test
- name: Bundle
run: scripts/bundle.sh 0.0.0-ci

# Start the real app and make sure it's still running after 20 s.
- name: Smoke test
run: |
open -n dist/MoonTask.app
sleep 20
if ! pgrep -x MoonTask > /dev/null; then
echo "MoonTask exited during start-up"
log show --last 2m --predicate 'process == "MoonTask"' --style compact | tail -50 || true
exit 1
fi

# Screenshots of each section, for reviewing the design.
- name: Screenshots
continue-on-error: true
run: |
mkdir -p screenshots
osascript -e 'tell application "MoonTask" to activate' || true
sleep 2
i=1
for key in 1 2 3 4 5 6; do
osascript -e "tell application \"System Events\" to keystroke \"$key\" using command down" || true
sleep 3
screencapture -x "screenshots/$i-section.png" || true
i=$((i+1))
done
pkill -x MoonTask || true
# The disk image's window, as Finder shows it.
hdiutil attach dist/*.dmg -mountpoint /Volumes/MoonTask > /dev/null
open /Volumes/MoonTask
sleep 4
screencapture -x "screenshots/7-disk-image.png" || true
osascript -e 'tell application "Finder" to close every window' || true
hdiutil detach /Volumes/MoonTask > /dev/null || true
ls -la screenshots
- uses: actions/upload-artifact@v4
with:
name: macos-app
path: |
macos/dist/*.dmg
macos/screenshots
if-no-files-found: warn
31 changes: 30 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,31 @@ jobs:
src-tauri/target/release/bundle/nsis/*.exe
checksums-windows.txt

build-macos:
runs-on: macos-15
steps:
- uses: actions/checkout@v5
- name: Version
id: version
run: |
tag="${{ github.event.inputs.version }}"
[ -n "$tag" ] || tag="${GITHUB_REF_NAME}"
echo "version=${tag#v}" >> "$GITHUB_OUTPUT"
- name: Build the app and disk image
working-directory: macos
run: scripts/bundle.sh "${{ steps.version.outputs.version }}"
- name: Checksums
working-directory: macos/dist
run: shasum -a 256 *.dmg > ../../checksums-macos.txt
- uses: actions/upload-artifact@v4
with:
name: moontask-macos
path: |
macos/dist/*.dmg
checksums-macos.txt

publish:
needs: [build-linux, build-windows]
needs: [build-linux, build-windows, build-macos]
runs-on: ubuntu-latest
permissions:
contents: write
Expand All @@ -93,6 +116,10 @@ jobs:
with:
name: moontask-windows
path: dist/windows
- uses: actions/download-artifact@v5
with:
name: moontask-macos
path: dist/macos

- name: Determine version
id: version
Expand All @@ -115,3 +142,5 @@ jobs:
dist/linux/checksums-linux.txt
dist/windows/**/*.exe
dist/windows/checksums-windows.txt
dist/macos/**/*.dmg
dist/macos/checksums-macos.txt
64 changes: 46 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

> Every process, calmly under the moon.

MoonTask is a modern, open-source task manager for Windows and Linux — in the spirit of
MoonTask is a modern, open-source task manager for Windows, Linux and macOS — in the spirit of
[TaskExplorer](https://github.com/DavidXanatos/TaskExplorer) and Process Explorer, but calmer,
better organized and in the same night-sky design as [MoonDisk](https://github.com/Luna-OS/MoonDisk).

Expand Down Expand Up @@ -83,33 +83,42 @@ UI:

## Installation

Installers for Windows (`.exe`) and Linux (`.deb`/`.rpm`) are published on the [Releases](https://github.com/Luna-OS/Moon-Task/releases)
Installers for Windows (`.exe`), Linux (`.deb`/`.rpm`) and macOS (`.dmg`, Apple silicon and
Intel, macOS 14 or newer) are published on the [Releases](https://github.com/Luna-OS/Moon-Task/releases)
page.

MoonTask runs as a normal user. It then sees every process, but can only act on your own and
can't look inside other users' processes (their modules, handles and environment). To manage
everything, start it with administrator rights (Windows: *Run as administrator*; Linux:
e.g. `sudo -E moontask`).

A macOS version is planned. The macOS code paths (libproc, launchd) are already in the tree
but aren't built, tested or released yet.
### macOS

On the Mac, MoonTask is a native app written in Swift and SwiftUI (`macos/`), with the same night
sky, the same views and the same safety rules. Open the disk image and drag MoonTask into
Applications. The app isn't notarized by Apple yet, so macOS asks once before the first start:
open it, then allow it under **System Settings → Privacy & Security → Open Anyway**.

macOS shows the command line, environment, open files and network connections only for your own
processes; the system's and other users' processes show their CPU and memory, but not those
details. launchd agents of your session appear under *Services*.

## Platform notes

| Feature | Linux | Windows |
|-------------------------------|:-----:|:-------:|
| Process tree, CPU, memory, disk I/O | ✓ | ✓ |
| End, kill, end tree | ✓ | ✓ (end = kill) |
| Suspend / resume | ✓ | ✓ |
| Priority | ✓ (nice, all threads) | ✓ (priority class) |
| Threads / modules | ✓ | ✓ |
| Open handles | ✓ | planned |
| GPU load, memory | ✓ (NVIDIA, AMD; Intel: name, temperature) | ✓ (all vendors) |
| GPU load per process | ✓ (NVIDIA) | ✓ |
| GPU temperature | ✓ | ✓ (where the driver reports it, as in Task Manager) |
| Network connections | ✓ | ✓ |
| Services | systemd | Service Control Manager |
| CPU and other sensor temperatures | ✓ | – |
| Feature | Linux | Windows | macOS |
|-------------------------------|:-----:|:-------:|:-----:|
| Process tree, CPU, memory, disk I/O | ✓ | ✓ | ✓ (disk I/O: your processes) |
| End, kill, end tree | ✓ | ✓ (end = kill) | ✓ |
| Suspend / resume | ✓ | ✓ | ✓ |
| Priority | ✓ (nice, all threads) | ✓ (priority class) | ✓ (nice) |
| Threads / modules | ✓ | ✓ | thread count |
| Open handles | ✓ | planned | ✓ (open files, your processes) |
| GPU load, memory | ✓ (NVIDIA, AMD; Intel: name, temperature) | ✓ (all vendors) | ✓ |
| GPU load per process | ✓ (NVIDIA) | ✓ | – |
| GPU temperature | ✓ | ✓ (where the driver reports it, as in Task Manager) | – |
| Network connections | ✓ | ✓ | ✓ (your processes) |
| Services | systemd | Service Control Manager | launchd agents |
| CPU and other sensor temperatures | ✓ | – | thermal state |

## Development

Expand All @@ -130,6 +139,25 @@ src/
views/ Overview, Processes, Performance, Network, Services, Settings
```

The macOS app is a Swift package in `macos/`:

```
macos/Sources/
MoonTaskCore/ models, process tree/list/apps, sorting, safety rules (pure Swift, tested)
CDarwin/ a thin C layer over libproc, sysctl, Mach and IOKit
MoonTaskSystem/ reads the Mac and acts on processes
MoonTask/ the SwiftUI app
```

```sh
cd macos
swift test # tests
swift run # run the app
scripts/bundle.sh 0.3.0 # MoonTask.app and a .dmg in dist/
```

The Windows/Linux app:

```sh
npm install
npm run tauri dev # run the app
Expand Down
4 changes: 4 additions & 0 deletions macos/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.build/
dist/
.swiftpm/
*.xcodeproj
56 changes: 56 additions & 0 deletions macos/Package.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
// swift-tools-version:5.9
//
// MoonTask for macOS: a native SwiftUI app.
//
// - MoonTaskCore pure Swift (models, process tree, sorting, formatting,
// the safety rules); builds and tests on any platform
// - CDarwin a thin C layer over libproc, sysctl, Mach and IOKit
// - MoonTaskSystem reads the machine and acts on processes (macOS only)
// - MoonTask the app itself (macOS only)
import PackageDescription

var targets: [Target] = [
.target(name: "MoonTaskCore", path: "Sources/MoonTaskCore"),
.testTarget(
name: "MoonTaskCoreTests",
dependencies: ["MoonTaskCore"],
path: "Tests/MoonTaskCoreTests"
),
]
var products: [Product] = []

#if os(macOS)
targets += [
.target(
name: "CDarwin",
path: "Sources/CDarwin",
linkerSettings: [
.linkedFramework("IOKit"),
.linkedFramework("CoreFoundation"),
]
),
.target(
name: "MoonTaskSystem",
dependencies: ["MoonTaskCore", "CDarwin"],
path: "Sources/MoonTaskSystem"
),
.executableTarget(
name: "MoonTask",
dependencies: ["MoonTaskCore", "MoonTaskSystem"],
path: "Sources/MoonTask"
),
.testTarget(
name: "MoonTaskSystemTests",
dependencies: ["MoonTaskSystem"],
path: "Tests/MoonTaskSystemTests"
),
]
products.append(.executable(name: "MoonTask", targets: ["MoonTask"]))
#endif

let package = Package(
name: "MoonTask",
platforms: [.macOS(.v14)],
products: products,
targets: targets
)
Binary file added macos/Resources/AppIcon.icns
Binary file not shown.
36 changes: 36 additions & 0 deletions macos/Resources/Info.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleDisplayName</key>
<string>MoonTask</string>
<key>CFBundleExecutable</key>
<string>MoonTask</string>
<key>CFBundleIconFile</key>
<string>AppIcon</string>
<key>CFBundleIdentifier</key>
<string>io.moontask.mac</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>MoonTask</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>__VERSION__</string>
<key>CFBundleVersion</key>
<string>__VERSION__</string>
<key>LSApplicationCategoryType</key>
<string>public.app-category.utilities</string>
<key>LSMinimumSystemVersion</key>
<string>14.0</string>
<key>NSHighResolutionCapable</key>
<true/>
<key>NSHumanReadableCopyright</key>
<string>© 2026 Luna · MIT License</string>
<key>NSSupportsAutomaticGraphicsSwitching</key>
<true/>
</dict>
</plist>
Binary file added macos/Resources/dmg/background.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
68 changes: 68 additions & 0 deletions macos/Resources/dmg/background.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added macos/Resources/dmg/background@2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading