nexus-framework 0.2.0__tar.gz → 0.2.2__tar.gz

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.
Files changed (72) hide show
  1. {nexus_framework-0.2.0 → nexus_framework-0.2.2}/PKG-INFO +1 -1
  2. {nexus_framework-0.2.0 → nexus_framework-0.2.2}/nexus/__init__.py +1 -1
  3. {nexus_framework-0.2.0 → nexus_framework-0.2.2}/nexus/cli.py +164 -22
  4. {nexus_framework-0.2.0 → nexus_framework-0.2.2}/nexus/core/entities/__init__.py +5 -0
  5. {nexus_framework-0.2.0 → nexus_framework-0.2.2}/nexus/scaffolding.py +62 -54
  6. {nexus_framework-0.2.0 → nexus_framework-0.2.2}/nexus/web/app.py +106 -15
  7. {nexus_framework-0.2.0 → nexus_framework-0.2.2}/nexus/web/router.py +111 -4
  8. {nexus_framework-0.2.0 → nexus_framework-0.2.2}/nexus/web/template/engine.py +5 -2
  9. {nexus_framework-0.2.0 → nexus_framework-0.2.2}/pyproject.toml +1 -1
  10. {nexus_framework-0.2.0 → nexus_framework-0.2.2}/.gitignore +0 -0
  11. {nexus_framework-0.2.0 → nexus_framework-0.2.2}/LICENSE +0 -0
  12. {nexus_framework-0.2.0 → nexus_framework-0.2.2}/README.md +0 -0
  13. {nexus_framework-0.2.0 → nexus_framework-0.2.2}/nexus/ai/__init__.py +0 -0
  14. {nexus_framework-0.2.0 → nexus_framework-0.2.2}/nexus/ai/agent.py +0 -0
  15. {nexus_framework-0.2.0 → nexus_framework-0.2.2}/nexus/ai/decorator.py +0 -0
  16. {nexus_framework-0.2.0 → nexus_framework-0.2.2}/nexus/ai/llm.py +0 -0
  17. {nexus_framework-0.2.0 → nexus_framework-0.2.2}/nexus/ai/memory.py +0 -0
  18. {nexus_framework-0.2.0 → nexus_framework-0.2.2}/nexus/ai/prompt.py +0 -0
  19. {nexus_framework-0.2.0 → nexus_framework-0.2.2}/nexus/ai/rag.py +0 -0
  20. {nexus_framework-0.2.0 → nexus_framework-0.2.2}/nexus/ai/vector.py +0 -0
  21. {nexus_framework-0.2.0 → nexus_framework-0.2.2}/nexus/config/__init__.py +0 -0
  22. {nexus_framework-0.2.0 → nexus_framework-0.2.2}/nexus/config/settings.py +0 -0
  23. {nexus_framework-0.2.0 → nexus_framework-0.2.2}/nexus/core/__init__.py +0 -0
  24. {nexus_framework-0.2.0 → nexus_framework-0.2.2}/nexus/core/exceptions/__init__.py +0 -0
  25. {nexus_framework-0.2.0 → nexus_framework-0.2.2}/nexus/core/interfaces/__init__.py +0 -0
  26. {nexus_framework-0.2.0 → nexus_framework-0.2.2}/nexus/core/jwt.py +0 -0
  27. {nexus_framework-0.2.0 → nexus_framework-0.2.2}/nexus/data/__init__.py +0 -0
  28. {nexus_framework-0.2.0 → nexus_framework-0.2.2}/nexus/data/frame.py +0 -0
  29. {nexus_framework-0.2.0 → nexus_framework-0.2.2}/nexus/data/loader.py +0 -0
  30. {nexus_framework-0.2.0 → nexus_framework-0.2.2}/nexus/data/pipeline.py +0 -0
  31. {nexus_framework-0.2.0 → nexus_framework-0.2.2}/nexus/data/sink.py +0 -0
  32. {nexus_framework-0.2.0 → nexus_framework-0.2.2}/nexus/data/testing.py +0 -0
  33. {nexus_framework-0.2.0 → nexus_framework-0.2.2}/nexus/db/__init__.py +0 -0
  34. {nexus_framework-0.2.0 → nexus_framework-0.2.2}/nexus/db/auto.py +0 -0
  35. {nexus_framework-0.2.0 → nexus_framework-0.2.2}/nexus/db/expert.py +0 -0
  36. {nexus_framework-0.2.0 → nexus_framework-0.2.2}/nexus/db/magic.py +0 -0
  37. {nexus_framework-0.2.0 → nexus_framework-0.2.2}/nexus/db/model.py +0 -0
  38. {nexus_framework-0.2.0 → nexus_framework-0.2.2}/nexus/db/session.py +0 -0
  39. {nexus_framework-0.2.0 → nexus_framework-0.2.2}/nexus/db/sync.py +0 -0
  40. {nexus_framework-0.2.0 → nexus_framework-0.2.2}/nexus/deployment.py +0 -0
  41. {nexus_framework-0.2.0 → nexus_framework-0.2.2}/nexus/logging/__init__.py +0 -0
  42. {nexus_framework-0.2.0 → nexus_framework-0.2.2}/nexus/logging/logger.py +0 -0
  43. {nexus_framework-0.2.0 → nexus_framework-0.2.2}/nexus/magic/__init__.py +0 -0
  44. {nexus_framework-0.2.0 → nexus_framework-0.2.2}/nexus/magic/injector.py +0 -0
  45. {nexus_framework-0.2.0 → nexus_framework-0.2.2}/nexus/magic/introspect.py +0 -0
  46. {nexus_framework-0.2.0 → nexus_framework-0.2.2}/nexus/observability.py +0 -0
  47. {nexus_framework-0.2.0 → nexus_framework-0.2.2}/nexus/plugins/__init__.py +0 -0
  48. {nexus_framework-0.2.0 → nexus_framework-0.2.2}/nexus/py.typed +0 -0
  49. {nexus_framework-0.2.0 → nexus_framework-0.2.2}/nexus/testing.py +0 -0
  50. {nexus_framework-0.2.0 → nexus_framework-0.2.2}/nexus/web/__init__.py +0 -0
  51. {nexus_framework-0.2.0 → nexus_framework-0.2.2}/nexus/web/asgi.py +0 -0
  52. {nexus_framework-0.2.0 → nexus_framework-0.2.2}/nexus/web/auth.py +0 -0
  53. {nexus_framework-0.2.0 → nexus_framework-0.2.2}/nexus/web/background.py +0 -0
  54. {nexus_framework-0.2.0 → nexus_framework-0.2.2}/nexus/web/cookies.py +0 -0
  55. {nexus_framework-0.2.0 → nexus_framework-0.2.2}/nexus/web/debugger.py +0 -0
  56. {nexus_framework-0.2.0 → nexus_framework-0.2.2}/nexus/web/idempotency.py +0 -0
  57. {nexus_framework-0.2.0 → nexus_framework-0.2.2}/nexus/web/lifespan.py +0 -0
  58. {nexus_framework-0.2.0 → nexus_framework-0.2.2}/nexus/web/middlewares.py +0 -0
  59. {nexus_framework-0.2.0 → nexus_framework-0.2.2}/nexus/web/openapi.py +0 -0
  60. {nexus_framework-0.2.0 → nexus_framework-0.2.2}/nexus/web/pagination.py +0 -0
  61. {nexus_framework-0.2.0 → nexus_framework-0.2.2}/nexus/web/security.py +0 -0
  62. {nexus_framework-0.2.0 → nexus_framework-0.2.2}/nexus/web/session.py +0 -0
  63. {nexus_framework-0.2.0 → nexus_framework-0.2.2}/nexus/web/sse.py +0 -0
  64. {nexus_framework-0.2.0 → nexus_framework-0.2.2}/nexus/web/staticfiles.py +0 -0
  65. {nexus_framework-0.2.0 → nexus_framework-0.2.2}/nexus/web/template/__init__.py +0 -0
  66. {nexus_framework-0.2.0 → nexus_framework-0.2.2}/nexus/web/template/compiler.py +0 -0
  67. {nexus_framework-0.2.0 → nexus_framework-0.2.2}/nexus/web/template/filters.py +0 -0
  68. {nexus_framework-0.2.0 → nexus_framework-0.2.2}/nexus/web/template/lexer.py +0 -0
  69. {nexus_framework-0.2.0 → nexus_framework-0.2.2}/nexus/web/template/parser.py +0 -0
  70. {nexus_framework-0.2.0 → nexus_framework-0.2.2}/nexus/web/upload.py +0 -0
  71. {nexus_framework-0.2.0 → nexus_framework-0.2.2}/nexus/web/validation.py +0 -0
  72. {nexus_framework-0.2.0 → nexus_framework-0.2.2}/nexus/web/websocket.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: nexus-framework
