New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

akm-opencode

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

akm-opencode

OpenCode plugin for Agentikit - search and show extension assets via the akm CLI.

latest
Source
npmnpm
Version
0.2.0
Version published
Maintainers
1
Created
Source

akm-opencode

OpenCode plugin for the Agentikit CLI. Registers tools that let your AI agent search, show, and manage extension assets from stash directories and registries.

Installation

Add to your OpenCode config (opencode.json):

{
  "plugin": ["akm-opencode"]
}

Tools

ToolDescription
akm_searchSearch the local stash, the registry, or both for scripts, skills, commands, agents, and knowledge
akm_registry_searchSearch configured registries for installable kits and optional asset-level hits
akm_showShow a stash asset by its ref
akm_indexBuild or rebuild the search index
akm_agentDispatch a stash agent:* into OpenCode using the stash prompt and metadata
akm_cmdExecute a stash command:* template in OpenCode via SDK session prompting
akm_addInstall kits from npm, GitHub, git URLs, or local directories
akm_listList installed registry kits
akm_removeRemove an installed registry kit and reindex
akm_updateUpdate one installed kit or all installed kits
akm_cloneClone an asset into the working stash or a custom destination for editing
akm_configGet, set, unset, list, or inspect akm configuration (including config path --all)
akm_runExecute a stash script using its run field
akm_sourcesList all resolved stash search paths
akm_upgradeCheck for or install akm CLI updates

Registry discovery

Use either:

  • akm_search with source: "registry" or source: "both"
  • akm_registry_search when you only want installable community kits

Registry hits include id, installRef, and action fields. Use installRef when passing a result into akm_add; registry-specific IDs are not installable refs. Use assets: true when you also want asset-level matches from registry v2 indexes.

Agent Dispatch

Use akm_agent after retrieving an agent ref from akm_search.

Inputs:

  • ref (optional): stash ref like agent:coach.md
  • query (optional): resolve best matching stash agent when ref is omitted
  • task_prompt (required): user task to run
  • dispatch_agent (optional): OpenCode agent name (defaults to general)
  • as_subtask (optional): create child session (defaults to true)

At least one of ref or query is required.

Behavior:

  • Loads the stash agent via akm show
  • Uses stash prompt verbatim as OpenCode system
  • Applies stash modelHint when in provider/model format
  • Applies stash toolPolicy when it maps to boolean tool flags

Command Execution

Use akm_cmd to execute stash command templates through the OpenCode SDK.

Inputs:

  • ref (optional): stash ref like command:review.md
  • query (optional): resolve best matching stash command when ref is omitted
  • arguments (optional): raw command arguments for $ARGUMENTS, $1, $2, etc.
  • dispatch_agent (optional): OpenCode agent name (defaults to current agent)
  • as_subtask (optional): create child session (defaults to false)

At least one of ref or query is required.

Prerequisites

When the plugin loads, it runs bun install -g akm-cli@latest so it always picks up the latest published npm package. It then prefers the Bun-installed binary and falls back to an existing akm on PATH when needed. It does not run the standalone shell installers automatically.

# macOS / Linux
curl -fsSL https://raw.githubusercontent.com/itlackey/agentikit/main/install.sh | bash
# PowerShell (Windows)
irm https://raw.githubusercontent.com/itlackey/agentikit/main/install.ps1 -OutFile install.ps1; ./install.ps1

# Or via Bun
bun install -g akm-cli@latest

Stash model

The stash directory is resolved automatically via a three-tier fallback: AKM_STASH_DIR env var (optional override) → stashDir in config.json → platform default. Set it persistently with:

akm config set stashDir /abs/path/to/your-stash

Expected layout:

stash/
├── scripts/    # executable scripts (.sh, .ts, .js, .ps1, .cmd, .bat, .py, .rb, .go, .pl, .php, .lua, .r, .swift, .kt)
├── skills/     # skill directories containing SKILL.md
├── commands/   # markdown files
├── agents/     # markdown files
└── knowledge/  # markdown files

Assets are resolved from three source types: working (local stash), search paths (additional dirs via searchPaths config), and installed (registry kits via akm add).

Docs

Keywords

opencode

FAQs

Package last updated on 18 Mar 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts