Deine Privatsphäre, deine Wahl

Optionale Analyse- und Werbedienste (einschließlich Meta Pixel und Google Ads bei der Registrierung) nutzen wir nur mit deiner Einwilligung. Notwendige Sprach- und Sicherheitsfunktionen bleiben immer aktiv. Datenschutz

moreflow auf der Kommandozeile

@moreflow/cli führt dieselben Operationen wie der moreflow-MCP-Server direkt im Terminal aus. Operation finden, Vertrag lesen, mit JSON aufrufen. Gemacht für Skripte, CI-Jobs, Massenexporte und Coding-Agents, die in der Shell arbeiten.

Aktuelle Version: @moreflow/cli@0.1.0Vollständige Entwickler-Doku

Installation

Ohne Installation ausführen:

npx @moreflow/cli@0.1.0

Oder global installieren:

npm install -g @moreflow/cli@0.1.0

Schnellstart

  1. CLI installieren

    Damit steht der Befehl moreflow im Terminal bereit. Ohne Installation stellst du jedem Befehl stattdessen npx @moreflow/cli voran.

    npm install -g @moreflow/cli@0.1.0
  2. Anmelden

    Ein Browserfenster öffnet sich. Melde dich bei moreflow an, wähle den Workspace und lege fest, welche Bereiche die CLI nutzen und wie viel sie ohne Rückfrage ändern darf.

    moreflow auth login --oauth
  3. Überblick verschaffen

    Zeig die Module an, etwa Kunden, Deals oder Rechnungen.

    moreflow modules
  4. Operation finden

    Such in normalen Worten. Du siehst nur Operationen, die deine Anmeldung erlaubt.

    moreflow find send invoice
  5. Vertrag lesen

    Eingabeschema, Beispiel-Eingaben, mögliche Fehler und ob ein Schreibzugriff eine Bestätigung braucht.

    moreflow describe clients.create
  6. Aufrufen

    Übergib die Eingabe als JSON. Bei Listen holt die CLI auf Wunsch alle Seiten.

    moreflow call clients.list '{"limit":5}'
    moreflow call clients.list --all --max-items 200

Anmeldeoptionen

Auf deinem eigenen Rechner meldest du dich im Browser an, auf Servern und in CI mit einem API-Token. Gespeicherte Zugangsdaten liegen in einer Datei, die nur du lesen kannst.

  • Browser login

    Sign in through the browser; the person chooses what the CLI may do.

    moreflow auth login --oauth
  • API token profile

    Save an API token as a profile (asks for it, or reads stdin).

    moreflow auth login
  • API token in the environment

    Use a token for one shell without saving it.

    MOREFLOW_API_TOKEN
  • Profile selection

    Pick a saved profile per command; moreflow auth use sets the active one.

    --profile <name>

Sind mehrere gesetzt, nutzt ein Befehl sie in dieser Reihenfolge:

  1. --profile
  2. MOREFLOW_API_TOKEN
  3. MOREFLOW_PROFILE
  4. the active profile

Umgebungsvariablen

