No description
  • Python 67.1%
  • Shell 32.9%
Find a file
2026-05-12 01:46:17 -04:00
.ai-chats Sync: bulk checkpoint 2026-05-12 (pre-Arch-reformat) 2026-05-12 01:46:17 -04:00
extracted-apps feat: initialize pacage-deploy as self-contained Power Platform deployment toolkit 2025-12-20 11:59:53 -05:00
msapp-bulk-download feat: initialize pacage-deploy as self-contained Power Platform deployment toolkit 2025-12-20 11:59:53 -05:00
msapp-library feat: initialize pacage-deploy as self-contained Power Platform deployment toolkit 2025-12-20 11:59:53 -05:00
msapp-toolkit Sync: bulk checkpoint 2026-05-12 (pre-Arch-reformat) 2026-05-12 01:46:17 -04:00
scripts feat: initialize pacage-deploy as self-contained Power Platform deployment toolkit 2025-12-20 11:59:53 -05:00
upload-ready feat: initialize pacage-deploy as self-contained Power Platform deployment toolkit 2025-12-20 11:59:53 -05:00
.gitignore feat: initialize pacage-deploy as self-contained Power Platform deployment toolkit 2025-12-20 11:59:53 -05:00
power-platform.config.yaml feat: initialize pacage-deploy as self-contained Power Platform deployment toolkit 2025-12-20 11:59:53 -05:00
README.md feat: initialize pacage-deploy as self-contained Power Platform deployment toolkit 2025-12-20 11:59:53 -05:00
RESUME.md docs: add RESUME.md for session continuity 2025-12-21 17:43:41 -05:00
WORKFLOW-DIAGRAM.md Sync: bulk checkpoint 2026-05-12 (pre-Arch-reformat) 2026-05-12 01:46:17 -04:00

pacage-deploy

Self-contained Power Platform deployment and version control toolkit.

This package provides complete workflow automation for downloading, extracting, modifying, and re-uploading Power Platform canvas apps using source control.

Features

  • Download all canvas apps from your Power Platform tenant
  • Extract .msapp files to human-readable source format
  • Version control Power Apps with Git
  • Compact modified sources back to .msapp format
  • Upload to Power Platform via CLI or portal
  • Interactive workflow menu

Quick Start

1. Prerequisites

# Check prerequisites (interactive menu option 7)
./scripts/workflow-menu.sh

Required:

  • PAC CLI (Power Platform CLI)
  • Python 3.11+
  • Git (for version control)

2. Setup Python Environment

# Create virtual environment for msapp-toolkit
cd msapp-toolkit
python3 -m venv venv

# Activate (Linux/macOS)
source venv/bin/activate

# Activate (Windows Git Bash)
source venv/Scripts/activate

# Install msapp-toolkit
pip install -e .

# Verify installation
msapp --version

3. Authenticate to Power Platform

# Create authentication profile
pac auth create

# List authenticated environments
pac auth list

4. Run the Workflow

# Start interactive menu
./scripts/workflow-menu.sh

Directory Structure

pacage-deploy/
  scripts/
    workflow-menu.sh              # Interactive menu
    download-and-extract-workflow.sh  # Download & extract all apps
    compact-and-upload-helper.sh  # Compact & upload helper
  msapp-bulk-download/
    traverse-and-download-all.sh  # PAC CLI bulk downloader
  msapp-toolkit/                  # Python CLI tool
    src/msapp_toolkit/            # Source code
    pyproject.toml                # Package config
    venv/                         # Virtual environment (created on setup)
  msapp-library/                  # Downloaded artifacts
    downloads/                    # Downloaded .msapp files
    canvas-apps/                  # Organized by app
    solutions/                    # Solution exports
    flows/                        # Power Automate flows
    connectors/                   # Custom connectors
  extracted-apps/                 # Extracted source code
    latest -> YYYYMMDD_HHMMSS/    # Quick access symlink
  upload-ready/                   # Compacted .msapp files
    latest -> YYYYMMDD_HHMMSS/    # Quick access symlink
  power-platform.config.yaml      # Configuration file
  WORKFLOW-DIAGRAM.md             # Visual workflow diagram
  README.md                       # This file

