v1.98.0 · 2.0 command surface

NeoZip CLI

NeoZip CLI 2.0 command surface — AI agent JSON I/O, bundled Skills, neozip prune for shared-part Office archives (PDFs stored whole), neozip wiki for ZipWiki queries, Token Service Data Wallet, Merkle v1 provenance, Zstandard, and AES-256.

Overview

NeoZip CLI provides three binaries — neozip, neounzip, and neolist — for archive workflows on macOS, Linux, and Windows. v1.98.0 is the pre-2.0 beta of the unified multi-command surface: prune and wiki are beta (flags may change), plus Merkle v1, origin-aware Token Service networks, and Stripe membership. Use extended help with -h2.

  • v1.98.0 — NeoZip CLI 2.0 command surface (unified neozip); prune and wiki remain beta
  • AI agent ready — machine-readable JSON I/O, schema introspection, dry-run, and bundled Skills
  • neozip prune (beta) — shared-part Office archives (PRUNE / PRUNE-ITEM); PDFs stored whole; -ts / -b proofs
  • neozip test — unzip -t style integrity check for plain and pruned archives
  • neozip wiki (beta) — query .zipwiki knowledge packages (open, search, query, read, extract, origin)
  • neozip benchmark — size/speed for deflate, zstd, and pruning
  • NeoZip Token Service — Data Wallet setup, silent token refresh, testnet gas grants, Stripe membership
  • APPNOTE Merkle v1 roots for mint / stamp / verify; Node.js 22.15+ for native Zstd

Installation

Requires Node.js 22.15.0 or higher (native Zstd). Install globally from npm:

Install

# Requires Node.js ≥ 22.15
npm install -g neozip-cli

# Verify installation (v1.98.0)
neozip --version
neozip extract --help
neozip test --help
neozip prune --help
neozip wiki --help

Quick start

A typical workflow: create an archive, inspect it, then extract or test integrity.

Basic workflow

# Create a ZIP archive
neozip archive.nzip file1.txt folder/

# List contents
neozip list archive.nzip

# Extract
neozip extract archive.nzip -d out/

# Prefer extract / list over deprecated wrappers
# neounzip / neolist still work but are deprecated

AI agent integration

NeoZip is designed for autonomous AI and LLM agents. Every command exposes a stable, machine-readable surface alongside its human interface. Agents can integrate via three paths:

PathWhen to use
CLI + JSONDirect shell invocation from any agent runtime
Bundled SkillsCursor, Claude Code, or other skill-aware hosts — load via neozip skills install
NeoZip MCPMCP-native agents (v0.9.6-beta) — same ~/.neozip/connection/ store, dual-era MCP, wiki_* and prune_* tools
ZipWiki queryneozip wiki / zipwiki on .zipwiki packages — pack with ZipWiki at zipwiki.ai

Agent workflow

  1. Introspect — neozip schema <neozip|extract|list|neounzip|neolist|connect|prune> returns accepted fields, types, defaults, and exit codes.
  2. Preview — add --dry-run to neozip / neozip extract / neozip prune create to resolve the full plan as JSON without writing.
  3. Execute — run with --format json; parse stdout only (stderr is hints).
  4. Recover — on failure, check error.exitCode and run error.nextCommand when present.

Agent workflow examples

# Introspect accepted fields and exit codes
neozip schema neozip

# Preview a create operation without writing
neozip --format json --dry-run \
  --params '{"level":9,"encrypt":true,"password":"s3cret"}' \
  --json '{"archive":"out.zip","files":["src/","README.md"]}'

# Execute with structured output
neozip --format json \
  --params '{"level":9,"encrypt":true,"password":"s3cret"}' \
  --json '{"archive":"out.zip","files":["src/","README.md"]}'

# Extract with on-chain integrity check
neozip extract --format json \
  --params '{"exdir":"out","preVerify":true}' \
  --json '{"archive":"tokenized.nzip"}'

JSON I/O conventions

  • Output: --format json writes a single object to stdout — success: { ok: true, ... }; failure: { ok: false, error: { code, exitCode, message, nextCommand? } }
  • Input: --params '<JSON>' (control options) and --json '<JSON>' (payload: archive + files/targets). Either accepts - to read from stdin.
  • Precedence: explicit CLI flags override values from --params/--json.
  • Exit codes: InfoZip-compatible; echoed in error.exitCode. Branch on codes, not message text.

