AutoCode

The workflow engine for traceable autonomous job execution


AutoCode is an OpenCode plugin that turns rough conceptual ideas into completed solutions by means of structured workflow phases and optional review gates.

Run jobs autonomously with Auto mode, or stay in control with Assist mode, where AutoCode does the safe hard work and separates dangerous operations into guided manual steps.

No special UI required. AutoCode runs in OpenCode, keeps progress in version-controllable text files, and lets you track multiple jobs across their full lifecycle making it the ideal solution for remote development or server administration.


Features

  • ๐Ÿงญ Structured lifecycle โ€” move researched work from concept to solution in phases: concept โž” draft โž” executing job โž” review.
  • ๐Ÿ”Ž Research โ€” safely gather read-only evidence on project or non-project topics without making changes.
  • ๐Ÿง  Design โ€” brainstorm options, study feasibility, compare approaches, and report pros, cons, and risks before implementation starts.
  • ๐Ÿค– Auto mode โ€” execute approved drafted jobs autonomously while keeping progress and review evidence in version-controllable files.
  • ๐Ÿง‘โ€๐Ÿ’ป Assist mode โ€” keep a human in control while AutoCode reads the plan, recommends next steps, and tracks implementation progress.
  • โš ๏ธ Safe hand-offs โ€” provide a thorough manual task tutorial when an operation is unsafe.
  • โšก Token-optimized workflows โ€” smart orchestrators delegate to faster specialists to improve performance and reduce token use.
  • ๐Ÿ—„๏ธ Read-only database inspection โ€” discover configured database tables and read one table at a time without write access.
  • ๐Ÿงช Sandboxed execution โ€” run supported risky commands in Linux bubblewrap sandboxes when the host supports user namespaces.
  • ๐Ÿ“ฆ Cross-project tasking โ€” delegate investigation or edits to isolated OpenCode sessions in other directories after permission checks.
  • ๐Ÿ” SSH tool suite โ€” run remote commands and manage files through environment-keyed tools.
  • ๐Ÿงน Agent cleanup โ€” Agents remove temporary files and stop stray processes they started after debugging.

Installation

Prerequisites

  • OpenCode is required to load and use AutoCode.
  • The npm package / plugin entry is @ahumandev/autocode.

Optional

  • Bubblewrap is required only for Linux sandbox execution.
  • Bun is required only to build the plugin from source or run tests.
  • chrome-devtools-mcp is required only for Chrome DevTools MCP server support.

Installation for LLM Agents

Fetch installation guide and follow it:

curl -s https://raw.githubusercontent.com/ahumandev/autocode/refs/heads/main/docs/installation.md

Installation for Humans

OpenCode installs npm plugins automatically at startup when they are listed in the global plugin configuration.

Use the global OpenCode config at ~/.config/opencode/opencode.json or ~/.config/opencode/opencode.jsonc, then merge the plugin entry into the existing plugin array instead of overwriting the file.

{
  "plugin": ["@ahumandev/autocode"]
}

If your config already contains other plugins or settings, keep them and add @ahumandev/autocode to the existing array.

Verify installation

  1. Save the updated OpenCode config.
  2. Start or restart OpenCode.
  3. Confirm OpenCode loads AutoCode commands or agents after startup.

Update the plugin version

To update the public package version, change the plugin entry to @ahumandev/autocode@latest in your OpenCode config, save the file, and restart OpenCode.

{
  "plugin": ["@ahumandev/autocode@latest"]
}

OpenCode re-installs the requested npm plugin version during startup.

Uninstall

Remove @ahumandev/autocode from the OpenCode plugin array, save the config, and restart OpenCode.

If you previously used the repository-only shim workflow, also remove ~/.config/opencode/plugins/autocode.js if present.

Troubleshooting

  • Confirm the config file is ~/.config/opencode/opencode.json or ~/.config/opencode/opencode.jsonc.
  • Confirm your JSON or JSONC stays valid after merging the plugin entry.
  • Confirm the plugin entry uses @ahumandev/autocode or @ahumandev/autocode@latest exactly.
  • Restart OpenCode after every config change so startup installation can run again.

Core

  • Configuration โ€” config locations, keys, model tiers, and DB/SSH environment variables.
  • Usage โ€” more details on how to use AutoCode.
  • Terminology โ€” glossary of AutoCode concepts.

Reference

Development & Distribution

  • Development โ€” architecture, local setup, commands, testing, and local plugin deployment.
  • Distribution Guide โ€” distributing AutoCode on public registries.