zip / unzip

CLI

Create and extract .zip archives. Preinstalled on macOS and most Linux images.

Zip a folder or unpack a .zip without an interactive prompt

3 of 3 recipes verified by execution · 2026-09-17#archive#compress#zip#extract

Verified commands

Executed by our harness on the platforms shown; the assertion checked the actual result, not just the exit code.

Zip a directory recursively

Verified macOS · Linux · 2026-09-17
zip -qr out.zip project

List the files inside a .zip

Verified macOS · Linux · 2026-09-17
unzip -l archive.zip

Extract a .zip into a directory, overwriting silently

Verified macOS · Linux · 2026-09-17
unzip -qo archive.zip -d out
Common failures (1)
  • unzip hangs asking 'replace file? [y]es, [n]o...'add -o to overwrite without prompting (agents cannot answer prompts)

Install

aptsudo apt install zip unzip
Homebrewbrew install zip

Agent notes

When to use
Exchanging archives with Windows users or web uploads
Quick examples
  • zip -qr out.zip project
  • unzip -qo archive.zip -d out

Use from an agent

curl -s https://clihub.com/api/tools/zip | jq '.agentHints.provenRecipes[] | {task, command, verified}'

Or call get_tool with slug zip on the MCP server at https://clihub.com/mcp.

Homepage ↗Info-ZIP0 views