# How to Install OfficeCLI on Windows: Complete Setup Guide

> Install OfficeCLI on Windows easily with one PowerShell command. Get the complete setup guide for this AI agent integration to streamline your workflow.

- Repository: [OfficeAI/OfficeCLI](https://github.com/iofficeai/OfficeCLI)
- Tags: getting-started
- Published: 2026-07-15

---

**OfficeCLI installs on Windows via a single PowerShell command that downloads the self-contained binary and configures AI agent integration automatically.**

OfficeCLI is a cross-platform command-line interface for creating and manipulating Word, Excel, and PowerPoint documents. According to the iOfficeAI/OfficeCLI source code, the tool distributes as a self-contained binary that bundles the .NET runtime, eliminating dependencies on external runtimes or Office installations. This guide covers the Windows installation process using the official PowerShell installer.

## Prerequisites

- Windows PowerShell 3.0 or later
- Administrator privileges (to write to `C:\Program Files`)

## One-Line PowerShell Installation

The fastest method uses the `irm` (Invoke-RestMethod) shortcut to download and execute the official install script from the repository root.

```powershell
irm https://raw.githubusercontent.com/iOfficeAI/OfficeCLI/main/install.ps1 | iex

```

This command fetches `install.ps1` and pipes it to `iex` (Invoke-Expression) for immediate execution.

### What the Install Script Does

According to the `install.ps1` source in the iOfficeAI/OfficeCLI repository, the installer performs three distinct tasks:

1. **Downloads the architecture-specific binary** – Detects x64 or ARM64 and pulls the appropriate executable from GitHub Releases.
2. **Copies the binary to the system PATH** – Places the file in `C:\Program Files\OfficeCLI` by default and updates environment variables.
3. **Installs the OfficeCLI skill file** – Copies [`SKILL.md`](https://github.com/iOfficeAI/OfficeCLI/blob/main/SKILL.md) into configuration folders for Claude Code, Cursor, VS Code, and other supported AI agents.

## Verifying the Installation

After the script completes, confirm the binary is accessible from any directory:

```powershell
officecli --version

```

This should return the installed version number without requiring a shell restart.

## Installing the Skill File Manually

If you skipped automatic skill installation or need to configure a new AI agent, download [`SKILL.md`](https://github.com/iOfficeAI/OfficeCLI/blob/main/SKILL.md) directly from the repository:

```powershell

# For Claude Code

irm https://officecli.ai/SKILL.md -OutFile "$HOME\.claude\skills\officecli.md"

```

For other agents, place the file in the agent's designated skill directory (e.g., `.cursor/skills/` for Cursor).

## Manual Binary Installation

If you prefer not to run the install script, download the Windows x64 executable directly from the releases page and place it on your PATH:

```powershell

# Replace VERSION with the latest release tag (e.g., v1.0.0)

Invoke-WebRequest -Uri "https://github.com/iOfficeAI/OfficeCLI/releases/download/vVERSION/officecli-win-x64.exe" `
  -OutFile "$env:USERPROFILE\officecli.exe"

# Add to PATH for the current session

$env:PATH += ";$env:USERPROFILE"

```

## Alternative Installation via npm

The repository includes an npm wrapper documented in [`npm/README.md`](https://github.com/iOfficeAI/OfficeCLI/blob/main/npm/README.md). This method downloads the native binary during the npm install process:

```bash
npm install -g @iofficeai/officecli

```

This approach uses the same underlying binaries defined in `officecli.csproj` but manages updates through npm.

## Summary

- **OfficeCLI is self-contained**: The binary bundles the .NET runtime, requiring no separate framework installation.
- **Single-line installation**: Run `irm https://raw.githubusercontent.com/iOfficeAI/OfficeCLI/main/install.ps1 | iex` in PowerShell.
- **Automatic AI setup**: The installer registers [`SKILL.md`](https://github.com/iOfficeAI/OfficeCLI/blob/main/SKILL.md) with Claude Code, Cursor, and VS Code automatically.
- **Flexible deployment**: Use PowerShell, manual download, or npm depending on your environment requirements.

## Frequently Asked Questions

### Do I need to install .NET Runtime before running OfficeCLI?

No. According to the `officecli.csproj` configuration in the iOfficeAI/OfficeCLI repository, the binary is built as a self-contained deployment that bundles the .NET runtime. You do not need the .NET SDK or runtime installed on the host machine.

### Which Windows architectures are supported?

The `install.ps1` script detects and downloads binaries for both x64 and ARM64 architectures. The [`install.sh`](https://github.com/iOfficeAI/OfficeCLI/blob/main/install.sh) counterpart handles macOS and Linux systems, making the tool truly cross-platform.

### Where is the OfficeCLI binary installed by default?

The PowerShell installer places the executable in `C:\Program Files\OfficeCLI` and updates the system PATH environment variable. You can verify the location by running `where officecli` in Command Prompt or `Get-Command officecli` in PowerShell.

### How do I update OfficeCLI to the latest version?

Repeat the one-line installation command. The `install.ps1` script automatically downloads the latest release from GitHub and overwrites the existing binary in `C:\Program Files\OfficeCLI`. For npm installations, run `npm update -g @iofficeai/officecli`.