# CLI

Your data platform now has a command line an AI can drive. **kbagent** connects your whole Keboola organization, puts a firewall around what an agent may touch, and lets it audit, fix, and build across every project at once — while you keep the veto on anything destructive.

It's just as comfortable in your own hands: one tool for every project from the terminal, every command scriptable, with structured JSON output throughout.

> **Note**
>
> kbagent is a different tool from the legacy **Keboola as Code** CLI (`kbc`) documented on [developers.keboola.com/cli](https://developers.keboola.com/cli/). That tool is still supported for now; new command-line work should use kbagent.

## What you can do with it

- **Manage projects across your whole org** — connect one project, several, or an entire organization, across US/EU and AWS/Azure/GCP stacks, and operate on them together.
- **Browse and edit** configurations, components, buckets, tables, and files — the same objects as the UI, scriptable.
- **Run and monitor jobs** — trigger a component, wait for it, list failures across every project, terminate a stuck one.
- **Build and schedule flows**, create SQL workspaces to debug transformations, and manage development branches.
- **Version your project with GitOps** — pull configurations to local files, diff them, and push changes back.
- **Search everything** — find a config, table, or flow by name or content across all connected projects.
- **Trace data lineage** — cross-project, column-level lineage as mermaid, HTML, or ER diagrams, with a local interactive viewer.
- **Schedule AI agents** — cron-driven agent tasks that watch jobs, triage failures, and report — unattended ([recipe](https://help.keboola.com/cli/workflows/#schedule-an-ai-agent)).
- **Hand work to an AI agent safely** — a read-only sandbox and a permission firewall let an agent operate Keboola without risk.

## In one minute

Install it (recommended on macOS/Linux; Windows has its own path under [Get started](https://help.keboola.com/cli/getting-started/)):

```bash
curl -LsSf https://raw.githubusercontent.com/keboola/cli/main/install.sh | sh
```

Connect your projects. A browser opens, and you finish the sign-in there:

```bash
kbagent auth login --stack https://connection.keboola.com --register-projects
```

Then explore:

```bash
kbagent doctor
kbagent job list --limit 5
kbagent search "customer_id" --search-type config-based
```

A minute in, `doctor` has confirmed the connection, you've seen your last five job runs, and `search` has found every configuration that mentions `customer_id`. Without `--search-type config-based`, `search` uses Global Search, and a project that doesn't have it enabled answers with an error that points to this flag. Everything the UI does — and a lot it doesn't — is a command away, scriptable, and safe to hand to an agent.

## Why a CLI (and not just the UI)?

The UI is great for one project, one change at a time. kbagent is for the things the UI makes hard: doing the same thing across **many projects at once**, putting your configuration **under version control**, wiring Keboola into **CI/CD**, and letting an **AI agent** do the work while you keep approval of anything destructive. It talks only to your Keboola stacks and stores its connections locally. Signing in opens a browser once; after that every command runs in your terminal, and a Storage API token skips the browser entirely.

## This section

The pages read in order, from first run to deep reference:

1. **[Get started](https://help.keboola.com/cli/getting-started/)** — install (macOS / Linux / Windows), connect a project, run your first commands.
2. **[How it works](https://help.keboola.com/cli/concepts/)** — the connection model, multi-project, dev branches, GitOps sync, and the safety firewall.
3. **[How-to guides](https://help.keboola.com/cli/workflows/)** — task recipes: onboard an org, dev-branch workflow, GitOps sync, audits, CI/CD tokens, encryption.
4. **[Use with AI agents](https://help.keboola.com/cli/for-agents/)** — the kbagent plugin and its setup in each AI client, `kbagent context`, and sandboxing an agent.
5. **[Command reference](https://help.keboola.com/cli/commands/)** — every command group, global flags, JSON output, and error codes.
6. **[Web UI](https://help.keboola.com/cli/web-ui/)** — the optional local browser dashboard.

## How it relates to the other tools

| Tool | Use it for |
|------|-----------|
| **kbagent CLI** | Scripting and multi-project operations from your terminal; giving an agent safe, sandboxed control. |
| **[MCP server](https://help.keboola.com/ai/mcp-server/)** | Letting an AI client call Keboola tools directly over MCP. |
| **[AI Kit](https://help.keboola.com/ai/ai-kit/)** | Coding-assistant plugins for building Keboola components and apps. |
| **[Kai](https://help.keboola.com/kai/)** | The in-product AI assistant. |

---

**Next:** [Get started with kbagent →](https://help.keboola.com/cli/getting-started/)
