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
3 changes: 2 additions & 1 deletion .github/workflows/weekly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ jobs:
if: needs.check_relevance.outputs.relevance == 'true'
runs-on: ubuntu-latest
permissions:
workflows: write
contents: write
actions: write
steps:
- name: Checkout repository
uses: actions/checkout@v6
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -114,3 +114,4 @@ test_tabs.py
test_tabs_2.py
pytest_out.txt
mock_script.ps1
test_output.ps1
52 changes: 48 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,38 @@
# SwitchCraft 🧙‍♂️

<img src="src/switchcraft/assets/switchcraft_logo_with_Text.png" width="200" alt="SwitchCraft Logo">
<img src="https://github.com/FaserF/SwitchCraft/raw/main/docs/public/screenshots/switchcraft_logo_with_Text.png" width="200" alt="SwitchCraft Logo">

[![GitHub all releases](https://img.shields.io/github/downloads/FaserF/SwitchCraft/total?color=blue&style=flat-square&logo=github&label=Downloads)](https://github.com/FaserF/SwitchCraft/releases)

**SwitchCraft is your comprehensive packaging assistant for IT Professionals. It goes beyond simple switch identification to streamline your entire application packaging workflow.**

<details>
<summary><b>📸 Click to view main UI screenshot</b></summary>

<div align="center">
<img src="src/switchcraft/assets/switchcraft_ui.png" alt="SwitchCraft UI" width="1000" />
<img src="https://github.com/FaserF/SwitchCraft/raw/main/docs/public/screenshots/switchcraft_ui.png" alt="SwitchCraft UI" width="1000" />
</div>

</details>

<details>
<summary><b>📸 Click to view additional screenshots</b></summary>

<div align="center">
<table>
<tr>
<td><img src="https://github.com/FaserF/SwitchCraft/raw/main/docs/public/screenshots/switchcraft_ui_2.png" alt="SwitchCraft Screenshot 2" width="500" /></td>
<td><img src="https://github.com/FaserF/SwitchCraft/raw/main/docs/public/screenshots/switchcraft_ui_3.png" alt="SwitchCraft Screenshot 3" width="500" /></td>
</tr>
<tr>
<td><img src="https://github.com/FaserF/SwitchCraft/raw/main/docs/public/screenshots/switchcraft_ui_4.png" alt="SwitchCraft Screenshot 4" width="500" /></td>
<td><img src="https://github.com/FaserF/SwitchCraft/raw/main/docs/public/screenshots/switchcraft_ui_5.png" alt="SwitchCraft Screenshot 5" width="500" /></td>
</tr>
</table>
</div>

</details>

## ⚠️ Platform Support & Limitations

SwitchCraft is primarily designed for **Windows** environments. While the application UI is built with cross-platform frameworks (Python/Flet), many core features rely on Windows-specific APIs (Registry, Explorer, Intune Packaging Tool).
Expand All @@ -31,30 +54,40 @@ SwitchCraft is primarily designed for **Windows** environments. While the applic
### 🔍 Analysis & Packaging
- **Smart Installer Analysis**: Deep inspection of MSI, EXE (Inno Setup, NSIS, InstallShield), and custom wrappers.
- **Intune Integration**: Automated creation of `.intunewin` packages and direct publication to Microsoft Intune.
- **Intune Store Browser**: Browse and manage your Intune applications with logo display and detailed metadata.
- **Advanced Wrapper Support**: Identification of nested installers and extraction of silent switches.
- **Batch Processing**: Drag & Drop multiple files to analyze them sequentially.
- **Analysis History**: Keep track of your last 100 analyzed installers.
- **My Library**: Personal collection of analyzed and packaged applications with search and filter capabilities.
- **Community Database**: Integrated lookup for known silent switches when local analysis fails.
- **Project Stacks**: Group applications into named stacks for one-click batch deployment.
- **Project Stacks**: Group applications into named stacks for one-click batch deployment via Stack Manager.
- **Interactive Dashboard**: Visual overview of your packaging activity, statistics, and recent actions.
- **Script Signing**: Automatically sign generated PowerShell scripts with your Code Signing Certificate.
- **Packaging Wizard**: End-to-End workflow from installer to Intune upload in 5 steps.
- **Live Detection Tester**: Verify intended Registry, File, or MSI detection rules locally before uploading.
- **Group Manager**: Comprehensive Entra ID (Azure AD) group management - create, delete, and manage group members with user search.
- **Script Upload**: Upload and manage PowerShell scripts for Intune deployment.

### 📦 Store & Deployment
- **Winget Store Integration**: Search, analyze, and deploy applications from the official Microsoft repository.
- **WingetCreate Manager**: Create and manage Winget manifests for publishing packages to the Microsoft repository.
- **Auto-Update Support**: Built-in logic to handle application updates in enterprise environments.
- **Portable & Setup Variants**: Choose between full installation or zero-residue portable executables.
- **Winget Toggle**: Easily enable/disable store integration to suit your workflow.
- **macOS Packaging Wizard**: Create install.sh scripts and DMG/PKG packages for macOS deployment.

### 🛠️ Enterprise & Automation
- **Enterprise Configuration**: Full support for Registry-based configuration via GPO or Intune OMA-URI.
- **CLI Mode**: Headless operation for CI/CD pipelines and automation scripts with JSON output.
- **Cloud Sync**: Sync your configuration and settings across devices using GitHub Gists.
- **Modular Addon System**: Extend functionality with optional components like AI analysis or Intune integration.
- **Modular Addon System**: Extend functionality with optional components like AI analysis, Advanced analyzers, or Winget integration.
- **Notification System**: Desktop notifications and in-app notification center for important events.
- **Multi-Language Support**: Full English and German (Du-Form) interface with easy language switching.

### 🤖 AI Assistance
- **Enhanced AI Helper**: Dynamic chat assistant for packaging guidance supporting Local AI, Gemini, and OpenAI.
- **Context-Aware Responses**: AI understands your current installer context and provides relevant suggestions.
- **Copy-to-Clipboard**: Easily copy AI responses and code snippets from the chat interface.

---

Expand Down Expand Up @@ -152,6 +185,17 @@ When reporting issues, please attach the crash dump file to help with debugging.

## 📚 Documentation

Full documentation is available at [SwitchCraft Docs](https://faserf.github.io/SwitchCraft/).

Key topics:
- [Installation Guide](/docs/installation.md)
- [Feature Overview](/docs/FEATURES.md)
- [Intune Integration](/docs/INTUNE.md)
- [Winget Integration](/docs/WINGET.md)
- [Addon System](/docs/ADDONS.md)
- [CLI Reference](/docs/CLI_Reference.md)
- [FAQ](/docs/faq.md)

## 🛠️ Building from Source
SwitchCraft includes helper scripts to easily build release executables for your platform.

Expand Down
4 changes: 2 additions & 2 deletions docs/.vitepress/config.mts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export default defineConfig({
['meta', { name: 'og:type', content: 'website' }],
['meta', { name: 'og:title', content: 'SwitchCraft - The Ultimate Packaging Assistant' }],
['meta', { name: 'og:description', content: 'Streamline your IT packaging workflow with smart analysis, Intune integration, and AI assistance.' }],
['meta', { name: 'og:image', content: 'https://github.com/FaserF/SwitchCraft/raw/main/images/switchcraft_logo_with_Text.png' }],
['meta', { name: 'og:image', content: 'https://github.com/FaserF/SwitchCraft/raw/main/docs/public/screenshots/switchcraft_logo_with_Text.png' }],
['meta', { name: 'twitter:card', content: 'summary_large_image' }],
],

Expand All @@ -25,7 +25,7 @@ export default defineConfig({
lastUpdated: true,

themeConfig: {
logo: 'https://github.com/FaserF/SwitchCraft/raw/main/images/switchcraft_logo_with_Text.png',
logo: '/public/screenshots/switchcraft_logo_with_Text.png',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Incorrect logo path—VitePress serves public/ contents at root.

The path /public/screenshots/switchcraft_logo_with_Text.png will result in a 404. VitePress serves files from the public/ directory at the site root, so the path should not include /public/.

🐛 Proposed fix
-        logo: '/public/screenshots/switchcraft_logo_with_Text.png',
+        logo: '/screenshots/switchcraft_logo_with_Text.png',
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
logo: '/public/screenshots/switchcraft_logo_with_Text.png',
logo: '/screenshots/switchcraft_logo_with_Text.png',
🤖 Prompt for AI Agents
In `@docs/.vitepress/config.mts` at line 28, The logo path in the VitePress config
(the logo property in docs/.vitepress/config.mts) incorrectly includes the
public/ prefix and will 404; update the logo value to remove /public so it
points to the served root (e.g., change
'/public/screenshots/switchcraft_logo_with_Text.png' to
'/screenshots/switchcraft_logo_with_Text.png') so VitePress can find and serve
the asset.

siteTitle: 'SwitchCraft',

nav: [
Expand Down
60 changes: 55 additions & 5 deletions docs/FEATURES.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,21 @@
- **EXE**: Auto-detects 20+ installer frameworks and suggests appropriate silent switches
- **Metadata**: Parses PE version info for product name, version, and company
- **📦 Winget Integration**: Automatically checks if the package exists in the **Windows Package Manager** (winget) repository
- **🔔 Notification System**: Get native desktop alerts when analysis completes or packages are created
- **🛒 Intune Store Browser**: Browse your Intune applications with logo display, metadata, and assignment management
- **📝 WingetCreate Manager**: Create and manage Winget manifests for publishing packages to Microsoft's repository
- **👥 Group Manager**: Manage Intune groups and assignments directly from SwitchCraft
- **🔔 Notification System**: Desktop notifications and in-app notification center with read/unread status
- **✍️ Script Signing**: Automatically sign generated PowerShell scripts with your code-signing certificate (auto-detected or PFX)
- **⚔️ Automatic Brute Force**: Runs 15+ help argument variations to discover switches
- **🧩 Project Stacks**: Group applications into named stacks for one-click batch deployment
- **📊 Interactive Dashboard**: Visual overview of your packaging activity, statistics, and recent actions
- **📚 My Library**: Personal history of analyzed and packaged applications with search and filter capabilities
- **🧩 Project Stacks**: Group applications into named stacks for one-click batch deployment via Stack Manager
- **📊 Interactive Dashboard**: Visual overview of your packaging activity, statistics, charts, and recent actions
- **📚 My Library**: Personal collection of analyzed and packaged applications with search, filter, and folder management
- **🧪 Detection Tester**: Test Registry, File, or MSI detection rules locally before uploading to Intune
- **📤 Script Upload**: Upload and manage PowerShell scripts for Intune deployment
- **🍎 macOS Wizard**: Create install.sh scripts and DMG/PKG packages for macOS deployment
- **👥 Community Database**: Crowdsourced database of silent switches with automated IssueOps contributions
- **🌐 Multi-Language**: English and German interface
- **🌐 Multi-Language**: Full English and German (Du-Form) interface with immediate language switching
- **🤖 AI Helper**: Context-aware AI assistant supporting Local AI, OpenAI, and Google Gemini with copy-to-clipboard

## 🎯 Supported Installer Types

Expand Down Expand Up @@ -79,3 +86,46 @@ If no silent switches are found for the main EXE, SwitchCraft will:
SwitchCraft can detect when developers have **intentionally disabled** silent installation:
- Binary flags like `SilentModeDisabled`, `RequireGUI`
- Help text indicating "silent mode not supported"

## 🎨 Modern UI Features

The Modern UI (Flet-based) includes several enhancements over the Legacy version:

### Navigation & Organization
- **Category-Based Sidebar**: Organized into Dashboard, Apps & Devices, Tools, and System categories
- **Home View**: Quick access to common actions and recent items
- **Dashboard**: Statistics, charts, and activity overview
- **Library**: Personal collection with folder management and search

### Intune Management
- **Intune Store Browser**: Browse all your Intune applications with:
- Application logos and metadata
- Assignment information
- Direct packaging wizard integration
- Group assignment details
- **Group Manager**: Comprehensive Entra ID (Azure AD) group management
- Browse, search, and filter groups
- Create new Security or Microsoft 365 groups
- Delete groups (with safety toggle)
- Manage group members (add/remove users)
- Search users by name or email
- **Stack Manager**: Organize applications into deployment stacks

### Advanced Tools
- **Detection Tester**: Test detection rules (Registry, File, MSI) locally before uploading
- **WingetCreate Manager**: Create and manage Winget manifests with GitHub integration
- **macOS Wizard**: Generate install.sh scripts and create DMG/PKG packages
- **Script Upload**: Upload and manage PowerShell scripts for Intune

### User Experience
- **Notification Center**: In-app notification drawer with read/unread status
- Desktop notifications for important events
- Notification bell icon with unread count badge
- Click to open/close notification drawer
- Mark individual notifications as read
- Clear all notifications
- **Loading Screen**: Professional loading experience similar to Remote Desktop Manager
- **Multi-Language**: Immediate language switching (English/German) without restart
- **Build Information**: Version and build date displayed in settings
- **Theme Support**: Light, Dark, and System theme modes
- **About Information**: "Brought by" and "Created with AI" credits in settings
134 changes: 133 additions & 1 deletion docs/INTUNE.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,12 @@ To enable direct uploads, you must register an App in Azure AD (Entra ID) and pr
- **Client Secret**

> [!NOTE]
> Required API Permissions: `DeviceManagementApps.ReadWrite.All`
> **Minimum Required API Permissions**: `DeviceManagementApps.ReadWrite.All`
>
> **For Group Manager**: Additional permissions required:
> - `Group.Read.All` or `Group.ReadWrite.All`
> - `User.Read.All` (for user search)
> - `GroupMember.ReadWrite.All` (for member management)

### Intune Test Groups
You can configure **Test Groups** in Settings. When enabled, newly uploaded apps will be automatically assigned to these groups (Intent: *Available* or *Required*).
Expand All @@ -42,3 +47,130 @@ Enforce code signing on all generated scripts for AppLocker/WDAC compliance:
Even without the automation, you can use the **Intune Utility** tab to:
- Manually create `.intunewin` packages from any folder.
- Generate Install/Uninstall PowerShell scripts from templates.

## 🛒 Intune Store Browser

The **Intune Store** view (Modern UI only) allows you to:
- Browse all your Intune applications with logo display
- View detailed metadata (ID, Publisher, Created Date, App Type)
- See group assignments (Required, Available, Uninstall)
- View install/uninstall command lines
- Launch the Packaging Wizard directly from an existing app
- Search and filter applications

### Using the Intune Store

1. Navigate to **Apps & Devices → Intune Store**
2. Search for applications or browse the list
3. Click on any app to view details
4. Use **"Deploy / Package..."** to create a new version or package

> [!NOTE]
> Requires Microsoft Graph API credentials configured in Settings → Graph API.

## 👥 Entra Group Manager

The **Group Manager** (Modern UI only) provides comprehensive management of Microsoft Entra ID (Azure AD) groups directly from SwitchCraft.

### Features

- **Browse Groups**: View all Entra ID groups in your tenant with search and filter capabilities
- **Create Groups**: Create new Security or Microsoft 365 groups with name and description
- **Delete Groups**: Safely delete groups with confirmation dialog (requires Deletion Mode toggle)
- **Manage Members**: Add and remove users from groups
- **User Search**: Search for users by name or email to add to groups
- **Group Details**: View group ID, type, and description

### Required Permissions

The Group Manager requires additional Graph API permissions beyond the standard Intune permissions:

| Permission | Purpose |
|-----------|---------|
| `Group.Read.All` | Read group information and members |
| `Group.ReadWrite.All` | Create, update, and delete groups |
| `User.Read.All` | Search for users to add to groups |
| `GroupMember.ReadWrite.All` | Add and remove group members |

> [!IMPORTANT]
> These permissions must be granted by an Azure AD administrator. Standard `DeviceManagementApps.ReadWrite.All` is not sufficient for group management.

### Using the Group Manager

1. Navigate to **Apps & Devices → Group Manager**
2. Groups are automatically loaded from your tenant
3. Use the search field to filter groups by name or description
4. Select a group to enable member management

#### Creating a Group

1. Click **"Create Group"**
2. Enter a **Group Name** (required)
3. Optionally add a **Description**
4. Click **"Create"**

The group will be created as a Security group by default.

#### Managing Members

1. Select a group from the list
2. Click **"Manage Members"**
3. View current members with their email addresses
4. Click **"Add Member"** to search and add users
5. Click the remove icon (🗑️) next to a member to remove them

#### Deleting a Group

1. Enable **"Enable Deletion (Danger Zone)"** toggle
2. Select the group you want to delete
3. Click **"Delete Selected"**
4. Confirm the deletion in the dialog

> [!WARNING]
> Group deletion is permanent and cannot be undone. Use with caution.

### Use Cases

- **Test Groups**: Create dedicated groups for testing Intune app deployments
- **Department Groups**: Organize users into groups for targeted deployments
- **Assignment Management**: Quickly add or remove users from deployment groups
- **Group Cleanup**: Remove unused or obsolete groups

### Integration with Intune

Groups created or managed in the Group Manager can be used for:
- **Intune App Assignments**: Assign apps to groups created in Group Manager
- **Test Groups**: Configure in Settings → Intune → Test Groups for automatic assignment
- **Deployment Stacks**: Use groups with Stack Manager for batch deployments

## 🧩 Stack Manager

The **Stack Manager** (Modern UI only) allows you to organize multiple applications into named "stacks" for batch deployment to Intune.

### Features

- **Create Stacks**: Group multiple apps together by name
- **Add Applications**: Add apps to stacks by Winget ID or file path
- **Batch Deployment**: Deploy entire stacks to Intune with one click
- **Stack Management**: Edit, rename, and delete stacks
- **Visual Organization**: Keep track of related applications together

### Using Stack Manager

1. Navigate to **Apps & Devices → Stack Manager**
2. Enter a stack name and click **"Add Stack"**
3. Select the stack and add applications:
- Enter a Winget Package ID (e.g., `Microsoft.PowerToys`)
- Or provide a file path to an installer
4. Click **"Save Stack"** to persist your changes
5. Click **"Deploy Stack"** to deploy all apps in the stack to Intune

> [!TIP]
> Stacks are useful for deploying related applications together, such as a "Development Tools" stack or "Security Software" stack.

### Stack Storage

Stacks are stored locally in `data/stacks.json` and persist between sessions. You can:
- Create multiple stacks for different deployment scenarios
- Reuse stacks for repeated deployments
- Organize apps by department, function, or project
14 changes: 12 additions & 2 deletions docs/INTUNE_SETUP.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,21 @@ To enable SwitchCraft to upload packages directly to Microsoft Intune, you need
2. Click **Add a permission** > **Microsoft Graph**.
3. Select **Application permissions** (NOT Delegated).
4. Search for and check the following permissions:
- `DeviceManagementApps.ReadWrite.All` (To create and upload apps)
- `Group.Read.All` (Optional, if we implement assignment later)

### Minimum Required (Intune Packaging)
- `DeviceManagementApps.ReadWrite.All` - To create and upload apps to Intune

### Optional (Group Manager)
- `Group.Read.All` or `Group.ReadWrite.All` - To browse and manage Entra ID groups
- `User.Read.All` - To search for users when adding group members
- `GroupMember.ReadWrite.All` - To add and remove group members

5. Click **Add permissions**.
6. **IMPORTANT**: Click **Grant admin consent for [Your Org]** to activate the permissions.

> [!NOTE]
> The Group Manager features require the additional permissions listed above. If you only need Intune packaging, `DeviceManagementApps.ReadWrite.All` is sufficient.

## 3. Create Client Secret

1. Go to **Certificates & secrets**.
Expand Down
Loading