40 lines
748 B
Markdown
40 lines
748 B
Markdown
# API Reference
|
|
|
|
## CLI Module
|
|
|
|
### `boilerplate.cli`
|
|
|
|
The main command-line interface module.
|
|
|
|
#### Functions
|
|
|
|
##### `main(name: str, count: int) -> None`
|
|
|
|
The main entry point for the CLI application.
|
|
|
|
**Parameters:**
|
|
- `name` (str): Name to greet (default: "World")
|
|
- `count` (int): Number of times to repeat the greeting (default: 1)
|
|
|
|
**Example:**
|
|
```python
|
|
from boilerplate.cli import main
|
|
from click.testing import CliRunner
|
|
|
|
runner = CliRunner()
|
|
result = runner.invoke(main, ["--name", "Alice", "--count", "2"])
|
|
print(result.output)
|
|
# Hello, Alice!
|
|
# Hello, Alice!
|
|
```
|
|
|
|
## Package Information
|
|
|
|
### `boilerplate.__version__`
|
|
|
|
The current version of the package.
|
|
|
|
```python
|
|
from boilerplate import __version__
|
|
print(__version__) # "0.1.0"
|
|
``` |