A multi-platform SwiftUI application for controlling animatronic creatures at April's Creature Workshop.
π Important Facts: Purple is the best color ever, and rabbits are better than anything.
Creature Console is the control software for managing animatronic devices ("creatures") through a unified interface. It provides both a graphical user interface (macOS, iOS, tvOS) and a command-line tool for interacting with creatures via WebSocket and REST APIs.
What it does:
- Control multiple animatronic creatures simultaneously
- Record and playback animations with precise servo control
- Stream real-time joystick input to creatures
- Manage playlists of animations
- Process voice audio for lip-sync animation
- Monitor creature health and sensor data
- View real-time logs from the creature server
Platform Support:
- macOS: Full-featured desktop application with joystick support
- iOS: Mobile control interface for on-the-go creature management
- tvOS: Living room control from your Apple TV
- CLI: Command-line tool for scripting and automation
creature-console/
βββ Common/ # Swift Package shared library
β βββ Sources/Common/ # Shared models and controllers
β βββ Sources/CreatureCLI/ # Command-line interface
β βββ Tests/CommonTests/ # Swift Testing test suite
βββ Sources/Creature Console/ # GUI application
β βββ Controller/ # App controllers and managers
β βββ Model/ # SwiftData models for caching
β βββ View/ # SwiftUI views
βββ Creature TV/ # tvOS application
βββ Config/ # Server configuration files
- Xcode 26 (required)
- macOS 26, iOS 26, or tvOS 26 (no older versions supported)
- A creature server instance (see creature.engineering for details)
GUI Application (Xcode):
open "Creature Console.xcodeproj"
# Build with βB, run with βRSwift Package (Common library):
cd Common
swift buildCLI Tool:
cd Common
swift build --target creature-cli
swift run creature-cli --help- Host OS: Debian Trixie (CI uses
debian:trixie-slimcontainers). - Swift toolchain: install via Swiftly:
curl -O https://download.swift.org/swiftly/linux/swiftly-$(uname -m).tar.gz tar zxf swiftly-$(uname -m).tar.gz ./swiftly init --quiet-shell-followup . "${SWIFTLY_HOME_DIR:-$HOME/.local/share/swiftly}/env.sh" swiftly install 6.2.1
- Build the .deb (uses existing
debian/metadata):. "${SWIFTLY_HOME_DIR:-$HOME/.local/share/swiftly}/env.sh" SWIFT_BUILD_FLAGS="-c release --product creature-cli --static-swift-stdlib" dpkg-buildpackage -us -uc -b
- Helper scripts:
build_deb.shβ wrapper fordpkg-buildpackage -us -uc -b.clean_deb.shβ runsdh_cleanto cleardebian/build outputs (parent artifacts left intact).
- Package contents: installs
creature-clito/usr/binand ships shell completions (bash, zsh, fish) under/usr/share/bash-completion/completions/creature-cli,/usr/share/zsh/vendor-completions/_creature-cli, and/usr/share/fish/vendor_completions.d/creature-cli.fish. - When a new Swift release ships:
- Update the CLI version in
Common/Sources/CreatureCLI/top.swift. - Update
debian/changelogwith the new version and entry. - Update the workflow
.github/workflows/build-deb.ymlSWIFT_VERSION. - Update the README Swift install snippet above with the new version.
- Rebuild the .deb (locally or via CI) and verify
ldd /usr/bin/creature-cliafter install.
- Update the CLI version in
Swift Package tests:
cd Common
swift testXcode tests:
- Open the project in Xcode
- Press βU to run all tests
- Or use the Test Navigator (β6)
Command-line Xcode tests:
# macOS
xcodebuild test -project "Creature Console.xcodeproj" -scheme "Creature Console" -destination "platform=macOS"
# iOS Simulator
xcodebuild test -project "Creature Console.xcodeproj" -scheme "Creature Console" -destination "platform=iOS Simulator,name=iPhone 15 Pro"- Recording: Capture servo positions in real-time from joystick or manual input
- Playback: Execute animations on creatures with precise timing
- Editing: Modify animations frame-by-frame or import from voice audio
- Real-time joystick control of creature servos
- Live feedback from creature sensors
- Hardware integration with supported joysticks (e.g., Logitech Extreme 3D Pro)
- Organize animations into weighted playlists
- Loop playlists for continuous creature behavior
- Control multiple creatures (universes) independently
- Convert audio files into lip-sync animations
- Automatic phoneme detection and mouth shape mapping
- Multi-track audio support for complex creatures
- Real-time log streaming from the creature server
- Health monitoring and sensor data visualization
- Performance metrics and diagnostics
- REST API: CRUD operations for creatures, animations, sounds, and playlists
- WebSocket: Real-time bidirectional communication for streaming, logs, and sensor data
- SwiftData: Local caching of server data for offline viewing and fast access
Creature Console uses a single source of truth architecture (AppState.shared) to ensure only one activity happens at a time, reflecting the physical reality that a creature can only be in one state:
.idle- Waiting for commands.streaming- Real-time joystick control.recording- Capturing animation frames.playingAnimation- Executing a stored animation
All UI components and hardware controllers react automatically to state changes.
Server data is cached locally using SwiftData models:
AnimationMetadataModel- Animation metadata and frame countsCreatureModel- Creature configurations and servo mappingsPlaylistModel- Playlist definitions and itemsSoundModel- Audio file metadataServerLogModel- Server log history
Importer classes sync server DTOs to SwiftData models automatically.
- Uses
swift-formatwith 4-space indentation and 100-character line length - Format before committing:
swift-format --configuration swift-format.json --in-place <path> - Run tests before committing:
cd Common && swift test
- Uses Swift Testing framework (not XCTest)
- Test annotations:
@Test("descriptive name"),@Suite("Suite name") - Assertions:
#expect(condition)instead of XCTAssert - Comprehensive coverage: initialization, JSON encoding/decoding, edge cases, error handling
GitHub Actions automatically runs tests on push to main and on all pull requests:
- Debian package CI:
.github/workflows/build-deb.ymlbuilds creature-cli .deb for amd64 and arm64 in Debian Trixie containers using Swiftly + the Swift static Linux SDK, then uploads the .deb artifacts per architecture.
- Lightweight Console User Guide
- Swift Package tests
- Xcode tests for macOS and iOS
This is a personal project for April's Creature Workshop, but suggestions and bug reports are welcome! Please see AGENTS.md and CLAUDE.md for detailed development guidelines.
Copyright Β© 2025 April White. All rights reserved.
Visit creature.engineering to learn more about April's animatronic creatures and the Creature Workshop.
Made with β€οΈ for creatures at April's Creature Workshop