kbws-forge-cli
Scaffolding CLI for coding-agent projects, powered by kbws-forge-runtime. Generate a production-shaped FastAPI agent service in seconds — layered architecture, authentication, multi-environment config, persistent logging and a full test suite, out of the box.
Install
pip install kbws-forge-cli
Requires Python ≥ 3.13 and uv.
Usage
Run forge init and answer the prompts (Vite-style interactive picker):
forge init
✔ Project name: … my-agent
✔ Select a template: › service-agent
Or pass everything explicitly for non-interactive/scripted use:
forge init my-agent # name given, template picked interactively
forge init my-agent -t base-agent # fully non-interactive
Then start developing:
cd my-agent
uv sync # installs kbws-forge-runtime from PyPI
uv run uvicorn app.main:app --reload # dev server
uv run pytest # tests (fake models, no cost)
Templates
| Template | Description |
|---|---|
service-agent (default) |
Full layered service: business aggregation (agents/) + technical layering (app/), global exception handling, unified {code, info, data} responses, API-key auth, multi-environment config, persistent JSON logging, request-id tracing, and unit/API/integration tests |
base-agent |
Minimal FastAPI Hello World for a quick start |
New templates placed in the CLI's templates/ directory appear in the
interactive picker automatically.
Generated project
forge init my-service produces:
my-service/
├── agents/<module_name>/ # business units: agent.py + prompts.py + tools.py
│ ├── agent.py # exports `agent` (auto-discovered by load_agents)
│ ├── prompts.py # composable Prompt components (code-first)
│ └── tools.py # this agent's tools
├── app/ # technical layering
│ ├── main.py # create_app() + lifespan (load_agents)
│ ├── core/ # config / errors / response / security / logging
│ ├── api/v1/ # agents / sessions / chat / chat_stream / health
│ ├── schemas/ # request & response models
│ ├── services/ # chat orchestration
│ └── providers/ # LLM factory
├── tests/ # unit / api / integration (real-provider gated)
├── scripts/run.sh
└── .env.example # multi-env config template
Endpoints: GET /api/v1/health · GET /api/v1/agents · POST /api/v1/sessions ·
POST /api/v1/chat · POST /api/v1/chat_stream (SSE), all behind
X-API-Key / Bearer auth except health.
Development
uv sync
uv run pytest packages/forge-cli/tests
License
MIT License
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file kbws_forge_cli-0.1.2.tar.gz.
File metadata
- Download URL: kbws_forge_cli-0.1.2.tar.gz
- Upload date:
- Size: 23.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
uv/0.11.16 {"installer":{"name":"uv","version":"0.11.16","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a4af6b88443a0bc6cd922ba6f6236370a3b069e8373c3b1f45e2cd5870e31695
|
|
| MD5 |
f899051d581aca1eca743d3a23aad07c
|
|
| BLAKE2b-256 |
39ba0f24aa675b5ca366fef6ec9d84dffdb94affc298255fcadacdd938c399d8
|
File details
Details for the file kbws_forge_cli-0.1.2-py3-none-any.whl.
File metadata
- Download URL: kbws_forge_cli-0.1.2-py3-none-any.whl
- Upload date:
- Size: 42.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
uv/0.11.16 {"installer":{"name":"uv","version":"0.11.16","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6c9fde3127606a884050b22e627b811f47355db2abb886d7a51629f804825876
|
|
| MD5 |
5d5b2e28728c3b79e6eb741cf4bfd0bb
|
|
| BLAKE2b-256 |
58ffc017a343495d60d1cd4f7f1ec5d487189e6a6a25b6fe913f3bc2177c7bed
|