Workflows

Download & Extract (Menu Option 1)

Downloads all canvas apps from your Power Platform tenant and extracts them for version control.

./scripts/download-and-extract-workflow.sh

What it does:

  1. Authenticates to all environments in your tenant
  2. Downloads all canvas apps (.msapp files)
  3. Exports all solutions (.zip files)
  4. Extracts each .msapp to source folders
  5. Generates summary report
  6. Creates latest symlink for quick access

Output:

extracted-apps/
  YYYYMMDD_HHMMSS/
    extracted-apps/
      Environment-1/
        App1/
          AppCheckerResult.sarif
          Header.json
          Properties.json
          Src/
            Screen1.fx.yaml
            Screen2.fx.yaml
          ...
        App2/
      Environment-2/
        App3/
    workflow-report.txt
  latest -> YYYYMMDD_HHMMSS/

Compact & Upload (Menu Option 2)

Compacts modified source folders back to .msapp format for upload to Power Platform.

./scripts/compact-and-upload-helper.sh

What it does:

  1. Discovers all extracted app folders
  2. Offers interactive selection (all or specific apps)
  3. Compacts each selected app to .msapp
  4. Preserves environment structure
  5. Provides upload instructions

Output:

upload-ready/
  YYYYMMDD_HHMMSS/
    Environment-1/
      App1.msapp
      App2.msapp
    Environment-2/
      App3.msapp
    compact-report.txt
  latest -> YYYYMMDD_HHMMSS/

Upload to Power Platform

After compacting, upload using either method:

Option 1: Power Apps Studio (GUI)

  1. Go to https://make.powerapps.com
  2. Navigate to Apps > Import canvas app
  3. Upload the .msapp file
  4. Follow the import wizard

Option 2: PAC CLI (Command Line)

pac canvas create --msapp ./upload-ready/latest/Environment-1/App1.msapp

Version Control with Git

After extracting apps, initialize Git version control:

cd extracted-apps/latest/extracted-apps
git init
git add .
git commit -m "Initial import of Power Apps"

Make changes to the source files, then:

git add .
git commit -m "Updated App1 screen layout"

Configuration

Edit power-platform.config.yaml to customize:

download:
  target_dir: "./msapp-library/downloads"
  batch_auth: true
  export_both_solution_types: true

extract:
  output_dir: "./extracted-apps"
  create_backups: true
  preserve_timestamps: true

compact:
  output_dir: "./upload-ready"
  validate: true
  create_backups: true

toolkit:
  python_venv: "./msapp-toolkit/venv"
  verbose: false

Menu Options

Option Description
1 Download & Extract All Apps
2 Compact & Upload Helper
3 View Latest Extraction
4 View Latest Compacted Apps
5 Edit Configuration
6 View Documentation
7 Check Prerequisites
8 Setup Python Environment
0 Exit

Troubleshooting

PAC CLI not found

# Install PAC CLI
# See: https://learn.microsoft.com/en-us/power-platform/developer/cli/introduction

PAC CLI not authenticated

# Create authentication profile
pac auth create

# For specific environment
pac auth create --url https://your-org.crm.dynamics.com

msapp-toolkit not installed

cd msapp-toolkit
python3 -m venv venv
source venv/bin/activate  # or venv/Scripts/activate on Windows
pip install -e .

No apps found during download

  • Verify you have access to the environments
  • Check pac auth list shows your environments
  • Run pac canvas list to see available apps

Use as Git Submodule

Add this package to your repository as a submodule:

# Add as submodule
git submodule add <repo-url> pacage-deploy

# Clone with submodules
git clone --recurse-submodules <your-repo>

# Update submodule
git submodule update --remote pacage-deploy

License

MIT License