Skip to main content
Import workflow packages from local directories, GitHub repositories, or any git URL.

Quick Start

After importing, your workflow appears in the selection menu when you run codemachine.

Source Formats

CodeMachine supports multiple import source formats:

Resolution Priority

When you run an import, CodeMachine checks sources in this order:
  1. Local path — if it’s absolute, starts with ./, ../, or ~
  2. HTTPS URLs — full GitHub or git URLs
  3. Git SSH URLsgit@ format
  4. Owner/repo format — checks if local path exists first
  5. Short name — searches GitHub for matching packages

Local Imports

Import workflows from your local filesystem for development and testing.

Path Formats

Local imports require a valid manifest file (codemachine.json or .codemachine.json) in the source directory.

Local Path Resolution

For a path to be recognized as local, it must:
  • Be an absolute path (starts with /)
  • Start with ./ or ../ (relative)
  • Start with ~ (home directory)
  • Contain a valid manifest file

GitHub Imports

Import workflows directly from GitHub repositories.

By Owner/Repo

By Full URL

By Short Name

Search GitHub for packages by name:
Short name search looks for repositories with the -codemachine suffix on GitHub.

Git SSH


Manifest Files

Every importable package needs a manifest file (codemachine.json or .codemachine.json) at the root with name and version fields.
For details on creating and configuring manifest files, see Publish Workflow.

Validation Requirements

Both local and remote imports must pass validation:
1

Manifest Present

Must have codemachine.json or .codemachine.json with name and version fields.
2

Config Directory

Must have config/main.agents.js with agent definitions.
3

Workflow Files

Must have at least one .workflow.js file in the workflows directory.
4

Prompts Directory (Optional)

If missing, you’ll see a warning but import will proceed.

Import Location

Imported packages are stored in:
For example, importing a package named codemachine-one creates:

Examples

Import Local Development Package

Import from GitHub

Import Using TUI

Within CodeMachine, use the /import command:

Troubleshooting

Ensure your package has either codemachine.json or .codemachine.json at the root level with valid name and version fields.
Create config/main.agents.js with at least one agent definition:
Create at least one .workflow.js file in templates/workflows/:
Make sure your path:
  • Starts with / (absolute), ./, ../ (relative), or ~ (home)
  • Points to an existing directory
  • Contains a valid manifest file

Next Steps

Publish Workflow

Share your workflow with others on GitHub