fips-agents-cli 0.1.0__py3-none-any.whl → 0.1.2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- fips_agents_cli/cli.py +2 -0
- fips_agents_cli/commands/create.py +1 -2
- fips_agents_cli/commands/generate.py +405 -0
- fips_agents_cli/tools/filesystem.py +3 -4
- fips_agents_cli/tools/generators.py +311 -0
- fips_agents_cli/tools/project.py +1 -2
- fips_agents_cli/tools/validation.py +183 -0
- fips_agents_cli/version.py +1 -1
- {fips_agents_cli-0.1.0.dist-info → fips_agents_cli-0.1.2.dist-info}/METADATA +246 -8
- fips_agents_cli-0.1.2.dist-info/RECORD +18 -0
- {fips_agents_cli-0.1.0.dist-info → fips_agents_cli-0.1.2.dist-info}/licenses/LICENSE +2 -0
- fips_agents_cli-0.1.0.dist-info/RECORD +0 -15
- {fips_agents_cli-0.1.0.dist-info → fips_agents_cli-0.1.2.dist-info}/WHEEL +0 -0
- {fips_agents_cli-0.1.0.dist-info → fips_agents_cli-0.1.2.dist-info}/entry_points.txt +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: fips-agents-cli
|
3
|
-
Version: 0.1.
|
3
|
+
Version: 0.1.2
|
4
4
|
Summary: CLI tool for creating and managing FIPS-compliant AI agent projects
|
5
5
|
Project-URL: Homepage, https://github.com/rdwj/fips-agents-cli
|
6
6
|
Project-URL: Repository, https://github.com/rdwj/fips-agents-cli
|
@@ -13,15 +13,15 @@ Classifier: Development Status :: 3 - Alpha
|
|
13
13
|
Classifier: Intended Audience :: Developers
|
14
14
|
Classifier: License :: OSI Approved :: MIT License
|
15
15
|
Classifier: Programming Language :: Python :: 3
|
16
|
-
Classifier: Programming Language :: Python :: 3.9
|
17
16
|
Classifier: Programming Language :: Python :: 3.10
|
18
17
|
Classifier: Programming Language :: Python :: 3.11
|
19
18
|
Classifier: Programming Language :: Python :: 3.12
|
20
19
|
Classifier: Topic :: Software Development :: Code Generators
|
21
20
|
Classifier: Topic :: Software Development :: Libraries :: Application Frameworks
|
22
|
-
Requires-Python: >=3.
|
21
|
+
Requires-Python: >=3.10
|
23
22
|
Requires-Dist: click>=8.1.0
|
24
23
|
Requires-Dist: gitpython>=3.1.0
|
24
|
+
Requires-Dist: jinja2>=3.1.2
|
25
25
|
Requires-Dist: rich>=13.0.0
|
26
26
|
Requires-Dist: tomlkit>=0.12.0
|
27
27
|
Provides-Extra: dev
|
@@ -40,25 +40,38 @@ A command-line tool for creating and managing FIPS-compliant AI agent projects,
|
|
40
40
|
- 🚀 Quick project scaffolding from templates
|
41
41
|
- 📦 MCP server project generation
|
42
42
|
- 🔧 Automatic project customization
|
43
|
+
- ⚡ Component generation (tools, resources, prompts, middleware)
|
43
44
|
- 🎨 Beautiful CLI output with Rich
|
44
45
|
- ✅ Git repository initialization
|
45
|
-
- 🧪 Comprehensive test coverage
|
46
|
+
- 🧪 Comprehensive test coverage with auto-run
|
46
47
|
|
47
48
|
## Installation
|
48
49
|
|
49
|
-
|
50
|
+
**Recommended:** Install with [pipx](https://pipx.pypa.io/) for isolated command-line tools:
|
50
51
|
|
51
52
|
```bash
|
52
53
|
pipx install fips-agents-cli
|
53
54
|
```
|
54
55
|
|
55
|
-
|
56
|
+
pipx installs the CLI in an isolated environment while making it globally available. This prevents dependency conflicts with other Python packages.
|
57
|
+
|
58
|
+
<details>
|
59
|
+
<summary><b>Alternative: Using pip</b></summary>
|
60
|
+
|
61
|
+
If you prefer pip or don't have pipx installed:
|
56
62
|
|
57
63
|
```bash
|
58
64
|
pip install fips-agents-cli
|
59
65
|
```
|
60
66
|
|
61
|
-
|
67
|
+
**Note:** Consider using a virtual environment to avoid dependency conflicts.
|
68
|
+
|
69
|
+
</details>
|
70
|
+
|
71
|
+
<details>
|
72
|
+
<summary><b>Alternative: Install from source (for development)</b></summary>
|
73
|
+
|
74
|
+
For contributing or local development:
|
62
75
|
|
63
76
|
```bash
|
64
77
|
# Clone the repository
|
@@ -73,6 +86,8 @@ source venv/bin/activate # On Windows: venv\Scripts\activate
|
|
73
86
|
pip install -e .[dev]
|
74
87
|
```
|
75
88
|
|
89
|
+
</details>
|
90
|
+
|
76
91
|
## Quick Start
|
77
92
|
|
78
93
|
### Create a new MCP server project
|
@@ -99,6 +114,25 @@ fips-agents create mcp-server my-server --target-dir ~/projects
|
|
99
114
|
fips-agents create mcp-server my-server --no-git
|
100
115
|
```
|
101
116
|
|
117
|
+
### Generate components in an existing project
|
118
|
+
|
119
|
+
```bash
|
120
|
+
# Navigate to your MCP server project
|
121
|
+
cd my-mcp-server
|
122
|
+
|
123
|
+
# Generate a new tool
|
124
|
+
fips-agents generate tool search_documents --description "Search through documents"
|
125
|
+
|
126
|
+
# Generate a resource
|
127
|
+
fips-agents generate resource config_data --description "Application configuration"
|
128
|
+
|
129
|
+
# Generate a prompt
|
130
|
+
fips-agents generate prompt code_review --description "Review code for best practices"
|
131
|
+
|
132
|
+
# Generate middleware
|
133
|
+
fips-agents generate middleware auth_middleware --description "Authentication middleware"
|
134
|
+
```
|
135
|
+
|
102
136
|
## Usage
|
103
137
|
|
104
138
|
### Basic Commands
|
@@ -111,6 +145,8 @@ fips-agents --version
|
|
111
145
|
fips-agents --help
|
112
146
|
fips-agents create --help
|
113
147
|
fips-agents create mcp-server --help
|
148
|
+
fips-agents generate --help
|
149
|
+
fips-agents generate tool --help
|
114
150
|
```
|
115
151
|
|
116
152
|
### Create MCP Server
|
@@ -140,6 +176,168 @@ fips-agents create mcp-server my-server -t ~/projects
|
|
140
176
|
fips-agents create mcp-server my-server --no-git
|
141
177
|
```
|
142
178
|
|
179
|
+
### Generate Components
|
180
|
+
|
181
|
+
The `generate` command group allows you to scaffold MCP components (tools, resources, prompts, middleware) in existing MCP server projects.
|
182
|
+
|
183
|
+
**Important**: Run these commands from within your MCP server project directory.
|
184
|
+
|
185
|
+
#### Generate Tool
|
186
|
+
|
187
|
+
```bash
|
188
|
+
fips-agents generate tool <name> [OPTIONS]
|
189
|
+
```
|
190
|
+
|
191
|
+
**Arguments:**
|
192
|
+
- `name`: Tool name in snake_case (e.g., `search_documents`, `fetch_data`)
|
193
|
+
|
194
|
+
**Options:**
|
195
|
+
- `--description, -d TEXT`: Tool description
|
196
|
+
- `--async/--sync`: Generate async or sync function (default: async)
|
197
|
+
- `--with-context`: Include FastMCP Context parameter
|
198
|
+
- `--with-auth`: Include authentication decorator
|
199
|
+
- `--params PATH`: JSON file with parameter definitions
|
200
|
+
- `--read-only`: Mark as read-only operation (default: true)
|
201
|
+
- `--idempotent`: Mark as idempotent (default: true)
|
202
|
+
- `--open-world`: Mark as open-world operation
|
203
|
+
- `--return-type TEXT`: Return type annotation (default: str)
|
204
|
+
- `--dry-run`: Show what would be generated without creating files
|
205
|
+
|
206
|
+
**Examples:**
|
207
|
+
|
208
|
+
```bash
|
209
|
+
# Basic tool generation
|
210
|
+
fips-agents generate tool search_documents --description "Search through documents"
|
211
|
+
|
212
|
+
# Tool with context and authentication
|
213
|
+
fips-agents generate tool fetch_user_data --description "Fetch user data" --with-context --with-auth
|
214
|
+
|
215
|
+
# Tool with parameters from JSON file
|
216
|
+
fips-agents generate tool advanced_search --params params.json
|
217
|
+
|
218
|
+
# Sync tool with custom return type
|
219
|
+
fips-agents generate tool process_data --sync --return-type "dict[str, Any]"
|
220
|
+
|
221
|
+
# Dry run to preview
|
222
|
+
fips-agents generate tool test_tool --description "Test" --dry-run
|
223
|
+
```
|
224
|
+
|
225
|
+
#### Generate Resource
|
226
|
+
|
227
|
+
```bash
|
228
|
+
fips-agents generate resource <name> [OPTIONS]
|
229
|
+
```
|
230
|
+
|
231
|
+
**Arguments:**
|
232
|
+
- `name`: Resource name in snake_case (e.g., `config_data`, `user_profile`)
|
233
|
+
|
234
|
+
**Options:**
|
235
|
+
- `--description, -d TEXT`: Resource description
|
236
|
+
- `--async/--sync`: Generate async or sync function (default: async)
|
237
|
+
- `--with-context`: Include FastMCP Context parameter
|
238
|
+
- `--uri TEXT`: Resource URI (default: `resource://<name>`)
|
239
|
+
- `--mime-type TEXT`: MIME type for resource (default: text/plain)
|
240
|
+
- `--dry-run`: Show what would be generated without creating files
|
241
|
+
|
242
|
+
**Examples:**
|
243
|
+
|
244
|
+
```bash
|
245
|
+
# Basic resource
|
246
|
+
fips-agents generate resource config_data --description "Application configuration"
|
247
|
+
|
248
|
+
# Resource with custom URI
|
249
|
+
fips-agents generate resource user_profile --uri "resource://users/{id}" --description "User profile data"
|
250
|
+
|
251
|
+
# Resource with specific MIME type
|
252
|
+
fips-agents generate resource json_config --mime-type "application/json"
|
253
|
+
```
|
254
|
+
|
255
|
+
#### Generate Prompt
|
256
|
+
|
257
|
+
```bash
|
258
|
+
fips-agents generate prompt <name> [OPTIONS]
|
259
|
+
```
|
260
|
+
|
261
|
+
**Arguments:**
|
262
|
+
- `name`: Prompt name in snake_case (e.g., `code_review`, `summarize_text`)
|
263
|
+
|
264
|
+
**Options:**
|
265
|
+
- `--description, -d TEXT`: Prompt description
|
266
|
+
- `--params PATH`: JSON file with parameter definitions
|
267
|
+
- `--with-schema`: Include JSON schema in prompt
|
268
|
+
- `--dry-run`: Show what would be generated without creating files
|
269
|
+
|
270
|
+
**Examples:**
|
271
|
+
|
272
|
+
```bash
|
273
|
+
# Basic prompt
|
274
|
+
fips-agents generate prompt code_review --description "Review code for best practices"
|
275
|
+
|
276
|
+
# Prompt with parameters
|
277
|
+
fips-agents generate prompt summarize_text --params params.json --with-schema
|
278
|
+
```
|
279
|
+
|
280
|
+
#### Generate Middleware
|
281
|
+
|
282
|
+
```bash
|
283
|
+
fips-agents generate middleware <name> [OPTIONS]
|
284
|
+
```
|
285
|
+
|
286
|
+
**Arguments:**
|
287
|
+
- `name`: Middleware name in snake_case (e.g., `auth_middleware`, `rate_limiter`)
|
288
|
+
|
289
|
+
**Options:**
|
290
|
+
- `--description, -d TEXT`: Middleware description
|
291
|
+
- `--async/--sync`: Generate async or sync function (default: async)
|
292
|
+
- `--dry-run`: Show what would be generated without creating files
|
293
|
+
|
294
|
+
**Examples:**
|
295
|
+
|
296
|
+
```bash
|
297
|
+
# Basic middleware
|
298
|
+
fips-agents generate middleware auth_middleware --description "Authentication middleware"
|
299
|
+
|
300
|
+
# Sync middleware
|
301
|
+
fips-agents generate middleware rate_limiter --sync --description "Rate limiting middleware"
|
302
|
+
```
|
303
|
+
|
304
|
+
#### Parameters JSON Schema
|
305
|
+
|
306
|
+
When using `--params` flag, provide a JSON file with parameter definitions:
|
307
|
+
|
308
|
+
```json
|
309
|
+
[
|
310
|
+
{
|
311
|
+
"name": "query",
|
312
|
+
"type": "str",
|
313
|
+
"description": "Search query",
|
314
|
+
"required": true,
|
315
|
+
"min_length": 1,
|
316
|
+
"max_length": 100
|
317
|
+
},
|
318
|
+
{
|
319
|
+
"name": "limit",
|
320
|
+
"type": "int",
|
321
|
+
"description": "Maximum results to return",
|
322
|
+
"required": false,
|
323
|
+
"default": 10,
|
324
|
+
"ge": 1,
|
325
|
+
"le": 100
|
326
|
+
}
|
327
|
+
]
|
328
|
+
```
|
329
|
+
|
330
|
+
**Supported Types:**
|
331
|
+
- `str`, `int`, `float`, `bool`
|
332
|
+
- `list[str]`, `list[int]`, `list[float]`
|
333
|
+
- `Optional[str]`, `Optional[int]`, `Optional[float]`, `Optional[bool]`
|
334
|
+
|
335
|
+
**Pydantic Field Constraints:**
|
336
|
+
- `min_length`, `max_length` (for strings)
|
337
|
+
- `ge`, `le`, `gt`, `lt` (for numbers)
|
338
|
+
- `pattern` (for regex validation on strings)
|
339
|
+
- `default` (default value when optional)
|
340
|
+
|
143
341
|
## Project Name Requirements
|
144
342
|
|
145
343
|
Project names must follow these rules:
|
@@ -249,7 +447,7 @@ fips-agents-cli/
|
|
249
447
|
|
250
448
|
## Requirements
|
251
449
|
|
252
|
-
- Python 3.
|
450
|
+
- Python 3.10 or higher
|
253
451
|
- Git (for cloning templates and initializing repositories)
|
254
452
|
|
255
453
|
## Dependencies
|
@@ -258,6 +456,7 @@ fips-agents-cli/
|
|
258
456
|
- **rich** (>=13.0.0): Terminal output formatting
|
259
457
|
- **gitpython** (>=3.1.0): Git operations
|
260
458
|
- **tomlkit** (>=0.12.0): TOML file manipulation
|
459
|
+
- **jinja2** (>=3.1.2): Template rendering for component generation
|
261
460
|
|
262
461
|
## Contributing
|
263
462
|
|
@@ -295,6 +494,28 @@ If template cloning fails:
|
|
295
494
|
- Verify the template repository is accessible: https://github.com/rdwj/mcp-server-template
|
296
495
|
- Try again later if GitHub is experiencing issues
|
297
496
|
|
497
|
+
### "Not in an MCP server project directory"
|
498
|
+
|
499
|
+
When using `generate` commands:
|
500
|
+
- Ensure you're running the command from within an MCP server project
|
501
|
+
- Check that `pyproject.toml` exists with `fastmcp` dependency
|
502
|
+
- If the project wasn't created with `fips-agents create mcp-server`, generator templates may be missing
|
503
|
+
|
504
|
+
### "Component already exists"
|
505
|
+
|
506
|
+
If you see this error:
|
507
|
+
- Choose a different component name
|
508
|
+
- Manually remove the existing component file from `src/<component-type>/`
|
509
|
+
- Check the component type directory for existing files
|
510
|
+
|
511
|
+
### Invalid component name
|
512
|
+
|
513
|
+
Component names must:
|
514
|
+
- Be valid Python identifiers (snake_case)
|
515
|
+
- Not be Python keywords (`for`, `class`, etc.)
|
516
|
+
- Start with a letter or underscore
|
517
|
+
- Contain only letters, numbers, and underscores
|
518
|
+
|
298
519
|
## License
|
299
520
|
|
300
521
|
MIT License - see LICENSE file for details
|
@@ -307,6 +528,23 @@ MIT License - see LICENSE file for details
|
|
307
528
|
|
308
529
|
## Changelog
|
309
530
|
|
531
|
+
### Version 0.1.2
|
532
|
+
|
533
|
+
- Documentation: Updated documentation and improved release management guidance
|
534
|
+
- Automation: Added `/create-release` slash command for automated release workflow
|
535
|
+
- Automation: Created `scripts/release.sh` for streamlined version management and tagging
|
536
|
+
- Documentation: Added `RELEASE_CHECKLIST.md` with comprehensive release procedures
|
537
|
+
|
538
|
+
### Version 0.1.1
|
539
|
+
|
540
|
+
- Added `fips-agents generate` command group
|
541
|
+
- Component generation: tools, resources, prompts, middleware
|
542
|
+
- Jinja2-based template rendering
|
543
|
+
- Parameter validation and JSON schema support
|
544
|
+
- Auto-run pytest on generated components
|
545
|
+
- Dry-run mode for previewing changes
|
546
|
+
- Comprehensive error handling and validation
|
547
|
+
|
310
548
|
### Version 0.1.0 (MVP)
|
311
549
|
|
312
550
|
- Initial release
|
@@ -0,0 +1,18 @@
|
|
1
|
+
fips_agents_cli/__init__.py,sha256=Jfo6y6T4HIQ-BeeF89w7F-F4BED63KyCIc1yoFGn9OM,167
|
2
|
+
fips_agents_cli/__main__.py,sha256=rUeQY3jrV6hQVAI2IE0qZCcUnvXDMj5LiCjhlXsc9PQ,130
|
3
|
+
fips_agents_cli/cli.py,sha256=c6ZSIfqZXTAfGc_2sKXanWDuWbxXTUjp4nSbl7yeDig,799
|
4
|
+
fips_agents_cli/version.py,sha256=IWx_DJXC-x6jhTpUmUSr_yPgJMJaMDnt7gi9jml40BU,70
|
5
|
+
fips_agents_cli/commands/__init__.py,sha256=AGxi2-Oc-gKE3sR9F39nIxwnzz-4bcfkkJzaP1qhMvU,40
|
6
|
+
fips_agents_cli/commands/create.py,sha256=wWJZTa2NOoF40lnqIGKXKNcZT5jIZxInGk3CAkUfa3w,6372
|
7
|
+
fips_agents_cli/commands/generate.py,sha256=hoPERkaYGlt-R79PRWnxE6vwNtWfun7SMtJN2zaOIKo,14113
|
8
|
+
fips_agents_cli/tools/__init__.py,sha256=ah4OrYFuyQavuhwguFwFS0o-7ZLGIm5ZWWQK5ZTZZSs,47
|
9
|
+
fips_agents_cli/tools/filesystem.py,sha256=1AOOJtkDSw-pqkuUJyVUbquuczpZBZMT4HLl3qCPB3k,3276
|
10
|
+
fips_agents_cli/tools/generators.py,sha256=bwHKBzWkfJxug4YQXrkRQB_-BxR78kZqe46AjC7haHY,9372
|
11
|
+
fips_agents_cli/tools/git.py,sha256=-z2EO7vNZhN6Vuzh34ZbqNteZE4vNnLG8oysgzhmypk,3042
|
12
|
+
fips_agents_cli/tools/project.py,sha256=vgnctNgdRJJB14uqy7WM0bqpAoPoK_fZu16Io5Rn2hA,5699
|
13
|
+
fips_agents_cli/tools/validation.py,sha256=3947i5UI46BmwBw4F0yLNdkWvkGJig8qH1nJzvQS6RA,5771
|
14
|
+
fips_agents_cli-0.1.2.dist-info/METADATA,sha256=9vncWTElQE2__DYjak7QTKGvPrEdrD-IyxX5AjDQd9o,15514
|
15
|
+
fips_agents_cli-0.1.2.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
16
|
+
fips_agents_cli-0.1.2.dist-info/entry_points.txt,sha256=srO4LAGNp6zcB9zuPW1toLGPyLbcsad9YWsfNxgz20s,57
|
17
|
+
fips_agents_cli-0.1.2.dist-info/licenses/LICENSE,sha256=kxsuNJY2W19dYjR8OstG1UT3RFCJKmtelxPMHMwXrck,1122
|
18
|
+
fips_agents_cli-0.1.2.dist-info/RECORD,,
|
@@ -2,6 +2,8 @@ MIT License
|
|
2
2
|
|
3
3
|
Copyright (c) 2025 Wes Jackson
|
4
4
|
|
5
|
+
Note: Some code in this project was written with AI.
|
6
|
+
|
5
7
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
8
|
of this software and associated documentation files (the "Software"), to deal
|
7
9
|
in the Software without restriction, including without limitation the rights
|
@@ -1,15 +0,0 @@
|
|
1
|
-
fips_agents_cli/__init__.py,sha256=Jfo6y6T4HIQ-BeeF89w7F-F4BED63KyCIc1yoFGn9OM,167
|
2
|
-
fips_agents_cli/__main__.py,sha256=rUeQY3jrV6hQVAI2IE0qZCcUnvXDMj5LiCjhlXsc9PQ,130
|
3
|
-
fips_agents_cli/cli.py,sha256=e2QGiAH73pHAjpdf7JdovyNZtc2nyb83LaVaLbLqS5o,718
|
4
|
-
fips_agents_cli/version.py,sha256=EeROn-Cy9mXSPq-OrZ--hVR0oQvwMNqIyAgy4w-YowU,70
|
5
|
-
fips_agents_cli/commands/__init__.py,sha256=AGxi2-Oc-gKE3sR9F39nIxwnzz-4bcfkkJzaP1qhMvU,40
|
6
|
-
fips_agents_cli/commands/create.py,sha256=GvGm8VgsIfqZV_yIXXYzeV-nasLIwuD85_l831YjAho,6403
|
7
|
-
fips_agents_cli/tools/__init__.py,sha256=ah4OrYFuyQavuhwguFwFS0o-7ZLGIm5ZWWQK5ZTZZSs,47
|
8
|
-
fips_agents_cli/tools/filesystem.py,sha256=G9wzHrgQpoMw3z5EslsyEL91VLlUT6Cf5Rt80DtkwOw,3313
|
9
|
-
fips_agents_cli/tools/git.py,sha256=-z2EO7vNZhN6Vuzh34ZbqNteZE4vNnLG8oysgzhmypk,3042
|
10
|
-
fips_agents_cli/tools/project.py,sha256=d_qIhsEzPOM55ONSLzheTozXuyuiEEf9OG4hVXISAbk,5730
|
11
|
-
fips_agents_cli-0.1.0.dist-info/METADATA,sha256=j3-wAEIftpKnjwj4BVKykYPQh4eDXGva_RNIKh55Qiw,8220
|
12
|
-
fips_agents_cli-0.1.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
13
|
-
fips_agents_cli-0.1.0.dist-info/entry_points.txt,sha256=srO4LAGNp6zcB9zuPW1toLGPyLbcsad9YWsfNxgz20s,57
|
14
|
-
fips_agents_cli-0.1.0.dist-info/licenses/LICENSE,sha256=dQJIqi2t9SinZu0yALTYJ8juzosu29KPbjU8WhyboRc,1068
|
15
|
-
fips_agents_cli-0.1.0.dist-info/RECORD,,
|
File without changes
|
File without changes
|