> ## Documentation Index
> Fetch the complete documentation index at: https://docs.buttons.sh/llms.txt
> Use this file to discover all available pages before exploring further.

# Quick start

> Initialize a project, create a button, and press it.

<Steps>
  <Step title="Install">
    ```bash theme={null}
    curl -fsSL https://raw.githubusercontent.com/autonoco/buttons/main/install.sh | sh
    ```

    Or see [installation](/installation) for Docker, Go, and other options.
  </Step>

  <Step title="Initialize a project">
    Create a project-local `.buttons/` directory so the button belongs to this workspace instead of your global `~/.buttons/` folder:

    ```bash theme={null}
    mkdir buttons-demo
    cd buttons-demo
    buttons init --agent agents-md
    ```

    `buttons init` also writes `.buttons/AGENT.md` and adds a Buttons section to `AGENTS.md` so coding agents know to discover and press existing buttons before writing one-off commands.
  </Step>

  <Step title="Create a button">
    Create an HTTP button that fetches weather data:

    ```bash theme={null}
    buttons create weather \
      --url 'https://wttr.in/{{city}}?format=j1' \
      --arg city:string:required \
      -d "Get current weather for a city"
    ```
  </Step>

  <Step title="Press it">
    ```bash theme={null}
    buttons press weather --arg city=Miami
    ```

    The button calls the API, substitutes `city` into the URL template, and prints the response.
  </Step>

  <Step title="See the result">
    ```bash theme={null}
    buttons press weather --arg city=Miami --json
    ```

    ```json theme={null}
    {
      "ok": true,
      "data": {
        "status": "ok",
        "stdout": "{\"current_condition\": [...]}",
        "button": "weather"
      }
    }
    ```

    Every command supports `--json` for structured output. Piped output auto-detects non-TTY and switches to JSON automatically.
  </Step>

  <Step title="View history">
    ```bash theme={null}
    buttons history weather
    ```

    Every press is recorded as a JSON file in the button's `pressed/` folder.
  </Step>
</Steps>

## What to try next

<Columns cols={2}>
  <Card title="Code buttons" icon="code" href="/buttons/code">
    Run inline shell, Python, or Node scripts.
  </Card>

  <Card title="Prompt buttons" icon="robot" href="/buttons/prompt">
    Attach instructions for the consuming agent.
  </Card>

  <Card title="Workflows" icon="workflow" href="/buttons/workflows">
    Chain buttons into drawers.
  </Card>

  <Card title="Arguments" icon="list-check" href="/concepts/arguments">
    Typed args with validation.
  </Card>

  <Card title="CLI reference" icon="terminal" href="/cli/buttons_create">
    Full flag reference for create.
  </Card>
</Columns>
