Metadata-Version: 2.4
Name: nagent-cli
Version: 0.4.4
Summary: Command-line client for hosted Nagent deployments
Requires-Python: >=3.11
Requires-Dist: click>=8.1
Requires-Dist: httpx>=0.27
Requires-Dist: pydantic>=2.7
Requires-Dist: pyyaml>=6.0
Requires-Dist: rich>=13.7
Requires-Dist: typer>=0.12
Description-Content-Type: text/markdown

# Nagent CLI

`nagent` is the command-line client for hosted Nagent deployments.

## Install

```bash
uv tool install nagent-cli
nagent --help
```

If uv has stale package metadata immediately after a release, refresh the package cache:

```bash
uv tool install --force --refresh-package nagent-cli nagent-cli
```

To install a specific version:

```bash
uv tool install 'nagent-cli==0.2.0'
```

## Log in

Use the API base URL and management key provided by your workspace administrator:

```bash
nagent login --api-base-url https://<api-hostname> --api-key '<management-api-key>'
```

If `--api-key` is omitted, `nagent` prompts for it without echoing the value.

## Common commands

```bash
nagent models list
nagent tools list
nagent secrets list
nagent deploy ./agent --deployment prod
nagent run prod 'Hello'
```

Agent bundles contain:

- `AGENTS.md` — agent instructions
- `agent.yaml` — public model/tool manifest

Validate a bundle locally before deploying:

```bash
nagent inspect-bundle ./agent
```

## Machine-readable output

Use deterministic plain text for agents and scripts:

```bash
nagent deployments list --agent
```

Use JSON for structured automation:

```bash
nagent deployments list --json
```

## Export deployed source

Fetch the current deployed bundle for inspection or local editing:

```bash
nagent deployments get-bundle prod --out ./prod-bundle
```

This writes `AGENTS.md`, `agent.yaml`, and `deployment-bundle.json` with logical secret binding names only. Existing files are not overwritten unless `--force` is supplied.

`AGENT_SESSION=1` selects agent mode by default unless `--json` is supplied.

## Upgrade

```bash
uv tool upgrade nagent-cli
```