MOREFLOW_API_TOKEN
An API token for this shell.
MOREFLOW_PROFILE
The saved profile to use.
MOREFLOW_API_BASE_URL
Selects another environment (default https://api.moreflow.io).

CLI oder MCP?

Beide führen dieselben moreflow-Operationen mit denselben Berechtigungen aus. Entscheidend ist, wo die Arbeit passiert.

CLIMCP-Server
Ideal fürSkripte, CI-Jobs, Massenexporte, Coding-Agents mit ShellChat-Assistenten wie Claude und ChatGPT
AusgabeJSON auf stdout, bereit für Pipes, Dateien und jqAntworten direkt im Chat
Große AbfragenHolt alle Seiten einer Liste in eine DateiEine Seite pro Tool-Aufruf
AnmeldungBrowser-Login oder gespeicherter API-TokenOAuth-Connector oder API-Token
FehlerStabile Exit-Codes für SkripteFehlermeldungen für den Assistenten
KI-Assistenten über MCP verbinden →

Befehlsreferenz

Erzeugt aus derselben Spezifikation wie moreflow --help. Die Referenz ist auf Englisch, genau wie die Ausgabe der CLI.

moreflow modules

List the operation modules.

Aufruf

moreflow modules

Prints { modules: [...] }: every module id. Pass one to moreflow find --module.

Beispiele

moreflow modules

moreflow find

Search operations.

Aufruf

moreflow find [query] [--module <id>] [--limit <n>]

Searches the operations this credential can see, best match first. Without a query it lists them by id. Prints { items, nextCursor }; each item has the id, name, summary, kind and effect.

Optionen

--module <id>
Only operations of this module.
--limit <n>
Page size (1 to 100).

Beispiele

moreflow find send invoice
moreflow find --module clients --limit 100

moreflow describe

Input, examples, errors and safety of one operation.

Aufruf

moreflow describe <operationId> [--related] [--full]

Prints the live contract of one operation: description, effect and whether it needs confirmation, the input JSON Schema, example inputs and declared errors with their recovery.

Optionen

--related
Adds relatedOperations and nextOperations.
--full
The complete discovery document, including the output schema.

Beispiele

moreflow describe clients.create
moreflow describe clients.create --related

moreflow call

Run an operation.

Aufruf

moreflow call <operationId> [input] [options]

Runs one operation. input is a JSON object: inline, @file, or - for stdin. Omit it for an operation without required input.

Optionen

--all
Read every page of a list. For a list operation: follow nextCursor and print every item on its own line.
--max-items <n>
With --all: stop after n items.
--idempotency-key <key>
The key of this write. The key of this write. The CLI generates one per call; pass the key a failure reported to repeat that call without running the write twice.
--confirm
Approve a write that requires confirmation. Approves a write that requires confirmation. Pass it only after the person you act for approved this exact change.
--approval-token <token>
Retry an approved agent action. The token a CONFIRMATION_REQUIRED failure returned, once that approval was granted in moreflow.

Beispiele

moreflow call clients.list '{"limit":5}'
moreflow call clients.list --all --max-items 200
moreflow call clients.create '{"firstName":"Ada","lastName":"Lovelace"}'

moreflow whoami

The account and grant the credential acts as.

Aufruf

moreflow whoami

Asks the API which account and grant the current credential acts as, and prints { profile, tokenSource, baseUrl, caller }. Run it before a write when more than one token is in play.

Beispiele

moreflow whoami

moreflow auth

Manage saved credential profiles.

Aufruf

moreflow auth login [--oauth [--no-browser]] [--profile <name>] [--base-url <url>]
moreflow auth status
moreflow auth use <profile>
moreflow auth logout [--profile <name>]

Saved credential profiles, kept in a file only you can read.

Optionen

--oauth
Sign in through the browser instead of saving an API token.
--no-browser
With --oauth: print the URL instead of opening it.

Unterbefehle

moreflow auth login --oauth
Signs in through the browser. The person signs in to moreflow, picks the account and business areas, and how much the CLI may do without asking; writes beyond that wait for their approval. The login refreshes itself. --no-browser only prints the URL (on stderr), for a machine without a browser: the redirect still returns to this machine.
moreflow auth login
Without --oauth: saves an API token. Reads it from the terminal without echoing it, or from stdin: printf %s "$TOKEN" | moreflow auth login. Every credential is checked against the API before it is saved, and its profile (default: default) becomes the active one.
moreflow auth status
Lists the profiles and the active one. Never prints a token.
moreflow auth use
Makes a saved profile the active one.
moreflow auth logout
Forgets a saved credential. A browser login is also ended on the server; revoke an API token in moreflow to end it.

A command uses, in this order: --profile, MOREFLOW_API_TOKEN, MOREFLOW_PROFILE, the active profile.

Beispiele

moreflow auth login --oauth
moreflow auth login --oauth --profile dev --base-url https://dev-api.moreflow.io
moreflow auth status
moreflow auth use dev
moreflow auth logout --profile dev

Globale Optionen

--profile <name>
The saved profile to use; overrides MOREFLOW_API_TOKEN.
--base-url <url>
Overrides MOREFLOW_API_BASE_URL and the profile's URL.
--timeout-ms <n>
Time limit per request (default 60000).
--max-retries <n>
Retries after a 429, a 5xx or a network failure (default 2).
--help
Print the overview, or one command’s reference.
--version
Print the CLI version.

Exit-Codes

Skripte können am Exit-Code verzweigen, statt Fehlertexte auszuwerten.

CodeKategorieBedeutung
0OKSuccess
1INTERNALInternal error
2USAGEWrong command line; nothing was sent
3UNAUTHENTICATEDUnauthenticated
4PERMISSION_DENIEDPermission denied (scope, plan or policy)
5NOT_FOUNDNot found
6INVALID_ARGUMENTInvalid argument
7FAILED_PRECONDITIONFailed precondition, including a required confirmation
8CONFLICTConflict
9RESOURCE_EXHAUSTEDRate or quota limit
10UNAVAILABLEUnavailable (network, timeout or server failure)

Fragen

Was ist die moreflow CLI?

@moreflow/cli ist das offizielle Kommandozeilen-Tool von moreflow. Es ruft die moreflow-Operations-API aus der Shell auf: dieselben Operationen, die ein KI-Assistent über MCP nutzt, mit JSON rein und JSON raus.

Brauche ich die CLI, wenn ich schon den MCP-Server nutze?

Nicht zum Chatten. Für Claude, ChatGPT und andere Chat-Assistenten passt der MCP-Server besser. Die CLI ist für Arbeit, die ein Chat schlecht kann: Tausende Datensätze in eine Datei exportieren, geplante Skripte, CI-Jobs und Coding-Agents, die ohnehin im Terminal arbeiten.

Kann ich einen Agenten die CLI sicher nutzen lassen?

Ja, in den Grenzen, die du setzt. Bei der Anmeldung wählst du die Bereiche und wie viel die CLI ohne Rückfrage ändern darf. Ein Schreibzugriff, der eine Bestätigung braucht, endet mit Exit-Code 7, bis du ihn freigibst, und jeder Schreibzugriff trägt einen Idempotenzschlüssel, sodass du einen fehlgeschlagenen Schreibzugriff wiederholen kannst, ohne ihn doppelt auszuführen.

Kostet die CLI extra?

Nein. API-, MCP- und CLI-Zugriff sind in jedem moreflow-Tarif enthalten, auch in der 14-tägigen Testphase.

Was brauche ich, um sie auszuführen?

Node.js mit npm. Starte sie mit npx oder installiere sie global mit npm und melde dich dann im Browser oder mit einem API-Token an.

Noch kein moreflow-Konto?

Teste moreflow 14 Tage kostenlos. API-, MCP- und CLI-Zugriff sind in jedem Tarif enthalten.