---
title: "From one prompt to a tracked link in seconds: Linkbreakers for AI agents"
description: "Ask Claude Code, Cursor or any AI agent to create a link with Linkbreakers: it signs up, gets an API token, creates the link and reads its analytics in under 10 seconds, with one command to start."
canonical: "https://linkbreakers.com/help/article/from-one-prompt-to-a-tracked-link-in-seconds"
last-updated: 2026-10-21
---

# From one prompt to a tracked link in seconds: Linkbreakers for AI agents

> Ask Claude Code, Cursor or any AI agent to create a link with Linkbreakers: it signs up, gets an API token, creates the link and reads its analytics in under 10 seconds, with one command to start.

:::try-ai-prompt {"prompt":"Create a tracked link to https://example.com using Linkbreakers, then show me its analytics","description":"Paste this into Claude Code or any AI agent that can run terminal commands."}:::

## Short answer

Tell an AI coding agent "create a link using Linkbreakers" and it can do the whole thing on its own, with no account set up beforehand. One command, `npx -y linkbreakers-cli signup --email you@example.com`, creates a workspace and saves its API token. The next command creates the link, and the one after reads analytics. The whole sequence takes under 10 seconds, including downloading the CLI. You then claim the workspace with a link and a 6-digit code we email you.

## Quick summary

- **One command to start:** `signup` creates a free workspace and saves an API token in the CLI config. No dashboard, no copy-pasting keys.
- **Everything the API does, from the terminal:** every API operation is a CLI command, generated from the OpenAPI document. Links, QR codes, workflows, visitors and analytics are all available.
- **Fast:** in our tests the full sequence (download the CLI, sign up, create a link, read analytics) took about 5 seconds.
- **You stay in control:** the workspace is yours once you open the emailed link and enter the code. Unclaimed, it is deleted with everything in it after 24 hours.
- **Built for agents:** output is JSON, and every error says what to do next.

## How it works

### 1. The agent signs up

```bash
npx -y linkbreakers-cli signup --email you@example.com
```

The answer is JSON the agent reads directly: the workspace id, what the token can do, and a `claim` block with the link and code we emailed you.

```json
{
  "workspace_id": "2039ba07-6f09-40e0-a0d5-9283e37a3737",
  "token": "saved",
  "scopes": ["links:write", "qrcodes:write", "workflows:write", "analytics:read", "..."],
  "claim": {
    "status": "emailed",
    "email": "you@example.com",
    "user_code": "023961",
    "required_by": "2026-10-22T20:26:23Z"
  }
}
```

### 2. The agent creates the link

```bash
npx -y linkbreakers-cli links create --destination https://example.com --name "Spring menu" --wait-for-qrcode
```

The response holds the short link (`entrypoint`) and a signed URL to the QR code image.

### 3. The agent reads analytics

```bash
npx -y linkbreakers-cli analytics-data get-top-links
npx -y linkbreakers-cli metrics get-workspace-metric
```

### 4. You claim the workspace

Open the link we emailed you and enter the 6-digit code. Set a password or continue with Google or Microsoft, and the workspace is yours, with the links the agent made. The agent does not need to do anything: the next command it runs picks up the claim, and its token gains the claimed workspace's wider permissions.

## Why it is this fast

- **No account step.** The workspace and its token are created in a single request, so the agent never stops to ask you for a key.
- **No SDK to learn.** The CLI is generated from the same OpenAPI document as the API, so every operation is a command with flags named after the request's fields. `--help` on any command shows them.
- **No install step.** `npx -y linkbreakers-cli` downloads the binary for your platform on first use. Install it with `npm install -g linkbreakers-cli` or Homebrew to drop the prefix.

## Limits and caveats

- **Claim within 24 hours.** An unclaimed workspace is deleted with its links, QR codes and analytics 24 hours after signup. The CLI reminds the agent on every command until then.
- **Free plan.** The workspace starts on the free plan, which covers a handful of links a month. Upgrade from the dashboard once it is claimed.
- **One email per sign-up.** The agent needs your email address: that is where the claim link goes. Claim emails to one address are capped at three a day.
- **Already have an account?** Skip `signup`: create a token in the dashboard under **API Tokens** and run `linkbreakers auth set-token --token <token>`.

## Frequently asked questions

### Which AI agents does this work with?

Any agent that can run terminal commands: Claude Code, Cursor, Windsurf, GitHub Copilot in agent mode, or your own. Agents that work through MCP instead can connect to the [Linkbreakers MCP server](/help/article/mcp-server-setup).

### Does the agent see my password or account?

No. The agent only gets a token for the workspace it created. You claim the workspace yourself, in your browser, with the code we email you.

### What happens if I never claim the workspace?

It is deleted, with everything in it, 24 hours after signup. Nothing is left behind.

### Can the agent create more API keys or invite people?

No. Before you claim it, the token can manage links, QR codes, workflows and page themes and read analytics. Once you claim it, it can also manage media and webhooks and read visitors, domains and members. It can never create API tokens or invite people: those stay with you in the dashboard.

## Sources

- [How to install and use the Linkbreakers CLI](/help/article/linkbreakers-cli-setup)
- [How Linkbreakers works with AI agents](/help/article/linkbreakers-for-ai-agents)
- [Linkbreakers CLI on GitHub](https://github.com/linkbreakers-com/linkbreakers-cli)

## Last reviewed

2026-10-21
