# ABsmartly CLI

Command-line interface for AI agents and humans to manage experiments, feature flags, and A/B tests on the ABsmartly platform.

The CLI wraps the same Platform API used by the web console, so anything you can do in the dashboard, you can automate from a terminal or a script — listing and creating experiments, starting/stopping tests, managing metrics, teams, users, webhooks, and more.

> **Project status**
>
> This project is experimental. The core architecture is settled, but the API surface may change between releases.

## Installation

```bash
bun install -g @absmartly/cli
```

Requires [Bun](https://bun.sh/) >= 1.0 (or Node.js >= 18 at runtime).

## Quick start

```bash
# Interactive setup wizard
abs setup

# Non-interactive setup
abs setup --api-key YOUR_KEY --endpoint https://your-instance.absmartly.com/v1

# Non-interactive setup with a named profile (e.g. for a read-only key)
abs setup --api-key YOUR_READONLY_KEY --endpoint https://your-instance.absmartly.com/v1 --profile readonly

# Or authenticate manually
abs auth login --api-key YOUR_API_KEY --endpoint https://your-instance.absmartly.com/v1

# Verify configuration
abs doctor

# List experiments
abs experiments list

# Get experiment details
abs experiments get 123
```

See [Authentication](https://docs.absmartly.com/docs/APIs-and-SDKs/CLI-Documentation/authentication.md) for the full login flow, [Configuration](https://docs.absmartly.com/docs/APIs-and-SDKs/CLI-Documentation/configuration.md) for global options and config file details, [Experiments & Feature Flags](https://docs.absmartly.com/docs/APIs-and-SDKs/CLI-Documentation/experiments-and-feature-flags.md) for the primary command reference, [Other Entities](https://docs.absmartly.com/docs/APIs-and-SDKs/CLI-Documentation/other-entities.md) for goals/metrics/teams/admin commands, [Experiment Templates](https://docs.absmartly.com/docs/APIs-and-SDKs/CLI-Documentation/experiment-templates.md) for the markdown round-trip format, and [Programmatic Usage](https://docs.absmartly.com/docs/APIs-and-SDKs/CLI-Documentation/programmatic-usage.md) if you want to call the CLI's core layer directly from TypeScript/JavaScript.
