FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

docs(cli): document codegen options in the CLI reference by abel05-droid · Pull Request #100 · pythonnative/pythonnative · GitHub

Repository navigation

Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .md  (1) All 1 file type selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
16 changes: 16 additions & 0 deletions docs/api/cli.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,22 @@ the documented behavior never drifts from the code.

## Subcommands

- `pn codegen`: generate native contract files and print each generated file's
path. Flag: `--output` to choose the output directory (default `generated`).
Repeat `--module` to import extension schema modules before generation; each
module must be importable by the Python interpreter running `pn`.

For example, generate contracts into an explicit temporary directory:

```bash
uv run pn codegen --output /tmp/pythonnative-contracts
```
This command generates contract files only. Native compilation and app
rebuilding happen as part of the build workflow. See
[Native contracts](../guides/native-contracts.md) for the extension workflow
and [Generated source and vendored dependencies](https://github.com/pythonnative/pythonnative/blob/main/CONTRIBUTING.md#generated-source-and-vendored-dependencies)
for repository contributor guidance.

- `pn init [name]`: scaffold a new project (creates `app/`,
`pythonnative.toml`, `.gitignore`). With a name it creates `./<name>/`
and scaffolds into it; the name must match `^[a-z][a-z0-9_-]*$`.
Expand Down
Loading

Back | FazBrowse Home | New Git URL