Skip to main content
Alpha version breaking changes might occur Anchor

Create Dynamic CLI's as your GitOps Marketplace

Connect to any git repository with a simple opinionated structure and expose executable commands as dynamic command-line-interface utility to use from any environment, CI and local.

brew install ZachiNachshon/tap/anchor
Read the docs

Currently v0.12.0 · Download · Docs · All Releases

Anchor your Ops environment into a version controlled repository

Create a CLI utility out-of-the-box from your git repositories scripts / commands / other by adding only a basic YAML config file.

Read installation docs

Install using several options

Install anchor via Homebrew, pre-built release or from sources. Package managed installs contains only the bare minimum without documentation / site / dev-scripts etc...

For additional information check the download section.

Register a remote git repository

Adding a new git repository to anchor context is as simple as running the following command:

anchor config set-context-entry ops-group \ \
    --repository.remote.autoUpdate=true \

For all config context options check the configuration section.

Define command and instructions

Anchor relies on the location of command.yaml & instructions.yaml file(s) on the git repository, those files dictate the command and actions hierarchy.

Learn more about the git repository structure

Introduce YAML files to the repository

Every command.yaml represent a CLI menu command, the instruction.yaml file and its content describes the available actions.

├── ...
├── <cli-command-1>                   
│   └── <cli-actions-1>               
│       ├── instructions.yaml
│       ├── <additional-files-and-folders>
│       └── ...       
│   ├── command.yaml
│   ├── <additional-files-and-folders>
│   └── ...                
├── team-build
│   └── bazel
│       ├── instructions.yaml              
│       └── ...       
│   └── buildkite
│       ├── instructions.yaml              
│       └── ...       
│   └── command.yaml
├── team-infra
│   └── backoffice
│       ├── instructions.yaml              
│       └── ...       
│   └── production
│       ├── instructions.yaml              
│       └── ...       
│   └── command.yaml
└── ...

Learn more about the menu command structure.

Instantly reflect remote git repository changes

When auto-update config context is used, every interaction with anchor aligns its state to be up to date with the remote git repository.


Choose how to interact with anchor

Use anchor from any environment with an interactive shell menu or use a direct command to run any of its underlying actions.

Learn how to define a new action

Interactive shell

To continue with previous example, interact via anchor team-build select and use the arrows to select which action to run.

Anchor Build Bazel

Direct command

Alternatively, if anchor is being used within a managed environment and there is a need to run its actions non-interactively, use the run command as follows:

anchor team-build run bazel --action=build-bazel-repository

Document every action

Add detailed description to any anchor action, a wrapper for shell script, Python script, binary call with its options/argument or any other executable. Make it clear what is the action responsibility, what are the control arguments and what is the expected outcome.

Anchor Production Example

Run multiple actions simultaneously

Create a workflow plan comprised from multiple pre-defined actions to run in a serialized and ordered manner.

Anchor Jenkins Workflow

Try the playground

Take anchor for a spin by using it on a remote git playground repository using a single command.

anchor config set-context-entry playground \
    --repository.remote.url= \
    --repository.remote.autoUpdate=true \

See playground walkthrough