Metadata-Version: 2.4
Name: socaity-cli
Version: 0.1.1
Summary: Socaity platform CLI: login, catalog browsing, SDK installs and APIPod deployment commands.
Author: SocAIty
License: MIT
Project-URL: Repository, https://github.com/SocAIty/socaity-cli
Project-URL: Homepage, https://www.socaity.ai
Requires-Python: >=3.8
Description-Content-Type: text/markdown
Requires-Dist: httpx
Requires-Dist: socaity-schemas>=0.0.1
Provides-Extra: dev
Requires-Dist: pytest; extra == "dev"
Requires-Dist: ruff; extra == "dev"
Requires-Dist: mypy; extra == "dev"

# socaity-cli

The command line for the [socaity.ai](https://www.socaity.ai) platform: login, catalog browsing,
SDK installs, and APIPod deployment tooling. One `socaity` command, shared by the
[socaity SDK](https://github.com/SocAIty/socaity) and [APIPod](https://github.com/SocAIty/apipod).

The package is deliberately small: `httpx` and `socaity-schemas` are the only dependencies.
Commands that need more (stub generation, container builds) delegate to the `socaity` or
`apipod` package and tell you what to install when it is missing.

## Install

```bash
pip install socaity-cli
```

You get `socaity-cli` as part of `pip install socaity` or `pip install apipod` as well.

## Commands

| Command | Needs | What it does |
|---------|-------|--------------|
| `socaity login` / `logout` / `whoami` | - | Browser login, credentials in `~/.config/socaity/` |
| `socaity list services\|models` | - | Browse the AI catalog |
| `socaity search "flux schnel"` | - | Typo-tolerant search (`--collections services,models,jobs`) |
| `socaity jobs [job_id]` | login | List/search jobs; `--q`, `--expand data,files,billing,social`, `--visibility` |
| `socaity projects [project_id]` | login | Your projects; `--expand jobs` embeds member jobs |
| `socaity install <service>` | `socaity` | Generate an SDK stub for a service |
| `socaity update` | `socaity` | Sync installed services with the platform |
| `socaity scan` | `apipod` | Scan a project and generate `apipod.json` |
| `socaity build [file]` | `apipod` | Build the deployment container |
| `socaity start [entrypoint]` | `apipod` | Run an APIPod service locally |
| `socaity deploy [target]` | `apipod` | Deploy to Socaity (wraps `apipod deploy`) |

Use `-C DIR` with scan/build/start/deploy to point at a service project directory
(e.g. `socaity -C simple_test_service deploy serverless-runpod --yes`).

## Configuration

| Env var | Default | Purpose |
|---------|---------|---------|
| `SOCAITY_API_KEY` | from login | API key (wins over stored credentials) |
| `SOCAITY_BACKEND_URL` | `https://webapi.socaity.ai` | Platform API |
| `SOCAITY_FRONTEND_URL` | `https://socaity.ai` | Web UI for browser login |

## Using it as a library

`socaity` and `apipod` build on the same primitives this package exposes:

```python
from socaity_cli import SocaityBackendClient, get_api_key, requires
```

`SocaityBackendClient` covers catalog reads, search, and SDK install/update calls.
`requires("apipod")` guards a function behind an optional package with a friendly
install hint instead of an ImportError traceback.
