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
65 changes: 62 additions & 3 deletions .github/workflows/electron-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ on:
push:
branches: [ main ]
tags: [ 'v*' ]
pull_request:
branches: [ main ]
workflow_dispatch:
inputs:
version:
Expand All @@ -14,15 +16,19 @@ on:
jobs:
build-electron:
runs-on: ${{ matrix.os }}
permissions:
contents: write

strategy:
matrix:
os: [ubuntu-latest, windows-latest]
os: [ubuntu-latest, windows-latest, macos-latest]
include:
- os: ubuntu-latest
platform: linux
- os: windows-latest
platform: win32
- os: macos-latest
platform: darwin

steps:
- name: Checkout code
Expand All @@ -35,6 +41,11 @@ jobs:
cache: 'npm'
cache-dependency-path: src/CommandRunner.ReactWebsite/package-lock.json

- name: Setup .NET SDK
uses: actions/setup-dotnet@v4
with:
dotnet-version: '10.0.x'

- name: Install dependencies
working-directory: src/CommandRunner.ReactWebsite
run: npm ci
Expand All @@ -60,6 +71,14 @@ jobs:
echo "This will create a .exe installer"
npm run build-electron-win

- name: Build Electron app (macOS)
if: matrix.platform == 'darwin'
working-directory: src/CommandRunner.ReactWebsite
run: |
echo "Building macOS Electron app..."
echo "This will create a .dmg installer"
npm run build-electron-mac

- name: Verify build output (Linux)
if: matrix.platform == 'linux'
run: |
Expand Down Expand Up @@ -107,6 +126,23 @@ jobs:
Write-Host "The .exe file is a standard Windows installer"
Write-Host "It includes the API server and will auto-start it when the app runs"

