Metadata-Version: 2.3
Name: edgeai-cli
Version: 0.1.2
Summary: EdgeAI customer lifecycle CLI
Requires-Python: >=3.8
Project-URL: Homepage, https://runedge.ai
Project-URL: Source, https://github.com/RunEdgeAI/cli
Description-Content-Type: text/markdown

# EdgeAI CLI

Customer lifecycle CLI for EdgeAI. The repository is `cli`; the installed
binary is `edgeai`.

## Installation

Recommended:

```bash
pipx install edgeai-cli
edgeai login
edgeai install
```

Alternatives:

```bash
uv tool install edgeai-cli
python3 -m pip install --user edgeai-cli
```

While this repo is private, GitHub Release binaries are available to repo users.
PyPI is the public customer distribution path.

### TestPyPI installs

After publishing a test release to TestPyPI, install the exact test version with
one of these commands:

```bash
uv tool install --default-index https://test.pypi.org/simple/ edgeai-cli==0.1.0
```

```bash
pipx install --pip-args="--index-url https://test.pypi.org/simple/" edgeai-cli==0.1.0
```

```bash
python3 -m pip install --index-url https://test.pypi.org/simple/ edgeai-cli==0.1.0
```

For a throwaway virtual environment with `uv`:

```bash
uv venv /tmp/edgeai-test
source /tmp/edgeai-test/bin/activate
uv pip install --default-index https://test.pypi.org/simple/ edgeai-cli==0.1.0
edgeai --help
```

## Commands

```bash
edgeai login
edgeai login --api-key <key>
edgeai login --no-browser
edgeai whoami
edgeai device register --name shop-floor
edgeai install
edgeai install tts stt agents-sdk hannah
edgeai update
edgeai update tts
edgeai status
edgeai doctor
```

`edgeai install` with no product arguments installs every product the API key can
access on the current platform. Explicit product arguments narrow the install or
update to `tts`, `stt`, `agents-sdk`, and/or `hannah`.

Local state defaults to `~/.edgeai` and can be overridden with `EDGEAI_DIR`.
The API base URL defaults to `https://runedge.ai/api` and can be overridden with
`EDGEAI_API_BASE_URL`.

Installed product state is stored in `~/.edgeai/products.json`. Product tarballs
and models are downloaded into `~/.edgeai/downloads`, extracted under
`~/.edgeai/<product>`, and launchers are generated in `~/.edgeai/bin`.

## Shell completion

Completion scripts are generated on demand and are intentionally opt-in:

```bash
edgeai completion zsh
edgeai completion bash
edgeai completion fish
```

Install the generated script using your shell's preferred completion location.
The CLI does not edit shell profiles automatically.

## Development

```bash
go mod tidy
go test ./...
go run ./cmd/edgeai --help
```

## Releases

Release outputs are built by `.github/workflows/release.yml`:

- Native archives for `darwin-arm64`, `linux-amd64`, and `linux-arm64`
- `checksums.txt`
- PyPI wheels for the `edgeai-cli` package, installing the `edgeai` command

Build artifacts without publishing:

```bash
gh workflow run release.yml \
  --ref main \
  -f version=0.1.0 \
  -f publish_target=none
```

Publish a test release to TestPyPI:

```bash
gh workflow run release.yml \
  --ref main \
  -f version=0.1.0 \
  -f publish_target=testpypi
```

Then verify the TestPyPI package:

```bash
uv tool install --default-index https://test.pypi.org/simple/ edgeai-cli==0.1.0
edgeai --help
```

Then tag and push the release:

```bash
git tag v0.1.0
git push origin v0.1.0
```

PyPI Trusted Publishing must be configured for the `edgeai-cli` project with:

- Repository: `RunEdgeAI/cli`
- Workflow: `release.yml`
- Environment: `pypi`

Configure TestPyPI the same way with environment `testpypi`.
