|
2 | 2 | from pathlib import Path |
3 | 3 | from time import perf_counter |
4 | 4 |
|
| 5 | +import click |
| 6 | + |
5 | 7 | from fastapi_forge.logger import logger |
6 | 8 | from fastapi_forge.project_io import ArtifactBuilder, create_fastapi_project_builder |
7 | 9 | from fastapi_forge.schemas import ProjectSpec |
@@ -76,7 +78,24 @@ async def build_fastapi_project( |
76 | 78 | await director.build(spec) |
77 | 79 |
|
78 | 80 | build_time = perf_counter() - start_time |
79 | | - logger.info(f"Project built successfully in {build_time:.2f} seconds.") |
| 81 | + logger.info(f"Project build completed in {build_time:.2f} seconds") |
| 82 | + |
| 83 | + click.secho("\n🎉 Project generated successfully !", fg="green", bold=True) |
| 84 | + click.echo("\n🚀 Next steps to get started:\n") |
| 85 | + |
| 86 | + steps = [ |
| 87 | + ("Navigate to your project directory", "cd your_project_name"), |
| 88 | + ("Start the development environment", "make up # or docker-compose up"), |
| 89 | + ("(Optional) Run tests", "make test"), |
| 90 | + ("Access the API documentation", "http://localhost:8000/docs"), |
| 91 | + ] |
| 92 | + |
| 93 | + for i, (desc, cmd) in enumerate(steps, 1): |
| 94 | + click.echo(f"{i}. {desc}:") |
| 95 | + click.secho(f" {cmd}", fg="cyan") |
| 96 | + |
| 97 | + click.echo("\n💡 Pro tip: Run 'make help' to see all available commands") |
| 98 | + click.secho("\n✨ Happy coding with your new FastAPI project!", fg="magenta") |
80 | 99 |
|
81 | 100 | except Exception as error: |
82 | 101 | logger.error(f"Project build failed: {error}") |
|
0 commit comments