Metadata-Version: 2.4
Name: cmdbox
Version: 0.8.3.2
Summary: cmdbox: It is a command line application with a plugin mechanism.
Author-email: hamacom2004jp <hamacom2004jp@gmail.com>
License: MIT
Project-URL: Homepage, https://github.com/hamacom2004jp/cmdbox
Project-URL: Documentation, https://hamacom2004jp.github.io/cmdbox/index.html
Project-URL: Repository, https://github.com/hamacom2004jp/cmdbox
Keywords: audit,a2a,agent,cli,cmdbox,excel,fastapi,mcp,redis,restapi,web
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Information Technology
Classifier: Intended Audience :: System Administrators
Classifier: License :: OSI Approved :: MIT License
Classifier: Natural Language :: Japanese
Classifier: Programming Language :: Python
Classifier: Topic :: Utilities
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: argcomplete
Requires-Dist: aiosqlite
Requires-Dist: async-timeout
Requires-Dist: asyncpg
Requires-Dist: cffi
Requires-Dist: cryptography
Requires-Dist: fastapi
Requires-Dist: debugpy
Requires-Dist: gevent
Requires-Dist: gunicorn
Requires-Dist: itsdangerous
Requires-Dist: numpy
Requires-Dist: openpyxl
Requires-Dist: Pillow
Requires-Dist: plyer
Requires-Dist: psycopg[binary]
Requires-Dist: psycopg[pool]
Requires-Dist: pyjwt
Requires-Dist: python-multipart
Requires-Dist: pycryptodome
Requires-Dist: pyyaml
Requires-Dist: questionary
Requires-Dist: redis
Requires-Dist: requests
Requires-Dist: rich
Requires-Dist: six
Requires-Dist: starsessions[redis]
Requires-Dist: sqlite_vec
Requires-Dist: tabulate
Requires-Dist: uvicorn
Requires-Dist: wsproto
Requires-Dist: wheel
Provides-Extra: agent-mcp
Requires-Dist: pydantic<3.0.0,>=2.0.0; extra == "agent-mcp"
Requires-Dist: fastmcp>=2.14.4; extra == "agent-mcp"
Requires-Dist: mcp<2.0.0,>=1.24.0; extra == "agent-mcp"
Provides-Extra: agent-adk
Requires-Dist: google-adk>=1.30.0; extra == "agent-adk"
Requires-Dist: a2a-sdk<0.4.0,>=0.3.4; extra == "agent-adk"
Requires-Dist: litellm>=1.82.6; extra == "agent-adk"
Provides-Extra: agent-mem
Provides-Extra: rag
Requires-Dist: chunklet-py; extra == "rag"
Requires-Dist: pdfminer.six>=20250324; extra == "rag"
Requires-Dist: python-docx<2.0,>=1.2.0; extra == "rag"
Requires-Dist: mammoth<2.0,>=1.9.1; extra == "rag"
Requires-Dist: docutils<1.0,>=0.21.2; extra == "rag"
Requires-Dist: markdownify<2.0,>=1.1.0; extra == "rag"
Requires-Dist: striprtf<1.0,>=0.0.29; extra == "rag"
Requires-Dist: pylatexenc==2.10; extra == "rag"
Requires-Dist: odfpy<2.0,>=1.4.1; extra == "rag"
Requires-Dist: openpyxl<4.0,>=3.1.5; extra == "rag"
Requires-Dist: tabulate2<2.0,>=1.10.2; extra == "rag"
Requires-Dist: langchain_community; extra == "rag"
Requires-Dist: markdown; extra == "rag"
Requires-Dist: pdfplumber; extra == "rag"
Provides-Extra: omni
Requires-Dist: accelerate>=1.12.0; extra == "omni"
Requires-Dist: qwen-omni-utils>=0.0.9; extra == "omni"
Requires-Dist: torchvision>=0.25.0; extra == "omni"
Provides-Extra: saml
Requires-Dist: python3-saml; extra == "saml"
Requires-Dist: xmlsec==1.3.13; extra == "saml"
Provides-Extra: dev
Requires-Dist: build; extra == "dev"
Requires-Dist: collectlicense; extra == "dev"
Requires-Dist: pipdeptree; extra == "dev"
Requires-Dist: pytest; extra == "dev"
Requires-Dist: sphinx; extra == "dev"
Requires-Dist: sphinx-rtd-theme; extra == "dev"
Requires-Dist: sphinx_fontawesome; extra == "dev"
Requires-Dist: sphinx-intl; extra == "dev"
Requires-Dist: sphinx-sitemap; extra == "dev"
Requires-Dist: twine; extra == "dev"
Requires-Dist: wheel; extra == "dev"
Provides-Extra: app
Requires-Dist: cmdbox[agent_adk,agent_mcp,dev,rag]; extra == "app"
Dynamic: license-file

# cmdbox

