Skip to content
Akedly

Akedly CLI

The CLI lets you manage Akedly from a terminal, a script or an AI agent, using the same permissions as the dashboard.


Requirements

  • Name
    Node.js
    Description

    Version 18 or newer.

  • Name
    An Akedly account
    Description

    The CLI acts as you, so it can do only what your role allows.

  • Name
    A browser
    Description

    Signed in to the Akedly dashboard, on any device. You approve each login there.

The package is @akedly/cli and the command it installs is akedly.


Install

Install or update

npm install -g @akedly/cli

Run the same command again to update. akedly --version prints the installed version.

To uninstall, run akedly logout first (add --ksa for a KSA login) so the CLI Login ends on the server, then npm uninstall -g @akedly/cli. Saved API keys and local configuration are not removed.


Sign in

  1. Run akedly login.

    The CLI prints a short code and an approval link.

  2. Open the link and check the code.

    Open it in a browser where you are signed in to the dashboard. The code on the page must match the one in your terminal.

  3. Approve in the dashboard.

    Choose the access level and how long the login lasts, then approve. The terminal finishes signing in on its own.

Flags, lifetimes and the approval page are on Log in and manage CLI Logins.


Egypt and KSA

Akedly runs two separate deployments. The CLI talks to one of them per command.

RegionAPI baseDashboard
Egypt (default)https://api.akedly.io/api/v1https://app.akedly.io
KSAhttps://ksa.api.akedly.io/api/v1https://ksa.app.akedly.io
  • Name
    Order
    Description

    The --ksa flag, then the AKEDLY_REGION environment variable (egypt or ksa), then the region of your last login, then Egypt.

  • Name
    akedly login
    Description

    Ignores the region of your last login. It uses Egypt unless --ksa or AKEDLY_REGION selects KSA, and it remembers the region it logs in to.

  • Name
    Invalid AKEDLY_REGION
    Description

    Any value other than egypt or ksa exits with code 64 before anything is sent.

  • Name
    Credentials
    Description

    Kept per region. End a KSA login with akedly logout --ksa.


Your first commands

Check your setup

akedly whoami
akedly doctor
akedly commands
  • akedly whoami shows who you are and the CLI Login in use.
  • akedly doctor checks your login, the server, your pipelines, your balance and your WhatsApp status. It sends nothing.
  • akedly commands lists every command the CLI knows.

Next, try a recipe or look a command up in the command reference.


Output and exit codes

  • Name
    Output mode
    Description

    The --output json|human flag, then AKEDLY_OUTPUT, then the mode saved with akedly config set output json|human. With none of these, the CLI prints human text on a terminal and JSON when its output goes to a pipe or a file.

  • Name
    --json
    Description

    Exists only on akedly commands, where it returns the bare command list.

  • Name
    JSON mode
    Description

    One JSON document on stdout. Progress and warnings go to stderr.

  • Name
    Exit codes
    Description

    0 is success. Every failure has a fixed exit code, an error code and a hint.

The exit codes, the error shape and the progress events are on CLI errors and exit codes.


Using the CLI with AI agents

The CLI is built for agents as well as people: JSON output, fixed error codes, and an explicit --yes before anything that sends, spends or deletes.


The older npm package

@akedly/cli is a different package from akedly, the legacy V1 Node.js SDK. That SDK is described on the Node.js SDK page.


Command reference

The command reference is generated from the CLI itself and lists every command, with its flags, permission, consent and retry rules.