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

# Installation

> How to install and configure Ziva in your Go project

# Installing Ziva

## Requirements

* **Go 1.23.0+** (toolchain 1.24.5 recommended)
* Terminal with UTF-8 support for proper pseudographics display
* Terminal color support (optional)

## Installation

### Via go get

```bash theme={null}
go get github.com/qzeleza/ziva
```

### Via go mod

Add to your `go.mod`:

```go theme={null}
require github.com/qzeleza/ziva latest
```

Then run:

```bash theme={null}
go mod tidy
```

## Installation Verification

Create a simple `main.go` file for verification:

```go theme={null}
package main

import (
    "fmt"
    "log"
    "github.com/qzeleza/ziva"
)

func main() {
    // Create a simple task
    task := ziva.NewYesNoTask("Test", "Is Ziva installed correctly?")

    // Create queue and add task
    queue := ziva.NewQueue("Ziva Installation Check")
    queue.AddTasks(task)

    // Run
    if err := queue.Run(); err != nil {
        log.Fatal(err)
    }

    // Check result
    if task.IsYes() {
        fmt.Println("✅ Great! Ziva is ready to work.")
    } else {
        fmt.Println("❌ Installation needs to be checked.")
    }
}
```

Run it:

```bash theme={null}
go run main.go
```

## Environment Setup

### Locale Configuration (for non-English languages)

For correct display of non-English text, configure locales:

**Ubuntu/Debian:**

```bash theme={null}
sudo locale-gen en_US.UTF-8 ru_RU.UTF-8
sudo update-locale LANG=en_US.UTF-8
export LANG=en_US.UTF-8
export LC_ALL=en_US.UTF-8
```

**Entware/BusyBox:**

```bash theme={null}
opkg install locale-full glibc-binary-locales
export LANG=en_US.UTF-8
```

### Font Configuration

For embedded systems, font configuration may be required:

```bash theme={null}
setterm -reset
setterm -store
setterm -font ter-116n  # for international characters
```

### Environment Variables

Ziva supports configuration via environment variables:

```bash theme={null}
# Interface language
export ZIVA_LANG=en
export ZIVA_DEFAULT_LANG=en

# For embedded systems
export ZIVA_MEMORY_PRESSURE_THRESHOLD=50M
export ZIVA_MAX_COMPLETED_TASKS=10

# Terminal colors
export COLORTERM=truecolor
export TERM=xterm-256color
```

## Project Structure

Recommended Go project structure with Ziva:

```
myapp/
├── go.mod
├── go.sum
├── main.go
├── cmd/
│   └── myapp/
│       └── main.go
├── internal/
│   ├── tasks/
│   ├── config/
│   └── ui/
└── pkg/
    └── validation/
```

## Dependencies

Ziva uses the following main dependencies:

* **Bubble Tea** - foundation for TUI
* **Lip Gloss** - styling and colors
* **Cobra** - CLI (optional)

All dependencies are installed automatically with `go get`.

<Card title="Next Step" icon="arrow-right" href="/en/quick-start">
  Create your first TUI application
</Card>