cmdbox is a command foundation for AI system development that lets you launch with minimal implementation.
A single feature implementation can be exposed through CLI / REST API / MCP SV / Web UI / Edge UI / remote execution.

- Documentation: https://hamacom2004jp.github.io/cmdbox/

![cmdbox operation image](https://github.com/hamacom2004jp/cmdbox/raw/main/docs_src/static/orverview.drawio.png)

## Why cmdbox for AI System Developers

- No repeated reimplementation
  - Implement a `Feature` command once, then use the same capability via CLI, Web UI, and REST API.
  - It is easy to promote a PoC CLI workflow into operational Web/API interfaces without rewriting business logic.
- AI-ready components out of the box
  - Modes such as `agent`, `llm`, `mcpsv`, and `a2asv` let you manage agent execution, model operations, MCP exposure, and A2A integration on one platform.
  - You can separate tool execution, inference, knowledge retrieval, and external integration while keeping a consistent operational model.
- Rich Web UI for daily operations
  - Beyond APIs and CLI, cmdbox provides operational screens for commandlets, agents, filer, limiter, audit, and user management.
  - Teams can run, monitor, and control workflows from a browser without building a separate admin console.
- Designed for remote execution
  - Server-side commands can run through Redis, which fits node separation and scale-out architectures.
  - Heavy workloads can be offloaded to servers while keeping client components lightweight.
- Fast, configuration-driven extensibility
  - `features.yml` defines command discovery, aliases, argument rules, and agent execution rules, separating implementation from operations policy.
  - You can adjust exposed commands and execution policies without code changes, which is useful for environment-specific control.
- Built-in governance capabilities
  - You can combine audit logging, authentication/authorization (signin / oauth2 / saml / rule settings), and limiter controls.
  - It is easier to trace who executed which command under which conditions, enabling enterprise-grade operational control.

### Problems It Solves Well

- You need to launch internal AI tools quickly
  - Start with CLI features, then expose the same capabilities internally via Web and REST API.
- Multiple teams/environments need one shared foundation
  - Run the same codebase across dev/stg/prod while switching execution policies through configuration.
- You need safe integration between agents and existing systems
  - Combine MCP/A2A integration with authorization rules to control the scope of agent actions.
- You need usage control and cost governance for AI operations
  - Use Limiter settings to enforce quotas/rate rules, prevent abuse, and keep usage and billing behavior predictable.
  - Define reusable plans and billing policies (period-based or metered) to align access control with commercial and internal chargeback models.

## What You Can Build

- Custom command development
  - Support complex option definitions, client/server execution, and Web execution.
  - Organize functionality by `mode` / `cmd` and standardize execution through a shared option model.
- LLM integration
  - Chat, embedding, and configuration save/load/list workflows.
  - Manage model configurations and treat inference calls as operational commands.
- Agent integration
  - Save/load agent settings, integrate MCP servers, and connect A2A servers.
  - Expand agent capabilities in phases while keeping clear boundaries on exposed tools.
- Web UI operations
  - Use built-in screens for commandlets, agents, filer, limiter, audit, and user management.
  - Manage day-to-day operations from the browser while keeping the same backend command model.
- Operational controls
  - Audit logs, authentication, command execution policy, and REST API controls.
  - Publish safely with permissions segmented by organization or user group and full traceability.
  - Configure plan and billing operations to support subscription-style access windows and metered charging models.

### Typical Use Cases

- Internal knowledge search combining document processing + LLM
- Converting routine operations into commands and running them from Web UI with no-code interaction
- Letting agents call internal tools safely within controlled boundaries
- Running operational administration (filer, limiter, audit, and user control) from the built-in Web UI

## Installation

```bash
pip install cmdbox[app]
cmdbox -v
```

## Docker Environment Setup

- Redis

```bash
cmdbox -m cmdbox -c redis_install
cmdbox -m cmdbox -c up -C redis
```

- PostgreSQL (used by some commands)

```bash
cmdbox -m cmdbox -c pgsql_install
cmdbox -m cmdbox -c up -C pgsql
```

- Full cmdbox suite

```bash
cmdbox -m cmdbox -c server_install
cmdbox -m cmdbox -c up -C cmdbox
```

## Quick Start

```bash
cmdbox -m server -c start
cmdbox -m web -c start --signin_file .cmdbox/user_list.yml
cmdbox -m mcpsv -c start --signin_file .cmdbox/user_list.yml
cmdbox -m a2asv -c start --signin_file .cmdbox/user_list.yml
```

## Tutorial

The tutorial content has moved to the following documentation:

- `docs_src/docs/tutorial.rst`
- Published tutorial: https://hamacom2004jp.github.io/cmdbox/docs/tutorial.html
- Full documentation: https://hamacom2004jp.github.io/cmdbox/


# License

This project is licensed under the MIT License, see the LICENSE file for details
