Skip to content

Quickstart

This guide walks you through creating a simple command, pushing it to the registry, and running it.

  1. Log in

    mycli uses email-based magic links for authentication:

    Terminal window
    my cli login

    Enter your email address and click the verification link sent to your inbox. After verification, the CLI stores your credentials securely in the OS keyring.

  2. Create a command

    Scaffold a new command spec:

    Terminal window
    my cli init hello

    This creates a hello/command.yaml file with a starter template. Edit it:

    hello/command.yaml
    schemaVersion: 1
    kind: command
    metadata:
    name: hello
    slug: hello
    description: Say hello
    args:
    positional:
    - name: name
    description: Who to greet
    required: true
    steps:
    - name: greet
    run:
    - echo "Hello, {{.args.name}}!"
  3. Push to the registry

    Terminal window
    my cli push -f hello/command.yaml

    The CLI validates your spec against the JSON Schema and publishes it to the server.

  4. Run

    Terminal window
    my cli run hello -- World

    Output:

    Hello, World!

You can also use commands from git-backed libraries without an account:

Terminal window
my library add https://github.com/user/example-library.git
my <library> <command>