Metadata-Version: 2.4
Name: engini
Version: 0.3.0
Summary: Engini SDK — agent-first ergonomic layer over the Engini Public API
Project-URL: Homepage, https://github.com/engini/engini-sdk
Requires-Python: >=3.9
Requires-Dist: engini-client<0.5.0,>=0.4.0
Requires-Dist: httpx>=0.27
Requires-Dist: pydantic>=2.6
Provides-Extra: all
Requires-Dist: tomli-w>=1.0; extra == 'all'
Requires-Dist: tomli>=2.0; (python_version < '3.11') and extra == 'all'
Requires-Dist: typer<1.0,>=0.12; extra == 'all'
Provides-Extra: cli
Requires-Dist: tomli-w>=1.0; extra == 'cli'
Requires-Dist: tomli>=2.0; (python_version < '3.11') and extra == 'cli'
Requires-Dist: typer<1.0,>=0.12; extra == 'cli'
Description-Content-Type: text/markdown

# engini

Agent-first Python SDK for the [Engini](https://engini.io) Public API.

> **Pre-release.** The public surface is defined; behavior ships in upcoming
> alphas. Install with `pip install --pre engini`.

```python
from engini import Engini

client = Engini(token="...")                      # or ENGINI_API_TOKEN env var
tools = client.tools.get(search="create invoice", toolkits=["SAP"])
openai_tools = client.provider.wrap_tools(tools)  # plain OpenAI tool-JSON dicts
```

## Command-line interface

The package ships an `engini` command — a machine-first CLI over the same
surface, with TTY-aware output and `--json` / `--schema` on every command. Its
dependencies are an opt-in extra, so install the `cli` extra to use it:

```bash
pip install --pre 'engini[cli]'

engini --help              # auth · tools · connections · connect
engini --version
```

Authenticate by pasting a dashboard-minted Engini API key (the primary path):

```bash
engini auth login --api-key eng_…   # stored in the active profile's config
engini auth status                  # shows auth_kind: api-key, masked key
```

The key is sent in the `x-api-key` header; the company is bound to the key, so
no company token is needed. Two-token JWT auth
(`engini auth login --api-token <jwt> [--company-token <id>]`) remains as a
fallback. Set `ENGINI_API_KEY` to override per-invocation.

Profiles let you keep separate logins (e.g. one per company). The global
`--profile` flag selects which one a command uses; `default` when omitted:

```bash
engini --profile staging auth login --api-key eng_… --api-url https://staging…/api
engini auth profile list                              # show profiles + active
engini auth profile use staging                       # switch the active profile
engini auth profile rename staging stg
engini auth profile remove stg                        # prompts unless --force
engini auth profile edit                              # open config.toml in $EDITOR
```

`--api-url` points a profile at a non-default API host (staging / self-hosted);
`engini auth profile edit` opens the config file in `$VISUAL`/`$EDITOR` and
re-validates it on save. Logging in over a profile that already has credentials
prompts for confirmation (or pass `--force`); non-interactive runs must pass
`--force`.

> **Scaffold.** The command tree, output conventions, TOML config/profiles, and
> credential resolution are in place; commands that call the API are stubbed
> (they exit non-zero with a "not yet implemented" message) until an upcoming
> release.

Built on the autogenerated [`engini-client`](https://pypi.org/project/engini-client/)
REST client. Source: <https://github.com/engini/engini-sdk>.