3
- Version: 0.2.0
3
+ Version: 0.2.2
4
4
  Summary: Ultimate Simplicity, Uncompromising Power. Next-Gen Python Framework for Web, Data, and AI.
5
5
  Project-URL: Homepage, https://github.com/nexus-framework/nexus
6
6
  Project-URL: Documentation, https://github.com/nexus-framework/nexus#readme
@@ -110,7 +110,7 @@ from nexus.web.template.engine import NXEngine
110
110
  from nexus.web.upload import UploadFile
111
111
  from nexus.web.websocket import WebSocket, WebSocketDisconnect, WebSocketGroup
112
112
 
113
- __version__ = "0.2.0"
113
+ __version__ = "0.2.2"
114
114
 
115
115
  __all__ = [
116
116
  "LLM",
@@ -116,12 +116,12 @@ def _handle_check(_args: argparse.Namespace, stdout: Any = sys.stdout, **_kwargs
116
116
 
117
117
  print("\nRunning Nexus Production Readiness Checklist...", file=stdout)
118
118
  settings = NexusSettings()
119
- print(f"✓ Environment: {settings.env}", file=stdout)
120
- print(f"✓ Debug mode: {settings.debug}", file=stdout)
119
+ print(f"[OK] Environment: {settings.env}", file=stdout)
120
+ print(f"[OK] Debug mode: {settings.debug}", file=stdout)
121
121
  key_status = "Yes" if len(settings.secret_key) >= 16 else "Warning (too short)"
122
- print(f"✓ Secret key configured: {key_status}", file=stdout)
123
- print(f"✓ Database URL: {settings.database_url}", file=stdout)
124
- print("✓ Observability probes: /metrics, /health, /ready active", file=stdout)
122
+ print(f"[OK] Secret key configured: {key_status}", file=stdout)
123
+ print(f"[OK] Database URL: {settings.database_url}", file=stdout)
124
+ print("[OK] Observability probes: /metrics, /health, /ready active", file=stdout)
125
125
  print("All production baseline checks passed successfully.\n", file=stdout)
126
126
  return 0
127
127
 
@@ -155,7 +155,7 @@ def _handle_shell(
155
155
 
156
156
  app_target: str = getattr(args, "app", "app:create_app")
157
157
  banner_lines = [
158
- "\n🚀 Nexus Interactive Developer Shell",
158
+ "\n[Nexus] Interactive Developer Shell",
159
159
  "Type 'app', 'nexus', 'db', or 'models' to inspect components.",
160
160
  "Press Ctrl+D or type exit() to leave.\n",
161
161
  ]
@@ -204,25 +204,25 @@ def _handle_db(
204
204
  settings = NexusSettings()
205
205
 
206
206
  if action == "init":
207
- print("✓ Initializing migration environment for Nexus...", file=stdout)
208
- print(f"✓ Target database: {settings.database_url}", file=stdout)
209
- print("✓ Migration versions directory verified.", file=stdout)
207
+ print("[OK] Initializing migration environment for Nexus...", file=stdout)
208
+ print(f"[OK] Target database: {settings.database_url}", file=stdout)
209
+ print("[OK] Migration versions directory verified.", file=stdout)
210
210
  return 0
211
211
 
212
212
  if action == "migrate":
213
213
  msg = getattr(args, "message", "auto_migration")
214
214
  print(f"Scanning models for schema diffs (message: '{msg}')...", file=stdout)
215
- print("✓ Generated migration script: versions/0001_auto_migration.py", file=stdout)
215
+ print("[OK] Generated migration script: versions/0001_auto_migration.py", file=stdout)
216
216
  return 0
217
217
 
218
218
  if action == "apply":
219
219
  print(f"Applying pending migrations against {settings.database_url}...", file=stdout)
220
- print("✓ All migrations successfully applied.", file=stdout)
220
+ print("[OK] All migrations successfully applied.", file=stdout)
221
221
  return 0
222
222
 
223
223
  if action == "rollback":
224
224
  print(f"Rolling back last migration on {settings.database_url}...", file=stdout)
225
- print("✓ Rollback complete.", file=stdout)
225
+ print("[OK] Rollback complete.", file=stdout)
226
226
  return 0
227
227
 
228
228
  # Default action: check
@@ -231,13 +231,149 @@ def _handle_db(
231
231
  return 0
232
232
 
233
233
 
234
- def _handle_init(args: argparse.Namespace, stdout: Any = sys.stdout, **_kwargs: Any) -> int:
234
+ NEXUS_BANNER_HELP = """
235
+ ==============================================================================
236
+ NEXUS FRAMEWORK CLI
237
+ Ultimate Simplicity, Uncompromising Power (v0.2.2)
238
+ ==============================================================================
239
+
240
+ Usage:
241
+ nexus <command> [options] [arguments]
242
+
243
+ COMMANDS:
244
+
245
+ PROJECT INITIALIZATION:
246
+ init [name] [-t template] [--here] Scaffold a new Nexus project (interactive)
247
+ new [name] [-t template] [--here] Alias for nexus init
248
+
249
+ SERVER & DEVELOPMENT:
250
+ dev [target] [--host H] [-p PORT] Start development server with auto-reload
251
+ run [target] [--host H] [-p PORT] Start production server (multi-worker)
252
+ routes [app] List all registered application URL routes
253
+ shell [app] Launch interactive Python REPL with app context
254
+
255
+ DATABASE & MIGRATIONS:
256
+ db check Check database connection & configuration
257
+ db init Initialize database migrations directory
258
+ db migrate [-m "msg"] Auto-detect model changes and generate migration
259
+ db apply Apply pending database migrations
260
+ db rollback Rollback the last applied migration
261
+
262
+ DATA PIPELINES:
263
+ pipeline list List all registered data pipelines
264
+ pipeline run <name> Execute a registered data pipeline
265
+
266
+ ARTIFICIAL INTELLIGENCE:
267
+ ai test [--model M] [--prompt P] Query and test an AI model prompt
268
+
269
+ PRODUCTION & DIAGNOSTICS:
270
+ check Run production readiness checklist scan
271
+ dockerfile [--port P] [--workers W] Generate production multi-stage Dockerfile
272
+
273
+ TEMPLATES AVAILABLE:
274
+ web (default) Full-stack MVC with HTML templates, REST APIs, & ActiveRecord
275
+ minimal Lightweight single-file microservice
276
+ ai Autonomous Agent with LLM tools, vector memory, & chat API
277
+ data High-throughput ETL data pipeline & DataFrame engine
278
+ full Enterprise multi-domain stack (Web + DB + Data + AI)
279
+
280
+ EXAMPLES:
281
+ nexus init . -t web # Scaffold in current directory
282
+ nexus init # Interactive wizard prompt
283
+ nexus dev # Run server with hot-reload from root
284
+ nexus routes # Inspect all application routes
285
+ nexus db migrate -m "add user table" # Generate migration diff
286
+ ==============================================================================
287
+ """
288
+
289
+
290
+ def _prompt_user(prompt_text: str, stdout: Any = sys.stdout, stdin: Any = sys.stdin) -> str:
291
+ print(prompt_text, end="", file=stdout, flush=True)
292
+ if hasattr(stdin, "readline"):
293
+ val = stdin.readline()
294
+ if not val:
295
+ raise EOFError
296
+ return str(val.strip())
297
+ return input().strip()
298
+
299
+
300
+ def _handle_init(
301
+ args: argparse.Namespace,
302
+ stdout: Any = sys.stdout,
303
+ stderr: Any = sys.stderr,
304
+ stdin: Any = sys.stdin,
305
+ **_kwargs: Any,
306
+ ) -> int:
307
+ _ = stderr
235
308
  from nexus.scaffolding import scaffold_project
236
309
 
237
- project_name = getattr(args, "name", None) or "my_nexus_app"
238
- if getattr(args, "here", False):
310
+ project_name = getattr(args, "name", None)
311
+ template = getattr(args, "template", None)
312
+ here = getattr(args, "here", False)
313
+
314
+ is_interactive = (hasattr(stdin, "isatty") and stdin.isatty()) or getattr(
315
+ stdin, "_force_interactive", False
316
+ )
317
+
318
+ # 1. Resolve target directory / project name
319
+ if here:
239
320
  project_name = "."
240
- template = getattr(args, "template", "web").lower()
321
+ elif project_name is None:
322
+ if is_interactive:
323
+ print("\n=== Nexus Project Initializer ===", file=stdout)
324
+ try:
325
+ entered = _prompt_user(
326
+ "Enter project directory name (press Enter for current directory '.'): ",
327
+ stdout=stdout,
328
+ stdin=stdin,
329
+ )
330
+ except (EOFError, KeyboardInterrupt):
331
+ print("\nOperation cancelled.", file=stdout)
332
+ return 1
333
+ project_name = entered if entered else "."
334
+ else:
335
+ project_name = "."
336
+
337
+ # 2. Resolve template choice
338
+ if template is None:
339
+ if is_interactive:
340
+ print("\nSelect a project architecture template:", file=stdout)
341
+ print(
342
+ " [1] Web - Full MVC with HTML templates, REST API, & ORM [Default]",
343
+ file=stdout,
344
+ )
345
+ print(" [2] Minimal - Lightweight single-file microservice", file=stdout)
346
+ print(" [3] AI - Autonomous AI Agent with LLMs & tools", file=stdout)
347
+ print(" [4] Data - High-speed ETL pipeline & DataFrame engine", file=stdout)
348
+ print(" [5] Full - Unified Enterprise Stack (Web + DB + Data + AI)", file=stdout)
349
+ try:
350
+ choice = _prompt_user(
351
+ "\nEnter choice [1-5 or name] (default: 1): ",
352
+ stdout=stdout,
353
+ stdin=stdin,
354
+ ).lower()
355
+ except (EOFError, KeyboardInterrupt):
356
+ print("\nOperation cancelled.", file=stdout)
357
+ return 1
358
+
359
+ choice_map = {
360
+ "1": "web",
361
+ "web": "web",
362
+ "2": "minimal",
363
+ "minimal": "minimal",
364
+ "3": "ai",
365
+ "ai": "ai",
366
+ "4": "data",
367
+ "data": "data",
368
+ "5": "full",
369
+ "full": "full",
370
+ }
371
+ template = choice_map.get(choice, "web")
372
+ else:
373
+ template = "web"
374
+ else:
375
+ template = template.lower()
376
+
241
377
  return scaffold_project(template=template, project_name=project_name, stdout=stdout)
242
378
 
243
379
 
@@ -313,7 +449,7 @@ def _handle_server_start(
313
449
  return 1
314
450
 
315
451
  mode = "development (with hot-reload)" if reload else f"production ({workers} workers)"
316
- print(f"🚀 Launching Nexus {mode} on http://{host}:{port} ...", file=stdout)
452
+ print(f"[Nexus] Launching {mode} on http://{host}:{port} ...", file=stdout)
317
453
  try:
318
454
  run_app(app_target, host=host, port=port, reload=reload, workers=workers)
319
455
  return 0
@@ -338,8 +474,14 @@ def main(
338
474
  argv: list[str] | None = None,
339
475
  stdout: Any = sys.stdout,
340
476
  stderr: Any = sys.stderr,
477
+ stdin: Any = sys.stdin,
341
478
  ) -> int:
342
479
  """Main CLI entrypoint for Nexus."""
480
+ raw_args = sys.argv[1:] if argv is None else argv
481
+ if not raw_args or (len(raw_args) == 1 and raw_args[0] in ("-h", "--help", "help")):
482
+ print(NEXUS_BANNER_HELP.strip(), file=stdout)
483
+ return 0
484
+
343
485
  parser = argparse.ArgumentParser(
344
486
  prog="nexus",
345
487
  description="Nexus Next-Gen Python Framework CLI",
@@ -354,7 +496,7 @@ def main(
354
496
  init_p.add_argument(
355
497
  "name",
356
498
  nargs="?",
357
- default="my_nexus_app",
499
+ default=None,
358
500
  help="Project directory name (or '.' for current directory)",
359
501
  )
360
502
  init_p.add_argument(
@@ -366,8 +508,8 @@ def main(
366
508
  "-t",
367
509
  "--template",
368
510
  choices=["minimal", "web", "data", "ai", "full"],
369
- default="web",
370
- help="Project architecture template (default: web)",
511
+ default=None,
512
+ help="Project architecture template (default: interactive prompt or web)",
371
513
  )
372
514
  init_p.set_defaults(handler=_handle_init)
373
515
 
@@ -462,9 +604,9 @@ def main(
462
604
  args = parser.parse_args(argv)
463
605
  handler: Any = getattr(args, "handler", None)
464
606
  if handler is not None:
465
- return int(handler(args, stdout=stdout, stderr=stderr))
607
+ return int(handler(args, stdout=stdout, stderr=stderr, stdin=stdin))
466
608
 
467
- parser.print_help(stdout)
609
+ print(NEXUS_BANNER_HELP.strip(), file=stdout)
468
610
  return 0
469
611
 
470
612
 
@@ -337,6 +337,11 @@ class Route:
337
337
  permissions: str | list[str] | tuple[str, ...] | None = None
338
338
  roles: str | list[str] | tuple[str, ...] | None = None
339
339
  cache: int | None = None
340
+ status_code: int | None = None
341
+ tags: list[str] | None = None
342
+ is_system: bool = False
343
+ override: bool = False
344
+ extra: dict[str, Any] = field(default_factory=dict)
340
345
 
341
346
  def __post_init__(self) -> None:
342
347
  if self.roles is not None and self.auth is None:
@@ -67,20 +67,23 @@ Visit http://127.0.0.1:8000
67
67
 
68
68
  if in_cwd:
69
69
  print(
70
- "\n🎉 Successfully created minimal Nexus project directly in current directory (.):",
70
+ "\n[SUCCESS] Created minimal Nexus project directly in current directory (.):",
71
71
  file=stdout,
72
72
  )
73
- print(" ├── main.py", file=stdout)
74
- print(" ├── README.md", file=stdout)
75
- print(" └── .gitignore\n", file=stdout)
73
+ print(" |-- main.py", file=stdout)
74
+ print(" |-- README.md", file=stdout)
75
+ print(" \\-- .gitignore\n", file=stdout)
76
76
  print("Next steps to run your app:", file=stdout)
77
77
  print(" nexus dev (Auto-reloading dev server directly from root!)", file=stdout)
78
78
  print(" # or: python main.py\n", file=stdout)
79
79
  else:
80
- print(f"\n🎉 Successfully created minimal Nexus project: {project_name}/", file=stdout)
81
- print(f" ├── {project_name}/main.py", file=stdout)
82
- print(f" ├── {project_name}/README.md", file=stdout)
83
- print(f" └── {project_name}/.gitignore\n", file=stdout)
80
+ print(
81
+ f"\n[SUCCESS] Successfully created minimal Nexus project: {project_name}/",
82
+ file=stdout,
83
+ )
84
+ print(f" |-- {project_name}/main.py", file=stdout)
85
+ print(f" |-- {project_name}/README.md", file=stdout)
86
+ print(f" \\-- {project_name}/.gitignore\n", file=stdout)
84
87
  print("Next steps to run your app:", file=stdout)
85
88
  print(
86
89
  f" nexus dev {project_name} (Run directly from root without entering directory!)",
@@ -493,41 +496,44 @@ SECRET_KEY=nexus-insecure-dev-secret-key-change-in-production
493
496
 
494
497
  if in_cwd:
495
498
  print(
496
- "\n🎉 Created modular Nexus architecture in current directory (.):",
499
+ "\n[SUCCESS] Created modular Nexus architecture in current directory (.):",
497
500
  file=stdout,
498
501
  )
499
- print(" ├── main.py (Server runner entrypoint)", file=stdout)
500
- print(" ├── .env (Environment settings)", file=stdout)
501
- print(" ├── .gitignore (Git ignore rules)", file=stdout)
502
- print(" └── app/ (Application package)", file=stdout)
503
- print(" ├── __init__.py (App factory with static mount)", file=stdout)
504
- print(" ├── models/item.py (ActiveRecord ORM Models)", file=stdout)
505
- print(" ├── routers/ (Separated Web & API routes)", file=stdout)
506
- print(" │ ├── web.py (HTML pages & templates)", file=stdout)
507
- print(" │ └── items.py (REST API CRUD endpoints)", file=stdout)
508
- print(" ├── services/audit.py (Background logic & workers)", file=stdout)
509
- print(" ├── templates/index.html (HTML landing page)", file=stdout)
510
- print(" └── static/css/style.css (Static CSS styling)\n", file=stdout)
502
+ print(" |-- main.py (Server runner entrypoint)", file=stdout)
503
+ print(" |-- .env (Environment settings)", file=stdout)
504
+ print(" |-- .gitignore (Git ignore rules)", file=stdout)
505
+ print(" \\-- app/ (Application package)", file=stdout)
506
+ print(" |-- __init__.py (App factory with static mount)", file=stdout)
507
+ print(" |-- models/item.py (ActiveRecord ORM Models)", file=stdout)
508
+ print(" |-- routers/ (Separated Web & API routes)", file=stdout)
509
+ print(" | |-- web.py (HTML pages & templates)", file=stdout)
510
+ print(" | \\-- items.py (REST API CRUD endpoints)", file=stdout)
511
+ print(" |-- services/audit.py (Background logic & workers)", file=stdout)
512
+ print(" |-- templates/index.html (HTML landing page)", file=stdout)
513
+ print(" \\-- static/css/style.css (Static CSS styling)\n", file=stdout)
511
514
  print("Next steps to run your app:", file=stdout)
512
515
  print(" nexus dev (Auto-reloading dev server directly from root!)", file=stdout)
513
516
  print(" # or: python main.py\n", file=stdout)
514
517
  print("Open http://127.0.0.1:8000 in your browser (or /docs for Swagger UI)!", file=stdout)
515
518
  else:
516
- print(f"\n🎉 Successfully created modular Nexus architecture: {project_name}/", file=stdout)
517
- print(f" ├── {project_name}/main.py (Server runner)", file=stdout)
518
- print(f" ├── {project_name}/.env (Environment settings)", file=stdout)
519
- print(f" ├── {project_name}/.gitignore (Git ignore rules)", file=stdout)
520
- print(f" └── {project_name}/app/ (Application package)", file=stdout)
521
519
  print(
522
- " ├── __init__.py (App factory with static mount)", file=stdout
520
+ f"\n[SUCCESS] Successfully created modular Nexus architecture: {project_name}/",
521
+ file=stdout,
522
+ )
523
+ print(f" |-- {project_name}/main.py (Server runner)", file=stdout)
524
+ print(f" |-- {project_name}/.env (Environment settings)", file=stdout)
525
+ print(f" |-- {project_name}/.gitignore (Git ignore rules)", file=stdout)
526
+ print(f" \\-- {project_name}/app/ (Application package)", file=stdout)
527
+ print(
528
+ " |-- __init__.py (App factory with static mount)", file=stdout
523
529
  )
524
- print(" ├── models/item.py (ActiveRecord ORM Models)", file=stdout)
525
- print(" ├── routers/ (Separated Web & API routes)", file=stdout)
526
- print(" │ ├── web.py (HTML pages & templates)", file=stdout)
527
- print(" │ └── items.py (REST API CRUD endpoints)", file=stdout)
528
- print(" ├── services/audit.py (Background logic & workers)", file=stdout)
529
- print(" ├── templates/index.html (HTML landing page)", file=stdout)
530
- print(" └── static/css/style.css (Static CSS styling)\n", file=stdout)
530
+ print(" |-- models/item.py (ActiveRecord ORM Models)", file=stdout)
531
+ print(" |-- routers/ (Separated Web & API routes)", file=stdout)
532
+ print(" | |-- web.py (HTML pages & templates)", file=stdout)
533
+ print(" | \\-- items.py (REST API CRUD endpoints)", file=stdout)
534
+ print(" |-- services/audit.py (Background logic & workers)", file=stdout)
535
+ print(" |-- templates/index.html (HTML landing page)", file=stdout)
536
+ print(" \\-- static/css/style.css (Static CSS styling)\n", file=stdout)
531
537
  print("Next steps to run your app:", file=stdout)
532
538
  print(
533
539
  f" nexus dev {project_name} (Run from root without entering folder!)",
@@ -565,7 +571,7 @@ async def run_all() -> None:
565
571
  if pipe:
566
572
  res = await pipe.run()
567
573
  cnt = len(res) if hasattr(res, "__len__") else 0
568
- print(f"✓ Pipeline '{name}' completed. Processed {cnt} records.")
574
+ print(f"[OK] Pipeline '{name}' completed. Processed {cnt} records.")
569
575
 
570
576
 
571
577
  if __name__ == "__main__":
@@ -654,20 +660,21 @@ class PipelineMetric(Model):
654
660
 
655
661
  if in_cwd:
656
662
  print(
657
- "\n🎉 Created Nexus Data Pipeline in current directory (.):",
663
+ "\n[SUCCESS] Created Nexus Data Pipeline in current directory (.):",
658
664
  file=stdout,
659
665
  )
660
- print(" ├── main.py", file=stdout)
661
- print(" └── app/pipelines/sample_etl.py\n", file=stdout)
666
+ print(" |-- main.py", file=stdout)
667
+ print(" \\-- app/pipelines/sample_etl.py\n", file=stdout)
662
668
  print("Next steps to run your pipeline:", file=stdout)
663
669
  print(" nexus dev (Auto-reloading dev server directly from root!)", file=stdout)
664
670
  print(" # or: python main.py\n", file=stdout)
665
671
  else:
666
672
  print(
667
- f"\n🎉 Successfully created Nexus Data Pipeline project: {project_name}/", file=stdout
673
+ f"\n[SUCCESS] Created Nexus Data Pipeline project: {project_name}/",
674
+ file=stdout,
668
675
  )
669
- print(f" ├── {project_name}/main.py", file=stdout)
670
- print(f" └── {project_name}/app/pipelines/sample_etl.py\n", file=stdout)
676
+ print(f" |-- {project_name}/main.py", file=stdout)
677
+ print(f" \\-- {project_name}/app/pipelines/sample_etl.py\n", file=stdout)
671
678
  print("Next steps to run your pipeline:", file=stdout)
672
679
  print(
673
680
  f" nexus dev {project_name} (Run from root without entering folder!)",
@@ -786,20 +793,20 @@ async def chat_handler(payload: ChatRequest) -> NexusResponse:
786
793
 
787
794
  if in_cwd:
788
795
  print(
789
- "\n🎉 Successfully created Nexus AI project directly in current directory (.):",
796
+ "\n[SUCCESS] Successfully created Nexus AI project directly in current directory (.):",
790
797
  file=stdout,
791
798
  )
792
- print(" ├── main.py", file=stdout)
793
- print(" ├── app/agents/assistant.py", file=stdout)
794
- print(" └── app/routers/chat.py\n", file=stdout)
799
+ print(" |-- main.py", file=stdout)
800
+ print(" |-- app/agents/assistant.py", file=stdout)
801
+ print(" \\-- app/routers/chat.py\n", file=stdout)
795
802
  print("Next steps to run your AI app:", file=stdout)
796
803
  print(" nexus dev (Auto-reloading dev server directly from root!)", file=stdout)
797
804
  print(" # or: python main.py\n", file=stdout)
798
805
  else:
799
- print(f"\n🎉 Successfully created Nexus AI project: {project_name}/", file=stdout)
800
- print(f" ├── {project_name}/main.py", file=stdout)
801
- print(f" ├── {project_name}/app/agents/assistant.py", file=stdout)
802
- print(f" └── {project_name}/app/routers/chat.py\n", file=stdout)
806
+ print(f"\n[SUCCESS] Successfully created Nexus AI project: {project_name}/", file=stdout)
807
+ print(f" |-- {project_name}/main.py", file=stdout)
808
+ print(f" |-- {project_name}/app/agents/assistant.py", file=stdout)
809
+ print(f" \\-- {project_name}/app/routers/chat.py\n", file=stdout)
803
810
  print("Next steps to run your AI app:", file=stdout)
804
811
  print(
805
812
  f" nexus dev {project_name} (Run directly from root without entering folder!)",
@@ -952,18 +959,19 @@ def test_index() -> None:
952
959
 
953
960
  if in_cwd:
954
961
  print(
955
- "\n🎉 Created full enterprise Nexus project in current directory (.):",
962
+ "\n[SUCCESS] Created full enterprise Nexus project in current directory (.):",
956
963
  file=stdout,
957
964
  )
958
- print(" ├── main.py", file=stdout)
959
- print(" ├── Dockerfile", file=stdout)
960
- print(" └── tests/test_app.py\n", file=stdout)
965
+ print(" |-- main.py", file=stdout)
966
+ print(" |-- Dockerfile", file=stdout)
967
+ print(" \\-- tests/test_app.py\n", file=stdout)
961
968
  print("Next steps to run your app:", file=stdout)
962
969
  print(" nexus dev (Auto-reloading dev server directly from root!)", file=stdout)
963
970
  print(" # or: python main.py\n", file=stdout)
964
971
  else:
965
972
  print(
966
- f"\n🎉 Successfully created full enterprise Nexus project: {project_name}/", file=stdout
973
+ f"\n[SUCCESS] Created full enterprise Nexus project: {project_name}/",
974
+ file=stdout,
967
975
  )
968
976
  print("Next steps to run your app:", file=stdout)
969
977
  print(