Skip to content

cereyanli/test

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RaspControllerMacApp

RaspControllerMacApp is a SwiftUI-powered macOS application that mirrors the core functionality of the iOS RaspController app. It lets you manage multiple Raspberry Pi hosts, execute on-demand commands, organize reusable macros, and transfer files directly from your Mac.

Features

  • 📡 Connection management – store unlimited Raspberry Pi hosts with password or SSH key authentication.
  • 💻 Interactive terminal – send individual commands and inspect responses in a macOS-native terminal pane.
  • Macro library – curate reusable command macros, mark favourites, duplicate, and categorise for quick access.
  • 📁 File uploads – push files to a remote path using the system scp client.
  • ⚙️ Settings syncing – customise default upload directories and automatically share them across connections.

Project structure

The project is organised as a Swift Package that can be opened directly in Xcode 15 or newer:

RaspControllerMacApp/
├── Package.swift
├── Resources/
│   └── DefaultMacros.json
└── Sources/
    └── RaspControllerMacApp/
        ├── Models/
        ├── Services/
        ├── Utilities/
        ├── ViewModels/
        └── Views/

Requirements

  • macOS 13 Ventura or newer
  • Xcode 15+ (or swift build from Xcode’s command line tools)
  • Access to /usr/bin/ssh, /usr/bin/scp, and /usr/bin/expect for executing remote commands and scripted password entry

Quick start on macOS

  1. Download the project
    • Clone the repository: git clone https://github.com/<your-account>/RaspControllerMacApp.git
    • Or download the repository as a ZIP from GitHub and extract it.
  2. Open the folder in Terminal
    • cd RaspControllerMacApp
  3. Trust the helper script
    • chmod +x Scripts/build-app-bundle.sh
  4. Build an app bundle you can double-click
    • ./Scripts/build-app-bundle.sh release
  5. Install and launch
    • Drag .build/AppBundle/RaspControllerMacApp.app into /Applications
    • Double-click the app in Finder (or run open .build/AppBundle/RaspControllerMacApp.app)
  6. Configure and use the app
    • Add a Raspberry Pi connection from the sidebar (⌘N)
    • Trigger macros or run individual commands in the terminal pane

If you prefer developing through Xcode instead of the bundle script:

  1. Open the folder in Xcode: open Package.swift
  2. Choose the RaspControllerMacApp scheme and build & run (⌘R).
  3. Add a Raspberry Pi connection from the sidebar (⌘N), supply credentials, and start issuing commands.

You can also build from the command line:

swift build
swift run RaspControllerMacApp

Note: When running from the command line the app launches as a regular macOS application; ensure you have a graphical session available.

Create a standalone .app

To copy the app into /Applications and launch it from Finder like any other native tool, run the helper script from macOS:

./Scripts/build-app-bundle.sh release
open .build/AppBundle/RaspControllerMacApp.app

The script builds the project, generates an application bundle with the correct Info.plist, and drops any Swift Package Manager resource bundles into Contents/Resources/. You can now drag the generated RaspControllerMacApp.app into /Applications for future use.

Security notes

  • Passwords are stored in the local Application Support directory in plain JSON for simplicity. Consider integrating the Keychain for production scenarios.
  • The app disables strict host key checking to streamline first-time connections. You may wish to enable host verification in hardened environments.

License

This project is provided as-is for demonstration purposes.

About

test

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published