Skip to main content

Install agent tool packages into global or project OpenCode configurations

Project description

OpenCode Agent Deploy

opencode-agent-deploy installs existing agent packages from public PyPI into the virtual environment that executes the deploy command. It generates their OpenCode skills, tools, and plugins with absolute paths back to that same environment.

Version 0.4.2 supports these already published deploy packages:

  • pdf: agent-pdf-workspace==0.1.1
  • mapper: agent-codinglanguage-mapper==1.1.1
  • memory: opencode-markdown-memory==0.1.0
  • folder: agent-folder-workspace==0.1.0

The upstream packages are not copied or republished. The deploy command downloads the selected, pinned distributions directly from https://pypi.org/simple.

Requirements

  • Python 3.11 through 3.14
  • An OpenCode installation
  • Network access to public PyPI during deployment

Install the deploy command with an isolated application installer. Its application environment becomes the shared default runtime for all selected packages:

uv tool install opencode-agent-deploy

Alternatively, use pipx install opencode-agent-deploy or install it into your own activated virtual environment. The command rejects the default runtime mode when it is executed by a system Python outside a virtual environment.

Interactive installation

Run:

opencode-agent-deploy install

The command shows all four package names and pinned versions. Select 1, 2, 3, 4, or a comma-separated combination such as 1,2,3,4, then select global or project scope and confirm the plan. Global scope writes generated artifacts to the OpenCode config directory. Project scope writes them below .opencode/ in the selected project. In both scopes, opencode.json remains user-owned.

Automated installation

Install all four packages into the current project:

opencode-agent-deploy install \
  --package pdf \
  --package mapper \
  --package memory \
  --package folder \
  --scope project \
  --target "$PWD" \
  --yes

Install only the PDF workspace globally:

opencode-agent-deploy install \
  --package pdf \
  --scope global \
  --yes

Use an explicit global OpenCode config directory when automatic discovery is not appropriate:

opencode-agent-deploy install \
  --package mapper \
  --scope global \
  --config-dir "$HOME/.config/opencode" \
  --yes

Install only Markdown memory globally:

opencode-agent-deploy install \
  --package memory \
  --scope global \
  --yes

Install only the folder workspace globally:

opencode-agent-deploy install \
  --package folder \
  --scope global \
  --yes

For automation, every selected package is supplied with a repeated --package flag and the scope is supplied with --scope. --json emits a machine-readable result. The default --runtime current installs into the executing venv and cannot be combined with --dry-run. Use --runtime isolated --dry-run to download and validate packages in temporary environments and collision-check OpenCode files without committing them.

Runtime selection and managed files

The default current runtime installs all selected, exactly pinned packages with one dependency resolution into sys.prefix, the venv that contains and executes opencode-agent-deploy. It does not create another venv. On Windows this means the packages and commands remain in that environment's Lib\site-packages and Scripts directories; no package venv is created below %LOCALAPPDATA%.

The previous per-package behavior remains available with --runtime isolated. It creates separate environments below the platform data directory: global environments use venvs/global/<package>, while project environments use venvs/projects/<project-hash>/<package>.

Generated OpenCode artifacts contain the absolute Python or console-script path from the selected runtime. In the default mode, Python is exactly the interpreter that executes opencode-agent-deploy, and console scripts are taken from the same venv. The PDF skill and TypeScript tool therefore call the selected pdfws executable directly. The package-named mapper skill, plugin, and Markdown agent use that Python interpreter directly. The Markdown memory TypeScript tool calls its opencode-markdown-memory executable directly. No shell activation or ambient PATH modification is required.

The folder workspace skill and project-aware plugin are generated by the upstream package. The plugin calls the selected Python interpreter directly and starts one local stdio MCP server for the normalized active OpenCode project root.

Markdown memory configuration and data are scope-local. Global deployment uses <opencode-config>/opencode-markdown-memory/; project deployment uses <project>/.opencode/opencode-markdown-memory/. The generated config.toml is deploy-owned. The mutable MEMORY.md is initialized atomically on first use and is never placed under deploy ownership, so later deployments cannot overwrite memories.

The installer owns generated files recorded in opencode-agent-deploy-manifest.json. It never reads, writes, deletes, or claims ownership of opencode.json. Upgrading from an older deploy release removes any prior manifest claim on that path without inspecting or changing the file.

The mapper is installed as skills/agent-codinglanguage-mapper/SKILL.md and agents/agent-codinglanguage-mapper.md within the selected integration root. Markdown memory still needs the user to allow its tools in their own OpenCode configuration, for example:

{
  "permission": {
    "markdown_memory_*": "allow"
  }
}

For other generated artifacts, the installer refuses to overwrite:

  • an existing destination it does not own;
  • an owned destination changed locally since the previous deployment;
  • a symlink in a managed path;
  • malformed or unexpected exporter output.

Artifact updates and the ownership manifest are committed atomically. Isolated package environments are restored if preparation or validation fails. Package changes inside the default executing venv are ordinary pip changes and are not rolled back when a later OpenCode artifact step fails.

OpenCode verification

Restart OpenCode after a successful deployment so it reloads project or global integrations. Confirm that the installed PDF skills/tools, package-named mapper skill/plugin/Markdown agent, five markdown_memory_* CRUD tools, and folder workspace skill/plugin/MCP server appear in the intended scope. The command output identifies the config file, manifest, environments, and generated artifacts; --json is useful for scripted verification.

Trust boundary

Deployment installs and executes the pinned upstream exporters. Only use releases you trust. Subprocesses are invoked as argument arrays without a shell, and package downloads are restricted to the public PyPI simple index. The deploy command does not read or print credential files and does not manage PyPI credentials.

Security reporting and supported-version policy are in SECURITY.md. The reproducible maintainer procedure is in docs/release.md.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

opencode_agent_deploy-0.4.2.tar.gz (94.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

opencode_agent_deploy-0.4.2-py3-none-any.whl (25.3 kB view details)

Uploaded Python 3

File details

Details for the file opencode_agent_deploy-0.4.2.tar.gz.

File metadata

  • Download URL: opencode_agent_deploy-0.4.2.tar.gz
  • Upload date:
  • Size: 94.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for opencode_agent_deploy-0.4.2.tar.gz
Algorithm Hash digest
SHA256 d0b91631aaf351f9cccf358e6699da0af78410c49997c1407d1a36a1a985f412
MD5 9a7309165b4910e3e0a2f6aebcb4e434
BLAKE2b-256 dfcb70e305ee7f2102e68c2a68a1be77454b096c49761f554f47059750cd2f93

See more details on using hashes here.

File details

Details for the file opencode_agent_deploy-0.4.2-py3-none-any.whl.

File metadata

File hashes

Hashes for opencode_agent_deploy-0.4.2-py3-none-any.whl
Algorithm Hash digest
SHA256 c1472dfd405e77e8de1ac99f3224a1fed381eb75d5c6e2c0182ae2cbabb1d5d9
MD5 9fd9991b6a7ec4a3917eb774b86e49f8
BLAKE2b-256 edbe4a925087fe66c8ff97a48dcd761cacf45d4596f2ad1eb0256ef3baeff797

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page