Metadata-Version: 2.4
Name: control-anything
Version: 0.1.0
Summary: Control-Anything — analyze anything, control anything via LLM. SSMCE agent tool generator: one function, multi-channel emission (API/CLI/MCP/REST/UI/OpenCLI) + plugin discovery + parallel serve. Formerly api-anything / invoco.
Project-URL: Homepage, https://github.com/aiking931931/control-anything
Project-URL: Repository, https://github.com/aiking931931/control-anything
Project-URL: Issues, https://github.com/aiking931931/control-anything/issues
Project-URL: Changelog, https://github.com/aiking931931/control-anything/blob/main/CHANGELOG.md
Author-email: AI King <aiking931931@gmail.com>
License-Expression: Apache-2.0
License-File: LICENSE
Keywords: agent,automation,cli,code-generation,mcp,opencli,rest,ssmce,tool,ui
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Software Development :: Code Generators
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.10
Provides-Extra: all
Requires-Dist: fastapi>=0.110; extra == 'all'
Requires-Dist: fastmcp>=0.2; extra == 'all'
Requires-Dist: gradio>=5.0; extra == 'all'
Requires-Dist: typer>=0.12; extra == 'all'
Requires-Dist: uvicorn>=0.30; extra == 'all'
Provides-Extra: cli
Requires-Dist: typer>=0.12; extra == 'cli'
Provides-Extra: mcp
Requires-Dist: fastmcp>=0.2; extra == 'mcp'
Provides-Extra: rest
Requires-Dist: fastapi>=0.110; extra == 'rest'
Requires-Dist: uvicorn>=0.30; extra == 'rest'
Provides-Extra: test
Requires-Dist: pytest>=8.0; extra == 'test'
Provides-Extra: ui
Requires-Dist: gradio>=5.0; extra == 'ui'
Description-Content-Type: text/markdown

# Control-Anything

**Analyze anything, control anything — strongest unofficial way to hand any
software surface to an LLM.** Define once, ship as Python API / CLI / MCP
server / REST / Web UI / OpenCLI spec — pick which channels to enable per
deployment.

> Rename history: `api-anything 0.1.0-0.3.2` → `invoco 0.1.0-0.3.1` →
> **`control-anything 0.1.0+`** (this series, 2026-04-20). Semantic intent:
> reflect the real product — controlling anything via LLM, not just "call"
> (invoco) or "REST API" (api-anything). See `CHANGELOG.md` full rename note.

![Python](https://img.shields.io/badge/python-3.10%2B-blue)
![License](https://img.shields.io/badge/license-Apache%202.0-blue)
![Status](https://img.shields.io/badge/status-0.1.0%20rename-yellow)

---

## The idea: SSMCE

**S**ingle **S**ource, **M**ulti-**C**hannel **E**mission. You write the
function once; `control-anything` is the upstream orchestrator that hands it to
Typer, FastAPI, FastMCP, Gradio, and OpenCLI spec emitters so every consumer
(humans, agents, remote systems, beginners) gets the shape they need.

```python
from control_anything import expose

@expose(channels=["api", "cli", "mcp", "ui"])
def blender_add_cube(x: float = 0, y: float = 0, z: float = 0) -> str:
    """Add a cube to the scene."""
    import bpy  # Blender official Python API (Tier 1 upstream)
    bpy.ops.mesh.primitive_cube_add(location=(x, y, z))
    return f"cube@({x},{y},{z})"
```

The same function becomes:

| Channel | Surface | Consumer |
| --- | --- | --- |
| `api` | `from control_anything_blender import add_cube` | engineers |
| `cli` | `control-anything-blender add-cube 1 2 3` | shell / agents / interactive humans |
| `mcp` | FastMCP server over stdio | Claude Code / Cursor / any MCP client |
| `rest` | `POST /blender/add_cube` | remote agents / web backends |
| `ui` | `localhost:7860` auto-form | beginners, visual exploration |
| `opencli` | OpenCLI spec JSON + AGENT.md | ecosystem discovery |

0.1.0 (first release under the new name) ships the full SSMCE surface:
`expose()` decorator, registry, `ChannelArtifact` + `build_channel()` +
`emit()`, and `control-anything serve --channels a,b,c` parallel serve — all
preserved feature-complete from the previous `invoco 0.3.1`.

---

## Install

```bash
pip install control-anything
```

No mandatory dependencies. Add channel support as needed:

```bash
pip install 'control-anything[cli]'     # Typer
pip install 'control-anything[mcp]'     # FastMCP
pip install 'control-anything[rest]'    # FastAPI + Uvicorn
pip install 'control-anything[ui]'      # Gradio
pip install 'control-anything[all]'     # everything
```

---

## 0.1.0 quick tour

```bash
invoco --version
invoco info --json
invoco list       # lists exposed functions in the current interpreter
```

```python
from invoco import expose, registry

@expose
def greet(name: str) -> str:
    """Say hi."""
    return f"hello {name}"

print(registry()["greet"].channels)  # ['api', 'cli'] — default channels
```

---

## Positioning

- **Upstream ecosystems we stand on**, not compete with: CLI-Anything (HKUDS), OpenCLI spec, Python bindings (`bpy`, `cv2`, `qgis`), vendor SDKs (`anthropic`, `openai`, `boto3`).
- **Our layer**: tier detection + routing + multi-channel emit. Invoco decides *how* a function reaches every audience, not whether the audience exists.
- **Two audiences, one source**: power users `import` / agents call MCP or CLI / beginners open the auto-generated UI. Nobody writes the function twice.

---

## Roadmap

- **0.1.0** — `expose()` decorator + registry + CLI skeleton. ✅ shipped.
- **0.2** — channel emitters: Typer CLI, FastMCP, FastAPI, Gradio UI.
- **0.3** — OpenCLI spec emit + AGENT.md generation + tier-detection port from upstream api-anything lineage.
- **0.4** — CLI-Anything bridge (wrap HKUDS generated CLIs as typed Python APIs).
- **0.5+** — UIA generator for closed-source Windows apps (Tier 3A exclusive).

## History

Invoco 0.1.0 supersedes the `api-anything` preview line (last published 0.3.1, will be deprecated once the channel emitters ship). Core tier-detection and UIA code from api-anything will be rewired under Invoco's SSMCE model in 0.3+.

## License

Apache-2.0.
