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 acodemachine.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
| Field | Description |
|---|---|
name | Package identifier (must be unique) |
version | Semantic version (e.g., 1.0.0) |
Optional Fields
| Field | Description |
|---|---|
description | Brief description of the workflow |
paths | Custom paths for package resources |
Custom Paths
If your repository has an existing structure that doesn’t match the defaults, use thepaths field to map your directories.
Default Paths
Whenpaths is omitted, CodeMachine uses these defaults:
| Resource | Default Path |
|---|---|
| Config | config/ |
| Workflows | templates/workflows/ |
| Prompts | prompts/ |
| Characters | config/agent-characters.json |
When to Use Custom Paths
- New Repository
- Existing Repository
If you’re creating a new repository for your workflow, use the default structure—no
paths configuration needed.Publish to GitHub
After Publishing
Once published, users can import your workflow using any of these formats:- CLI
- TUI
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-codemachinereact-builder-codemachineapi-generator-codemachine
{name}-codemachine when using short name imports.