Native macOS integrated development environment (IDE) specifically built for writing and executing Swift and Kotlin scripts with high performance and a modern user interface.
NovaSwiftDemo.mov
NovaSwift provides a streamlined experience for script development on macOS:
- Multi-Language Support: Write and execute Swift (
.swift) and Kotlin (.kts) scripts seamlessly. - Interactive Scripts: Support for standard input (
stdin). A dedicated input field appears automatically when a script is waiting for your input. - Unbuffered Real-time Output: Child processes run with
NSUnbufferedIOenabled, ensuring that prompts and log messages appear instantly. - System Notifications: Receive macOS desktop notifications when a script is waiting for input, even if the app is in the background.
- File Explorer: Integrated sidebar to browse your project folder.
- File Operations: Create, Rename, and Delete files directly from the sidebar context menu.
- Language Recognition: Specific icons for Swift and Kotlin files for easy identification.
- Syntax Highlighting: Native, performant syntax highlighting for keywords, types, strings, and comments.
- Enhanced Error Navigation: Click on any error in the console (e.g.,
main.swift:10:5) to jump directly to that line. - Customizable Editor: Adjust Font Size dynamically (
Cmd +,Cmd -) or via Settings. - Theme Support: Choose between Light and Dark modes in Settings.
- Sharing: Share your script output logs directly via the system share sheet (AirDrop, Messages, etc.).
- Custom Executables: Manually specify paths for
swiftandkotlincin Settings if they are not in standard locations. - Notification Management: Manage notification permissions directly from the app.
Boost your productivity with these built-in shortcuts:
| Action | Shortcut | Description |
|---|---|---|
| Run Script | Cmd + R (⌘R) |
Compiles and executes the currently open script. |
| Save File | Cmd + S (⌘S) |
Saves the current changes to the open file. |
| Save As | Shift + Cmd + S (⇧⌘S) |
Saves the current script to a new file. |
| Increase Font | Cmd + + |
Increases the editor font size. |
| Decrease Font | Cmd + - |
Decreases the editor font size. |
- Swift: Pre-installed on macOS.
- Kotlin: To run Kotlin scripts (
.kts), you must have the Kotlin compiler installed.brew install kotlin
NovaSwift uses system notifications to alert you when a script needs input. You can manage notification permissions directly in the Settings window within the app.
You can run NovaSwift either using Xcode (recommended for development) or directly from the terminal.
Option 1: Using Xcode
- Open the project file
NovaSwift.xcodeproj. - Ensure the
NovaSwiftscheme is selected. - Select your Mac as the destination.
- Press Command + R (⌘R) to run.
Option 2: Using Terminal To build and run the application from the command line:
- Build the application:
xcodebuild -scheme NovaSwift -destination 'platform=macOS' build - Open the application bundle:
open $(xcodebuild -scheme NovaSwift -destination 'platform=macOS' -showBuildSettings | grep -m 1 "TARGET_BUILD_DIR" | cut -d "=" -f 2 | xargs)/NovaSwift.app
NovaSwift includes a suite of unit tests for its core services (ScriptExecutor, ProjectManager) and models.
Option 1: From Xcode Press Command + U (⌘U) to build and run all tests.
Option 2: From Terminal
xcodebuild test -scheme NovaSwift -destination 'platform=macOS'The repository includes several sample scripts in TestScripts/ to verify IDE functionality manually:
TestScripts/Swift/InputTest.swift: Verifies interactive input (stdin) and notifications.TestScripts/Swift/Medium.swift: Tests filesystem permissions and Codable.TestScripts/Swift/Hard.swift: Tests concurrency (background threads) and unbuffered UI updates.TestScripts/Swift/ErrorCompile.swift: Verifies syntax highlighting and error clicking.TestScripts/Swift/ErrorRuntime.swift: Verifies runtime crash handling and stderr output.TestScripts/Kotlin/Hello.kts: Basic Kotlin execution test.TestScripts/Kotlin/InputTest.kts: Kotlin interaction andreadln()support.TestScripts/Kotlin/FileIO.kts: Kotlin file I/O permissions test.
