Skip to main content
Share your workflow package by publishing it to a public GitHub repository. Others can then import it using the codemachine import command.

Prerequisites

Before publishing, ensure your workflow package has:
  • A valid manifest file (codemachine.json)
  • At least one agent definition in config/main.agents.js
  • At least one workflow file in your workflows directory

Create the Manifest

Every publishable package needs a codemachine.json file at the repository root.

Minimal Manifest

For packages using the default directory structure:
codemachine.json

Full Manifest

For packages with custom directory layouts or additional metadata:
codemachine.json

Required Fields

Optional Fields


Custom Paths

If your repository has an existing structure that doesn’t match the defaults, use the paths field to map your directories.

Default Paths

When paths is omitted, CodeMachine uses these defaults:

When to Use Custom Paths

If you’re creating a new repository for your workflow, use the default structure—no paths configuration needed.

Publish to GitHub

1

Initialize Repository

Create a new GitHub repository or use an existing one.
2

Add Manifest

Create your codemachine.json at the repository root.
3

Add Required Files

Ensure you have the required configuration and workflow files.
4

Push to GitHub

Commit and push to a public repository.
Your repository must be public for others to import it. GitHub private repositories cannot be fetched by the import system.

After Publishing

Once published, users can import your workflow using any of these formats:
The imported workflow will be available in the workflow selection menu when running codemachine.

Private Workflows

If you prefer to keep your workflow private, you can share it via local import instead of publishing to a public repository.
For private workflows, share the package directory directly and have users import it locally. See Import Workflows - Local Imports for details.

Naming Conventions

For discoverability, consider using the -codemachine suffix in your repository name:
  • my-workflow-codemachine
  • react-builder-codemachine
  • api-generator-codemachine
This allows users to import by short name:
CodeMachine searches GitHub for repositories matching {name}-codemachine when using short name imports.