Advanced features for agents

FeatureAgent paramsPrerequisites
AES-256 encryption"encrypt": true, "password": "…"None
PKZIP encryption"encryptionMethod": "pkzip"None
Zstd compression (default)"compression": "zstd", "level": 0–9Node.js ≥ 22.15
InfoZip compatibility"legacy": trueDisables blockchain extensions
On-chain tokenization"blockchain": trueneozip connect + gas (connect fund on testnet)
Token Service timestamp"blockchainTokenService": trueVerified account + access token
Pre-verify on extract"preVerify": trueArchive must be tokenized
Network selection"network": "base-sepolia" | "base"Must match active Token Service origin
Shared-part archive (beta)neozip prune create; "level", "verify", "dryRun", "sha256"Office documents from one producer (PDFs stored whole)

Safety rails

  • Archive names and extraction dirs are validated for control characters and dangerous Unicode.
  • neozip extract refuses zip-slip entries whose resolved path escapes the target directory.
  • --dry-run never touches the filesystem.
  • Treat all agent-supplied paths and IDs as potentially adversarial.

Bundled Agent Skills

Six bundled skills ship inside the npm package. Install them into Claude Code or Cursor after npm install -g neozip-cli. For MCP-native agents, see the NeoZip MCP product page or setup & docs — it shares the same ~/.neozip/connection/ store.

SkillCovers
neozip-sharedJSON output, --params/--json, schema, dry-run, exit codes
neozip-createArchive creation: compression, encryption, blockchain flags
neozip-extractExtract, test, verify; zip-slip protection; --pre-verify; pruned rebuild
neozip-listList archive contents as JSON
neozip-connectToken Service setup, refresh, funding, membership
neozip-legacyInfoZip/PKZIP-compatible archives (--legacy)
neozip-pruneBeta: shared-part Office archives (PDFs stored whole)

Install Agent Skills

# Symlink bundled skills into ~/.claude/skills and ~/.cursor/skills
neozip skills install

# Claude Code only
neozip skills install --target claude

# Show where skills live in your install
neozip skills path
neozip skills list

# ZIP files for Claude Cowork / claude.ai upload
neozip skills pack --output-dir ./neozip-skills-zips

Pruned archives (beta)

neozip prune builds lossless shared-part archives for Office documents (fonts, styles, themes, images). Shared parts use the PRUNE-ITEM method under META-INF/PRUNE/ITEMS/; each document uses the PRUNE method with the NEO_PRUNE_METHOD extra field. PDFs are stored whole for now. Plain neozip extract / neozip test rebuild pruned entries; stock unzip refuses PRUNE and PRUNE-ITEM entries. Create with -ts / -b for Token Service proofs. On a sample corpus of 253 Word (.docx) documents, zstd+prune cut 17.29 MB to 8.62 MB (50%) — full results. Wire: Application Note 0.5.0.

neozip prune

