Skip to content

Quickstart

Install the zidane library, add credentials and run a task.

This page sets up the library. For the apps, install the terminal app or the desktop app. On first launch, each app opens a setup wizard that connects a model provider.

Terminal
curl -fsSL https://zidane.si/install | sh       # the terminal app, in ~/.local/bin
brew install tahul/tap/zidane                   # the terminal app, with Homebrew
brew install --cask tahul/tap/zidane            # the desktop app, with Homebrew

Every build for macOS and Linux is on the download page, with its checksum. Verify a download shows how to check one.

  1. 1

    Install

    The library runs on Bun and on Node 20 or later.

    Terminal
    bun add zidane
  2. 2

    Add credentials

    Pass an API key to the provider:

    TypeScript
    anthropic({ apiKey: process.env.ANTHROPIC_API_KEY })

    To sign in with a subscription, or to find a provider's environment variable, see providers.

  3. 3

    Run a task

    agent.ts
    import { createAgent } from 'zidane'
    import { basic } from 'zidane/presets'
    import { anthropic } from 'zidane/providers'
    
    const agent = createAgent({
      ...basic,
      provider: anthropic({ apiKey: process.env.ANTHROPIC_API_KEY }),
    })
    
    const stats = await agent.run({ prompt: 'create a hello world app' })
    console.log(stats.turns)

    run() resolves with the run's stats once the model stops calling tools.

Next#

Reference#