FenixAlliance.ABS.CLI 2.8.2

Requires NuGet 2.8 or higher.

dotnet tool install --global FenixAlliance.ABS.CLI --version 2.8.2
                    
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest
                    
if you are setting up this repo
dotnet tool install --local FenixAlliance.ABS.CLI --version 2.8.2
                    
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=FenixAlliance.ABS.CLI&version=2.8.2
                    
nuke :add-package FenixAlliance.ABS.CLI --version 2.8.2
                    

absuite: the ABS command-line client

Work with an Alliance Business Suite (ABS) server from your terminal: sign in, choose the workspace (tenant) you act in, read, create, change and delete records, and script all of it.

Install

dotnet tool install -g FenixAlliance.ABS.CLI

It needs the .NET 10 runtime. The command is absuite.

Sign in

absuite login

absuite login signs you in through your browser with a one-time code (--device, the default). Your session is kept in your operating system's protected store (Windows DPAPI, the macOS Keychain or libsecret on Linux), never in a plain file. Where no protected store is available, absuite says so, keeps the session in memory only for that one command, and exits with code 4.

The code is shown on standard error, the address and the code on separate lines, so absuite login works on a computer with no browser (a server, a container, a CI job): open the address on any device and enter the code. absuite never opens a browser itself. --timeout <seconds> stops waiting sooner (the code's own expiry still applies). With -o json, standard error also carries one JSON line ("event":"device_code") with the address and the code, for an agent to pass on to a person. If the sign-in page is on another host than the server, absuite says so on its own line; it refuses a sign-in page that does not use https.

You have one session per profile and server: signing in to a second server keeps the first one. absuite logout revokes the session for this profile and server and removes it from this computer. absuite logout --all signs out of every profile and server on this computer and lists each one; a session the server could not revoke is still removed here, but stays valid at that server until it expires.

Profiles and workspaces

A profile is a named set of settings (server, workspace, output). Pick one with --profile <name> or ABS_PROFILE; absuite config profiles lists them and absuite config use <name> makes one current. A name that does not exist is an error that lists the profiles you have; absuite config set --profile <name> url <url> creates one. Profile names are 1 to 64 letters, digits, ., _ or -.

absuite account show shows the profile, the server, who you are and the workspace. absuite account list lists your workspaces and absuite account set --tenant <id or name> picks one; absuite checks it is one of yours on this server first, and remembers which server it belongs to, so it is never sent to another one. --tenant and ABS_TENANT take a workspace ID. The server still decides, on every request, what you may do there.

Settings live in ~/.abs/config.json (no secrets; private to you on Linux and macOS). Sessions live only in your operating system's protected store.

Server

By default absuite talks to https://absuite.net. To use another ABS server, pass --url https://your-abs-server, set the ABS_URL environment variable, or save it in your profile with absuite config set url https://your-abs-server. The flag wins over the environment variable, which wins over the profile, which wins over the default. A session only ever works with the server that issued it: if you signed in to another server, every command, absuite logout included, says you are not signed in to this one and sends nothing; pass --url with the server you signed in to.

Commands

Command What it does
absuite login [--timeout S] Sign in to the ABS server (device code by default).
absuite logout [--all] Sign out of this profile and server, or of everything on this computer.
absuite me Show who you are signed in as.
absuite account show The profile, server, user and workspace you act as.
absuite account list List the workspaces (tenants) you can use.
absuite account use <id or name>, or account set --tenant <id or name> Act in this workspace from now on (checked with the server first).
absuite account clear Forget the saved workspace.
absuite tenants list, use <id or name> Same as account list and account set.
absuite config get/set/unset/list Your CLI settings (no secrets are stored here).
absuite config profiles, use <name>, delete <name> List, choose and remove profiles.
absuite commands List every command, with its options and whether it only reads (-o json for scripts and agents).
absuite crm contacts list [--kind K] [--top N] [--skip N] List the workspace's CRM contacts; K is organization (the CRM accounts) or individual.
absuite crm contacts get <id> Show one contact.
absuite invoicing invoices list [--top N] [--skip N] List the workspace's invoices.
absuite invoicing invoices get <id> Show one invoice.
absuite subscriptions list, get <id> The workspace's customer subscriptions (billing).
absuite accounting accounts list, get <id> The workspace's chart of accounts.
absuite catalog items list, get <id> The workspace's catalog items.

Beyond the commands above, absuite reads every other workspace resource the ABS API exposes, named after the API's own routes:

Command What it does
absuite <service> <resource> list [--top N] [--skip N] [--columns a,b] List records, e.g. absuite hrms employees list.
absuite <service> <resource> get <id> Show one record, e.g. absuite learning courses get <id>.
absuite <service> <resource> count Count records, e.g. absuite crm contacts count.
absuite <service> <resource> <child> list --<parent>-id <id> A nested list, e.g. absuite crm contacts profiles list --contact-id <id>.

These generic commands show a record's plain fields only (text, numbers, dates, ids), never nested objects, and never a field named like a password, token, key or secret. Sign-in, licensing, security, system, settings and similar surfaces are left out on purpose. Run absuite <service> --help to see what a service offers.

Creating, changing and deleting records

Command What it does
absuite <service> <resource> create [--json '{...}' \| --file f.json] [--<field> value ...] Create a record, e.g. absuite crm contacts create --first-name Ada --email ada@example.com.
absuite <service> <resource> update <id> [--json ... \| --file ...] [--<field> value ...] Read the record, apply your changes, and save it.
absuite <service> <resource> delete <id> [--yes] Delete a record. Asks first unless --yes.
add --dry-run to any of them Print the request (method, address and body) and send nothing.

Field flags exist for plain fields (text, numbers, dates, yes/no, named values, ids); anything else goes in --json or --file, and flags win over the JSON. Every field you pass is checked before anything is sent: an unknown field is an error, not ignored. A record's type discriminator, its id, its workspace, owner and audit fields (who created or changed it, and when), and any field named like a password, token, key or secret can never be set here; --help on each command lists them. Payments, wallets, payouts, users, roles and permissions, OAuth applications, licensing and subscriptions, and actions such as approve, send, publish or refund are left to the web app. Writes never follow a redirect. Writes go through the same API checks as the web app, so you can only change what your role allows. Where nothing can be asked (--no-input, CI, ABS_NO_TUI or input that is not a terminal), delete needs --yes and otherwise fails with exit code 2, deleting nothing.

Service commands always read absuite <service> <resource> <verb>, where the service is the API's own api/v2/<X>Service name. Every command accepts --profile, --url, --tenant, --output/-o, --query, --only-show-errors, --verbose and --debug (see Output below). Service commands act in the workspace chosen with absuite account use, --tenant or ABS_TENANT. Run absuite --help or absuite <command> --help for details.

Scripts and agents

absuite never waits for an answer nobody can give. It asks a question only when standard input is a terminal, --no-input is not set, and neither CI nor ABS_NO_TUI is set (to anything but 0 or false). Otherwise anything that would need input fails at once with exit code 2, and the message names the flag to pass.

  • absuite commands -o json lists the whole command tree: each command's path, arguments, options, and whether it only reads, plus the options every command accepts. Use it to discover commands instead of reading --help.
  • -o json prints exactly one JSON document on standard output. Errors and hints go to standard error.
  • Set ABS_OUTPUT=json (or absuite config set output json) once instead of passing -o json to every command.
  • To sign in from a script on a real server, use absuite login (the device flow: a person approves the code once in a browser), or an OAuth client with its own credentials.
  • ABS_TOKEN=<token> signs a command in without storing anything, but only together with --url or ABS_URL in the same command, so the token goes only to the server you name there. Over http:// it is sent only to localhost, 127.0.0.1 or [::1].
  • absuite login --password-stdin --email <email> reads the password from standard input (one line, never echoed). It works only against a server on this computer (exactly localhost, 127.0.0.1 or [::1], judged by the address as written, never by a DNS lookup). For any other server it fails with exit code 2 before reading anything. Never put a password on the command line, in an environment variable, or in the server address (user:password@host is refused).

Output

Like the Azure CLI, every command takes these options:

Option What it does
-o, --output table (the default; human also works), json, jsonc, tsv, yaml or none. Also ABS_OUTPUT or absuite config set output.
--query <JMESPath> Reshapes the result before it is printed, e.g. --query "[].name" or --query "{id: id, total: total}". A bad expression exits 2 before anything is sent.
--only-show-errors Standard error shows errors only: no warnings or notices.
--verbose Standard error also says which profile, server, workspace and format the command runs with.
--debug Also one standard-error line per HTTP call: method, address without its query string, status and time. Never headers, tokens, cookies or bodies.
  • table is for people. json is one indented JSON document. jsonc is the same document in colour when standard output is a terminal (and NO_COLOR is not set); otherwise it is exactly json. tsv has no header row: one line per record, values separated by tabs, plain values only (nested objects and lists are left out; a tab or line break inside a value becomes a space). Its columns come in the order the record's fields print in -o json, and that order is stable. To name your columns in a script, pick them with --query, e.g. absuite crm contacts list --query "[].[id,name]" -o tsv prints the id, a tab and the name on each line. yaml is the JSON document as YAML. none prints nothing on standard output; errors still go to standard error, and the exit code still tells what happened.
  • In json, jsonc and yaml, every control character in a value (escape sequences and right-to-left overrides included) is written as a JSON Unicode escape, so the output stays valid and can never drive your terminal. Ordinary accented and non-Latin text is written as is. table and tsv replace such characters with ?.
  • The default is table whether or not standard output is a terminal, so what you see is what a pipe gets. Scripts and agents choose -o json (or ABS_OUTPUT=json).
  • --query works on the document -o json prints for the command, which never holds a field the CLI hides (passwords, tokens, keys, secrets, nested objects of a generic record). A query cannot bring such a field back.

Exit codes (scripts depend on them, so a number never changes meaning; new codes are added at the end):

Code Meaning
0 Done.
1 The API refused or failed the request for a reason no code below describes (for example a validation error, a conflict, or a feature that is not switched on for the workspace).
2 A bad flag, argument, --query expression or setting, or input was needed and none could be asked for.
3 Not signed in, or the session expired and could not be refreshed.
4 No protected credential store on this computer, so the session could not be kept.
5 Not found: the record does not exist in this workspace.
6 Forbidden: you are signed in but not allowed to do this.
7 The server failed (an HTTP 5xx answer).
8 The server could not be reached, or did not answer in time.

Earlier versions reported codes 5 to 8 as 1. A script that tested for exactly 1 on a missing record, a refusal, a server failure or an unreachable server should test for the new code, or for any code other than 0.

Interactive mode

absuite interactive

Runs absuite commands one after another in one session. Type a command without the leading absuite, e.g. crm contacts list. Every line runs exactly like the same command typed in your shell: same output, same sign-in, same exit codes.

  • Tab completes commands, options, values and, when you are signed in and have a workspace, record ids (shown as name and id). A second Tab shows the list.
  • Up and Down walk the session's history. History is kept in memory only, never in a file. A line that starts with a space is not kept, and neither is a line with --password-stdin, --json, --file or a flag named like a password, secret, key or token.
  • A line ending in ? lists what can come next, with a one-line help. F1 shows the full help for the line; so does help <command>.
  • help lists the keys. exit, quit or Ctrl+D leave. Ctrl+C clears the line, or stops the running command.
  • Global options given to absuite interactive (--profile, --url, --tenant, -o) apply to every line that does not set them itself. --yes cannot be given to absuite interactive: each change you type asks for its own confirmation.

It needs a terminal. It does not start when CI or ABS_NO_TUI is set, with --no-input, with redirected input or output, or with -o set to a machine format such as json (exit code 2). Inside the session only an explicit -o counts: ABS_OUTPUT and the profile's output setting do not apply, so a line shows a table unless it, or absuite interactive itself, says -o.

Plain mode, for screen readers and simple terminals: absuite interactive --plain, or set ABS_TUI_PLAIN=1 (1, true or yes; 0, false or no turns it off). It uses your terminal's own line editing, never redraws in place, and uses no colors. It also starts on TERM=dumb and on terminals narrower than 30 columns. NO_COLOR turns colors off in both modes.

Shell completion

absuite completion pwsh >> $PROFILE          # PowerShell
source <(absuite completion bash)            # bash, in ~/.bashrc
source <(absuite completion zsh)             # zsh, in ~/.zshrc after compinit

The script asks absuite for suggestions as you type. It completes commands, options and values without contacting the server. To also complete record ids from the server, set ABS_COMPLETE_IDS=1: ids are then read only when you are signed in to that server and have a workspace, with a one-second limit. Workspaces are never completed from a shell.

Registering absuite on a server

absuite login signs in through the OAuth client abs-cli. The client keeps that id although the command is absuite: it is a registered server identity, and renaming it would mean registering it again on every server. Each ABS server needs it registered once, by an administrator of the server's root workspace. Until then absuite login says the server does not accept sign-in from the ABS CLI yet. The registration must match this set exactly; a client that differs in any field is refused:

Field Value
Client ID abs-cli
Display name ABS CLI
Client type public: no secret and no key set
Consent explicit
Permissions ept:device_authorization, ept:token, ept:revocation, gt:urn:ietf:params:oauth:grant-type:device_code, gt:refresh_token, scp:abs_api (exactly these)
Requirements none entered (the server adds PKCE to every public client)
Redirect URIs, token lifetimes, properties none

Register it with POST /api/v2/SecurityService/OAuthApplications?tenantId=<root workspace id> as a root administrator, with a body holding those values (clientSecret null), then sign in with absuite login and check absuite me.

Adding a service

Each ABS service has one folder under Commands/<Service>/ with one IServiceCommands class, and one line in Commands/ServiceCommandRegistry.cs (the SDK Engineer owns the registry and adds the line). Every service command must:

  • build its client with ctx.CreateClient(api => new XServiceClient(api)) and call it inside ctx.WithSessionAsync(...), so the session rules (the issuing server only, one refresh on a 401) hold;
  • print an explicit view record, never a DTO, in both formats;
  • check ids and paging (ParseId, PagingOptions) before sending anything;
  • take no secret as a flag or argument;
  • have tests in FenixAlliance.ABS.CLI.Tests/Commands/ against the stub server, including a request that is refused before it is sent.

Breaking changes in 2.8.1

  • ABS_TOKEN is now used only when the same command names the server with --url or ABS_URL. A script that sets ABS_TOKEN and relies on a profile's url or the default server now stops with exit code 2 and the line "ABS_TOKEN is set but ignored: it is used only with --url or ABS_URL."
  • A --profile or ABS_PROFILE that names a profile you do not have is now an error (exit 2) instead of running with defaults.
  • A workspace from --tenant, ABS_TENANT or the profile must be a workspace ID (a GUID); anything else is exit 2. absuite config set tenant now checks the workspace with the server, so it needs a sign-in.

Licence

Apache-2.0. The licence grants no rights to the Alliance Business Suite or Fenix Alliance names or logos.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

Version Downloads Last Updated
2.8.2 85 11/21/2026
2.8.1 104 11/10/2026
2.8.0 107 11/6/2026