p1d: enhance CLI Scaffolder — generated main.py example, protocol/db selection guides
swadhinbiswas committed 3 months ago
d7aadd9
1 parent 95b0cc4
commit d7aadd9
1 file changed
+74 -6
Showing 1 changed file+74-6
▼docs_site/src/content/docs/getting-started/cli-scaffolder.md
+74-6
| @@ -5,6 +5,15 @@ description: How to generate complete multi-database and multi-protocol project | ||
5 | 5 | |
6 | 6 | JustAPI features an interactive CLI project generator (`justapi create`) to scaffold complete applications with your choice of database and API architecture. |
7 | 7 | |
8 | +## Installation | |
9 | + | |
10 | +Ensure you have the CLI installed: | |
11 | + | |
12 | +```bash | |
13 | +cargo install justapi-cli | |
14 | +justapi --version | |
15 | +``` | |
16 | + | |
8 | 17 | ## Interactive Mode |
9 | 18 | |
10 | 19 | Run `justapi create` without arguments to launch the TTY interactive wizard: |
| @@ -14,12 +23,13 @@ justapi create my_app | ||
14 | 23 | ``` |
15 | 24 | |
16 | 25 | The wizard will prompt you to select: |
26 | + | |
17 | 27 | 1. **Database Engine:** SQLite, PostgreSQL, MySQL, DuckDB, ClickHouse, MongoDB, or Redis. |
18 | 28 | 2. **API Protocol:** REST (OpenAPI), GraphQL (GraphiQL), gRPC (Protobuf), or JSON-RPC 2.0. |
19 | 29 | |
20 | 30 | ## Command Line Flags |
21 | 31 | |
22 | -You can bypass the interactive wizard using `--db` and `--api-type` flags: | |
32 | +Bypass the interactive wizard for scripting or quick scaffolding: | |
23 | 33 | |
24 | 34 | ```bash |
25 | 35 | # REST API with DuckDB analytical engine |
| @@ -41,10 +51,68 @@ justapi create jsonrpc_api --db sqlite --api-type jsonrpc | ||
41 | 51 | my_app/ |
42 | 52 | ├── app/ |
43 | 53 | │ ├── __init__.py |
44 | - | |