@anthriq/pipeline-cli
v1.0.4
Published
CLI tool for managing and publishing pipelines to the Pipeline Registry
Readme
Pipeline CLI
A Node.js CLI tool for managing and publishing pipelines to the Registry Stack.
Installation
# First, build the SDK
cd sdk/node
npm install
npm run build
# Then, install and build the CLI
cd ../../tools/pipeline-cli
npm install
npm run buildUsage
Initialize a New Pipeline
pipeline-cli initThis creates a folder named after your pipeline (slugified) and writes pipeline.json inside it.
pipeline-cli init --dir ./projects --name "My Pipeline" --version 1.0.0Notes:
- The pipeline ID is auto-generated (UUID); you only provide the human-readable name.
- Pipeline names must contain only letters, numbers,
-, or_(no spaces). The generated folder matches the name exactly (e.g.,./projects/my-pipeline/pipeline.json).
Validate a Pipeline
pipeline-cli validateThis performs a local structural validation (no native dependencies required). You can specify a different file:
pipeline-cli validate --file ./path/to/pipeline.jsonPush to Remote Registry
pipeline-cli pushThis will:
- Validate the pipeline
- Create a tar.gz package
- Push to the remote registry
Options:
--skip-validation: Skip validation (not recommended)--dir <directory>: Pipeline directory (default: current directory)--file <file>: Path to pipeline.json (default: pipeline.json)--remote-server <url>: Harbor/registry endpoint (default:https://demo.goharbor.io)--remote-user <user>/--remote-password <password>: Credentials (defaults mirrorremote_config.hpp)--project <name>: Project namespace (default:pipeline_registry)--oras-bin <path>: Custom path to theorasbinary (default:oras)
Pipeline Structure
A pipeline must have:
id: Unique pipeline identifiername: Human-readable nameversion: Pipeline version (semver format)nodes: Array of node definitionspipes: Array of pipe definitions
Optional fields:
description: Pipeline descriptionauthors: Array of author namestags: Array of tagssignalSocketIdentifier: ZMQ socket identifierentry: Array of entry node IDsexit: Array of exit node IDs
Examples
Complete Workflow
# 1. Initialize a new pipeline
pipeline-cli init --id my-pipeline --name "My Pipeline"
# 2. Edit pipeline.json to add your nodes and pipes
# ...
# 3. Validate the pipeline
pipeline-cli validate
# 4. Push to remote registry
pipeline-cli pushConfiguration
The CLI uses the following defaults:
- Remote registry server:
https://demo.goharbor.io - Remote project:
pipeline_registry - Remote credentials:
operator_registry/Registry@1234@1234(matchremote_config.hpp) - ORAS binary:
oras(must be available on your PATH) - Validation is pure TypeScript/JSON parsing (no native dependency)
You can override these with command-line options.
Requirements
- Node.js >= 16.0.0
- Native pipeline bridge library (libpipeline_registry_bridge.*) to push to remote
- ORAS CLI (for remote registry push)
