Metadata-Version: 2.1
Name: oyt
Version: 0.2.0
Summary: OwnYourTech CLI - manage your data stacks
Author: OwnYourTech
License: MIT
Home-page: https://github.com/hachej/ownyourtech
Requires-Python: >=3.10
Description-Content-Type: text/markdown

# oyt - OwnYourTech CLI

A command-line interface for the OwnYourTech platform. Authenticate, manage your data stacks, and interact with the OwnYourTech API.

## Installation

### From source (Go)

```bash
go install github.com/hachej/ownyourtech@latest
```

### Via pip / uv (Python wheel)

The CLI is also distributed as a Python wheel using [go-to-wheel](https://github.com/nicholasgasior/go-to-wheel):

```bash
# With uv
uv pip install oyt

# With pip
pip install oyt
```

### Build from source

```bash
git clone https://github.com/hachej/ownyourtech.git
cd ownyourtech
go build -o oyt .
```

Set the version at build time:

```bash
go build -ldflags "-X main.Version=1.0.0" -o oyt .
```

## Usage

### Check API health

```bash
oyt health
```

### Show version

```bash
oyt version
```

### Register a new account

```bash
oyt register
# Prompts for email and password, then auto-logs in
```

### Log in

```bash
oyt login
# Prompts for email and password, stores token locally
```

### Log out

```bash
oyt logout
```

### Show current user

```bash
oyt me
```

### Manage stacks

```bash
# List your stacks
oyt stacks list

# Create a new stack
oyt stacks create --name "my-stack"
```

## Global Flags

| Flag         | Description                   |
|--------------|-------------------------------|
| `--api-url`  | Override the API base URL      |
| `--json`     | Output results as JSON         |

## Configuration

The CLI stores its configuration at `~/.config/oyt/config.json`:

```json
{
  "api_url": "http://localhost:8000",
  "access_token": "..."
}
```

The token is saved automatically on login and removed on logout.

## License

MIT