- name: Verify build output (macOS)
if: matrix.platform == 'darwin'
run: |
echo "=== MACOS BUILD VERIFICATION ==="
echo "Build output directory:"
ls -la src/CommandRunner.ReactWebsite/dist-electron/
echo ""
echo "macOS installer files:"
find src/CommandRunner.ReactWebsite/dist-electron/ -name "*.dmg" -o -name "*.app" | head -10
echo ""
echo "Package sizes:"
du -sh src/CommandRunner.ReactWebsite/dist-electron/*.dmg 2>/dev/null || echo " DMG not found"
echo ""
echo "=== MACOS INSTALLER INFO ==="
echo "The .dmg file is a standard macOS disk image"
echo "It includes the API server and will auto-start it when the app runs"

- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
Expand All @@ -115,15 +151,38 @@ jobs:
src/CommandRunner.ReactWebsite/dist-electron/
retention-days: 30

- name: Create Pre-release (on PR)
if: github.event_name == 'pull_request'
uses: softprops/action-gh-release@v1
with:
tag_name: pr-${{ github.event.pull_request.number }}-${{ matrix.platform }}-${{ github.run_number }}
name: PR #${{ github.event.pull_request.number }} pre-release (${{ matrix.platform }})
target_commitish: ${{ github.sha }}
files: |
src/CommandRunner.ReactWebsite/dist-electron/*.exe
src/CommandRunner.ReactWebsite/dist-electron/*.deb
src/CommandRunner.ReactWebsite/dist-electron/*.AppImage
src/CommandRunner.ReactWebsite/dist-electron/*.dmg
generate_release_notes: false
draft: false
prerelease: true
overwrite_files: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Create Release (on tag push)
if: startsWith(github.ref, 'refs/tags/v')
uses: softprops/action-gh-release@v1
with:
files: |
src/CommandRunner.ReactWebsite/dist-electron/**/*.{exe,deb,AppImage,dmg}
src/CommandRunner.ReactWebsite/dist-electron/*.exe
src/CommandRunner.ReactWebsite/dist-electron/*.deb
src/CommandRunner.ReactWebsite/dist-electron/*.AppImage
src/CommandRunner.ReactWebsite/dist-electron/*.dmg
generate_release_notes: true
draft: false
prerelease: false
overwrite_files: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Expand All @@ -137,4 +196,4 @@ jobs:
uses: igorjs/gh-actions-clean-workflow@v4
with:
days_old: "7"
runs_to_keep: "5"
runs_to_keep: "5"
12 changes: 6 additions & 6 deletions .github/workflows/reusable-build-and-unit-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,20 @@ jobs:
include:
# Ubuntu
- os: ubuntu-latest
dotnet-version: '8.0.x'
dotnet-version: '10.0.x'
shell-test: bash

# Windows with different shells
- os: windows-latest
dotnet-version: '8.0.x'
dotnet-version: '10.0.x'
shell-test: powershell
- os: windows-latest
dotnet-version: '8.0.x'
dotnet-version: '10.0.x'
shell-test: cmd

# macOS
- os: macos-latest
dotnet-version: '8.0.x'
dotnet-version: '10.0.x'
shell-test: bash

steps:
Expand Down Expand Up @@ -83,8 +83,8 @@ jobs:
uses: actions/upload-artifact@v4
if: always()
with:
name: test-results-${{ matrix.os }}-${{ matrix.dotnet-version }}
name: test-results-${{ matrix.os }}-${{ matrix.dotnet-version }}-${{ matrix.shell-test }}
path: |
**/TestResults/*.xml
**/TestResults/*.html
retention-days: 30
retention-days: 30
42 changes: 42 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
"version": "0.2.0",
"compounds": [
{
"name": "Command Runner (Electron + API)",
"configurations": [
"Command Runner API",
"Command Runner Electron"
]
}
],
"configurations": [
{
"name": "Command Runner API",
"type": "coreclr",
"request": "launch",
"program": "dotnet",
"args": [
"run",
"--project",
"${workspaceFolder}/src/CommandRunner.Api/CommandRunner.Api.csproj"
],
"cwd": "${workspaceFolder}",
"console": "integratedTerminal"
},
{
"name": "Command Runner Electron",
"type": "node",
"request": "launch",
"runtimeExecutable": "npm",
"runtimeArgs": [
"run",
"electron-dev"
],
"cwd": "${workspaceFolder}/src/CommandRunner.ReactWebsite",
"console": "integratedTerminal",
"skipFiles": [
"<node_internals>/**"
]
}
]
}
47 changes: 47 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "command-runner:api",
"type": "shell",
"command": "dotnet run --project \"${workspaceFolder}/src/CommandRunner.Api/CommandRunner.Api.csproj\"",
"isBackground": true,
"problemMatcher": {
"owner": "command-runner-api",
"fileLocation": "absolute",
"pattern": [
{
"regexp": "^(.*)$",
"file": 1,
"message": 1
}
],
"background": {
"activeOnStart": true,
"beginsPattern": "^.*$",
"endsPattern": "Now listening on:\\s+"
}
},
"presentation": {
"reveal": "always",
"panel": "dedicated",
"group": "command-runner"
}
},
{
"label": "command-runner:electron-dev",
"type": "npm",
"script": "electron-dev",
"path": "src/CommandRunner.ReactWebsite",
"dependsOn": [
"command-runner:api"
],
"problemMatcher": [],
"presentation": {
"reveal": "always",
"panel": "dedicated",
"group": "command-runner"
}
}
]
}
48 changes: 36 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ Focus mode provides a distraction-free interface for intensive command execution
### ⚙️ **Profile Management**
Create and manage command profiles with custom settings, environment variables, and execution parameters.

- Import profile files directly from JSON
- Reorder profiles and commands with drag-and-drop in the profile manager

![Profile Settings Dialog](images/profile-settings.png)
*Comprehensive profile configuration with environment variables and command settings*

Expand All @@ -42,31 +45,33 @@ Easily switch between working directories with a user-friendly selector.
### 🔄 **Command Iteration**
Run commands across multiple subdirectories recursively with configurable depth and error handling options.

### 📡 **Live Output Streaming**
See command output in real time while commands are still running, including iterative runs across directories.

### 🌓 **Theme Support**
Built-in dark and light themes for comfortable viewing in any environment or lighting condition.

## Upcoming Features

- **Progress Tracking**: Stream command outputs to the output window
- **Drag & Drop**: Reorder commands or profiles
- **Keyboard Shortcuts**: Use keys to select and execute commands
- **Multiple Execution**: Combine commands and run them together
- **Multiple Directories**: Add multiple directories to a command for quick switching
- **Profile Import**: Get up and running faster by importing pre-built profiles

## Desktop App Installation

Desktop installers include the API backend and start it automatically when the app launches. You should not need to manually run the API in normal desktop usage.

### Linux

#### Option 1: Debian/Ubuntu (.deb)
1. Download the latest `.deb` file from the [Releases](https://github.com/GitHub-Kieran/command-runner/releases) page
2. Install using your package manager: `sudo dpkg -i command-runner_*.deb`
2. Install using your package manager: `sudo dpkg -i commandrunner-reactwebsite_*.deb`
3. If there are dependency issues, run: `sudo apt-get install -f`

#### Option 2: AppImage
1. Download the latest `.AppImage` file from the [Releases](https://github.com/GitHub-Kieran/command-runner/releases) page
2. Make the file executable: `chmod +x Command-Runner-*.AppImage`
3. Run the AppImage: `./Command-Runner-*.AppImage` or right click and run
2. Make the file executable: `chmod +x CommandRunner-*.AppImage`
3. Run the AppImage: `./CommandRunner-*.AppImage` or right click and run

#### Option 3: Other Linux Distributions
For distributions not supporting .deb or AppImage:
Expand Down Expand Up @@ -104,7 +109,7 @@ Profile data is stored as JSON files in these directories and persists between a

- Node.js 18+ and npm
- Git
- .NET 8.0 SDK (for API backend)
- .NET 10.0 SDK (for API/backend projects)

### Installation & Running

Expand All @@ -114,14 +119,20 @@ Profile data is stored as JSON files in these directories and persists between a
cd command-runner
```

2. **Start the API server** (in a separate terminal):
2. **Start the app from VS Code (recommended)**
- Select launch profile: `Command Runner (Electron + API)`
- This starts both the API and Electron app together

3. **Alternative manual start** (two terminals)

**API server:**
```bash
cd src/CommandRunner.Api
dotnet run
```
The API will be available at `http://localhost:5081`

3. **Setup and start the frontend** (in another terminal):
**Frontend + Electron:**
```bash
cd src/CommandRunner.ReactWebsite
npm install
Expand All @@ -148,6 +159,19 @@ npm run build-electron-win

The built packages will be available in `src/CommandRunner.ReactWebsite/dist-electron/`.

## Example Profiles

You can import ready-to-use profile files from [`examples/profiles`](examples/profiles):

- [`dotnet-local-dev.json`](examples/profiles/dotnet-local-dev.json)
- [`javascript-tooling.json`](examples/profiles/javascript-tooling.json)
- [`windows-maintenance.json`](examples/profiles/windows-maintenance.json)

Import flow:
1. Open **Settings**
2. Select **Import Profile**
3. Choose one of the JSON files above

## Keyboard Shortcuts

Coming soon...
Expand Down Expand Up @@ -178,14 +202,14 @@ src/
**API connection errors:**
- Ensure the API server is running on port 5081
- Check firewall settings
- In development, start the API: `cd src/CommandRunner.Api && dotnet run`
- In development, use VS Code launch profile `Command Runner (Electron + API)` or run `cd src/CommandRunner.Api && dotnet run`

**Build issues:**
- Ensure .NET 8.0 SDK is installed
- Ensure .NET 10.0 SDK is installed
- Clear node_modules: `rm -rf node_modules && npm install`

**Permission issues:**
- On Linux: `chmod +x Command-Runner-*.AppImage`
- On Linux: `chmod +x CommandRunner-*.AppImage`
- On Windows: Run as administrator if needed

## Contributing
Expand Down
Loading
Loading