# Chocolatey — Automation Package Manager for Windows > Chocolatey is a machine-level package manager for Windows software that automates installation, upgrade, and configuration of applications using PowerShell and NuGet packaging infrastructure. It offers a community-curated repository with thousands of packages. ## Install Save as a script file and run: # Chocolatey — Automation Package Manager for Windows ## Quick Use ```powershell # Install Chocolatey (run in an elevated PowerShell) Set-ExecutionPolicy Bypass -Scope Process -Force [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityProtocolType]::Tls12 iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1')) # Install packages choco install git nodejs python vscode -y # Upgrade all installed packages choco upgrade all -y ``` ## Introduction Chocolatey brought Linux-style package management to Windows years before WinGet existed. It wraps native Windows installers (MSI, EXE, MSIX) in NuGet packages, adding silent install flags, checksums, and dependency resolution. Thousands of community-maintained packages are available on the Chocolatey Community Repository. ## What Chocolatey Does - Installs, upgrades, and uninstalls Windows software silently from the command line - Resolves dependencies between packages automatically - Verifies package integrity using checksums built into each package - Supports both community repository and self-hosted private feeds - Integrates with configuration management tools like Ansible, Puppet, and Chef ## Architecture Overview Chocolatey extends the NuGet packaging format with a chocolateyInstall.ps1 script inside each package. When you run choco install, the client downloads the .nupkg from a configured feed, extracts it, and executes the install script which typically downloads the actual software installer and runs it silently. Packages are tracked in a local lib directory. The client is a .NET application that provides CLI commands for install, upgrade, uninstall, search, and configuration management. ## Self-Hosting & Configuration - Install with a single PowerShell script in an elevated terminal - Configure alternative feed sources for enterprise or private repositories - Set default parameters like automatic confirmation and proxy settings in chocolatey.config - Use packages.config XML files to declare and install a set of packages in one command - Deploy across machines using Group Policy, SCCM, or automation tools ## Key Features - Largest Windows package repository with thousands of community packages - Enterprise edition adds package internalization, CDN, and audit features - Seamless integration with DevOps tools (Ansible, Puppet, Chef, DSC) - Runtime checks and virus scanning on the community repository - Package builder and package internalizer for air-gapped environments ## Comparison with Similar Tools - **WinGet** — newer, Microsoft-backed, but smaller ecosystem and fewer enterprise controls - **Scoop** — user-level portable installs without admin, but smaller catalog for system-level software - **Ninite** — GUI-only batch installer with no CLI, scripting, or customization - **MSYS2 / pacman** — targets Unix toolchains on Windows rather than general Windows apps ## FAQ **Q: Is Chocolatey free?** A: The open-source CLI (choco) and the community repository are free. Chocolatey for Business adds enterprise features under a commercial license. **Q: Does it need admin rights?** A: Most packages require elevation because they install system-wide. A non-admin mode exists for portable packages but covers fewer apps. **Q: Can I host my own package feed?** A: Yes. Any NuGet-compatible feed works as a Chocolatey source, including ProGet, Nexus, Artifactory, or a simple file share. **Q: How does Chocolatey handle updates?** A: Run choco upgrade all to update every installed package. You can pin specific packages to prevent unwanted upgrades. ## Sources - https://github.com/chocolatey/choco - https://chocolatey.org/ --- Source: https://tokrepo.com/en/workflows/asset-0e3c4c5b Author: Script Depot