# Analyze shared Office parts (dry-run). PDFs are stored whole.
neozip prune analyze ./docs/*.docx ./reports/

# Create a pruned NeoZip (PRUNE docs + PRUNE-ITEM shared parts)
neozip prune create corpus.nzip ./docs/*.docx

# Timestamp or tokenize a pruned archive (needs neozip connect)
neozip prune create -ts stamped.nzip ./docs/*.docx
neozip prune create -b tokenized.nzip ./docs/*.docx
neozip prune verify stamped.nzip
neozip upgrade stamped.nzip

# Restore — plain extract rebuilds PRUNE entries; prune extract still works
neozip extract corpus.nzip -d restored/
neozip test corpus.nzip

# Inspect Pruned Data Table
neozip prune info corpus.nzip

# Agent JSON surface
neozip schema prune
neozip prune create --format json --params '{"level":7}' \
  --json '{"archive":"corpus.nzip","files":["a.docx","b.docx"]}'

# Compare plain zstd vs prune
neozip benchmark prune ./docs/*.docx

ZipWiki packages (beta)

neozip wiki (alias neozip zipwiki) queries portable .zipwiki knowledge packages — open, search, query, read, extract, and resolve omit-original origins. This is query-only: create packages with ZipWiki (zipwiki.ai), not neozip create.

neozip wiki

# Open / catalog a ZipWiki package (default: wiki.zipwiki in cwd)
neozip wiki open knowledge.zipwiki --format json
# Alias: neozip zipwiki open …

# Search OKF cards and parsed markdown
neozip wiki search knowledge.zipwiki "gross margin" --limit 10
neozip wiki search knowledge.zipwiki "gross margin" --in okf,parsed

# Query with passages / gaps
neozip wiki query knowledge.zipwiki "Q3 recurring revenue" --limit 5

# Read manifest, OKF card, or parsed markdown
neozip wiki read knowledge.zipwiki --manifest
neozip wiki read knowledge.zipwiki --okf Q3-earnings
neozip wiki read knowledge.zipwiki --parsed Q3-earnings.pdf.md

# Extract verified members; resolve omit-original origins
neozip wiki extract knowledge.zipwiki ./out --path Q3-earnings.pdf
neozip wiki origin knowledge.zipwiki --parsed Q3-earnings.pdf.md --fetch -o ./Q3.pdf

# Create packages with ZipWiki (zipwiki pack) — not neozip create

NeoZip Token Service & Data Wallet

All wallet identity and Token Service credentials live in the shared connection store at ~/.neozip/connection/ — the same profile used by NeoZip Desktop and NeoZip MCP. Run neozip connect (alias: neozip init) to set up your local Data Wallet and verified Token Service account.

The Token Service provides email-verified identity, Ethereum timestamps (-ts), silent wallet-signature token refresh, optional testnet gas grants via neozip connect fund, and Stripe membership for billed production services via neozip connect membership. Hosted testnet defaults to Base Sepolia; production Token Service defaults to Base Mainnet. On-chain tokenization (-b) signs locally with the Data Wallet and does not require a current access token.

Token Service setup

# Scripted setup (non-interactive, agent-friendly)
neozip connect register --email you@example.com --json
neozip connect verify --email you@example.com --code 123456 --json
neozip connect wallet create --ack-backup --json
neozip connect finish --json

# Silent wallet-signature token renewal (preferred)
neozip connect refresh --json

# Membership for billed Token Services (production)
neozip connect membership status --json
neozip connect membership checkout --json
neozip connect membership portal --json

# Testnet gas grants only (Base Sepolia) — not available on Base Mainnet
neozip connect fund status --json
neozip connect fund --json
neozip connect fund --network base-sepolia --json

# Optional overrides
export NEOZIP_CONNECTION_DIR="/path/to/connection"
export NEOZIP_UNLOCK_PASSPHRASE="..."
export NEOZIP_NETWORK="base-sepolia"

Compression

Zstd is the default method. Use Deflate for maximum compatibility, level -0 to store without compression, or --legacy for archives readable by stock InfoZip unzip.

Compression examples

# Zstd (default)
neozip -9 archive.nzip files/

# Deflate (Info-ZIP friendly)
neozip --compression deflate archive.zip files/

# Store
neozip --compression store archive.zip already-compressed.bin

Encryption

AES-256 is the recommended default. Legacy PKZIP encryption is available for compatibility only. Extraction auto-detects the encryption method.

Encryption examples

# NeoEncrypt AES-256 (default when encrypting)
neozip -e -P 'secret' secure.nzip docs/

# WinZip-compatible AES
neozip -e --encryption-method aes256 -P 'secret' secure.zip docs/

# Legacy ZipCrypto
neozip -e --encryption-method pkzip -P 'secret' legacy.zip docs/

Blockchain

Tokenize archives on supported EVM networks (network follows your connection's Token Service origin), add Token Service timestamps with APPNOTE §6 Merkle v1 digests, and verify integrity on extract. Run neozip connect before using blockchain features (see Token Service & Data Wallet above).

Blockchain examples

# Token Service timestamp
neozip -ts stamped.nzip docs/

# On-chain tokenize (requires connect + gas)
neozip -b tokenized.nzip docs/

# Upgrade pending timestamp / mint
neozip upgrade stamped.nzip
neozip mint stamped.nzip

Full command reference

Flags, subcommands, and examples for neozip, neounzip, neolist, connect, skills, schema, and more.

Building apps with NeoZipKit or NeoZip-blockchain? See the Developers hub for SDK installation and library documentation.