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
Optional Fields
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:
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
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.
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.