Skip to content

Commit 7798ee7

Browse files
authored
[core] Add prelude module for convenient import (#47)
This PR adds a dedicated `argmojo.prelude` module intended to provide a single convenient import point for ArgMojo’s primary public types/traits. It introduces `src/argmojo/prelude.mojo` with re-exports for the builder API (`Argument`, `Command`, `ParseResult`) and declarative API (`Parsable`, `Option`, `Flag`, `Positional`, `Count`).
1 parent cfec876 commit 7798ee7

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

src/argmojo/prelude.mojo

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
"""Prelude module for ArgMojo.
2+
3+
Usage:
4+
5+
```mojo
6+
from argmojo.prelude import *
7+
```
8+
9+
This imports all public types and traits from ArgMojo for convenience.
10+
"""
11+
12+
# Builder API
13+
from .argument import Argument
14+
from .command import Command
15+
from .parse_result import ParseResult
16+
17+
# Declarative API
18+
from .parsable import Parsable
19+
from .argument_wrappers import Option, Flag, Positional, Count

0 commit comments

Comments
 (0)