Akedly CLI
The CLI lets you manage Akedly from a terminal, a script or an AI agent, using the same permissions as the dashboard.
Running the CLI from an AI agent?
Start with Use the CLI with AI agents: the rules an agent follows, and which access level to give it. The CLI is how an agent manages your Akedly account.
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
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
Run akedly login.
The CLI prints a short code and an approval link.
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.
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.
| Region | API base | Dashboard |
|---|---|---|
| Egypt (default) | https://api.akedly.io/api/v1 | https://app.akedly.io |
| KSA | https://ksa.api.akedly.io/api/v1 | https://ksa.app.akedly.io |
- Name
- Order
- Description
The
--ksaflag, then theAKEDLY_REGIONenvironment variable (egyptorksa), then the region of your last login, then Egypt.
- Name
- akedly login
- Description
Ignores the region of your last login. It uses Egypt unless
--ksaorAKEDLY_REGIONselects KSA, and it remembers the region it logs in to.
- Name
- Invalid AKEDLY_REGION
- Description
Any value other than
egyptorksaexits with code 64 before anything is sent.
- Name
- Credentials
- Description
Kept per region. End a KSA login with
akedly logout --ksa.
Your first commands
akedly whoami
akedly doctor
akedly commands
akedly whoamishows who you are and the CLI Login in use.akedly doctorchecks your login, the server, your pipelines, your balance and your WhatsApp status. It sends nothing.akedly commandslists 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|humanflag, thenAKEDLY_OUTPUT, then the mode saved withakedly 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
0is success. Every failure has a fixed exit code, an errorcodeand ahint.
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.
Use the CLI with AI agents
—the agent guide, the rules an agent should follow, and which access level to give it
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.
Command reference
—every command, grouped by subject
