CLI Package
The lampe.cli package provides command-line interface functionality for the SDK.
Commands
lampe.cli.commands
describe
describe(repo: Path = typer.Option(..., exists=True, file_okay=False, dir_okay=True, readable=True), repo_full_name: str | None = typer.Option(None, help='Repository full name (e.g. owner/repo)'), base: str = typer.Option(..., help='Base commit SHA'), head: str = typer.Option(..., help='Head commit SHA'), title: str = typer.Option('Pull Request', help='PR title (local runs)'), output: str = typer.Option('auto', help='Output provider (auto|console|github|gitlab|bitbucket)'), variant: str = typer.Option('default', help='default|agentic'), files_exclude: list[str] | None = typer.Option(None, '--exclude'), files_reinclude: list[str] | None = typer.Option(None, '--reinclude'), truncation_tokens: int = typer.Option(DEFAULT_MAX_TOKENS, '--max-tokens'), timeout: int | None = typer.Option(None, '--timeout-seconds'), verbose: bool = typer.Option(False, '--verbose/--no-verbose'))
Generate a PR description and deliver it to the specified output provider.
Source code in packages/lampe-cli/src/lampe/cli/commands/describe.py
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 | |
healthcheck
healthcheck() -> None
Check if the CLI is healthy and can connect to GitHub.
Source code in packages/lampe-cli/src/lampe/cli/commands/healthcheck.py
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 | |
Orchestrators
lampe.cli.orchestrators
Providers
lampe.cli.providers
base
Provider(repository: Repository, pull_request: PullRequest)
Bases: ABC
Abstract provider for delivering workflow outputs.
Source code in packages/lampe-cli/src/lampe/cli/providers/base.py
34 35 36 | |
create_provider(provider_name: ProviderType | str, repository: Repository, pull_request: PullRequest) -> 'Provider'
staticmethod
Create a provider instance based on the specified type.
Source code in packages/lampe-cli/src/lampe/cli/providers/base.py
64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 | |
deliver_pr_description(payload: PRDescriptionPayload) -> None
abstractmethod
Deliver a PR description to the configured destination.
Source code in packages/lampe-cli/src/lampe/cli/providers/base.py
38 39 40 41 | |
detect_provider_type() -> ProviderType
staticmethod
Detect the appropriate provider type based on available environment variables.
Source code in packages/lampe-cli/src/lampe/cli/providers/base.py
43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 | |
ProviderType
Bases: StrEnum
Available provider types.
update_or_add_text_between_tags(text: str, new_text: str, feature: str) -> str
Update the text between the tags and with new_text. If the tags don't exist, add them at the bottom of the text. The tags and new_text are preserved in the output.
Source code in packages/lampe-cli/src/lampe/cli/providers/base.py
88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 | |
console
ConsoleProvider(repository: Repository, pull_request: PullRequest)
Bases: Provider
Console provider for delivering PR descriptions to stdout.
Source code in packages/lampe-cli/src/lampe/cli/providers/console.py
11 12 | |
deliver_pr_description(payload: PRDescriptionPayload) -> None
Print the PR description to console.
Source code in packages/lampe-cli/src/lampe/cli/providers/console.py
14 15 16 | |
github
GitHubProvider(repository: Repository, pull_request: PullRequest)
Bases: Provider
GitHub provider for delivering PR descriptions to GitHub API.
Source code in packages/lampe-cli/src/lampe/cli/providers/github.py
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | |
deliver_pr_description(payload: PRDescriptionPayload) -> None
Update the PR description on GitHub.
Source code in packages/lampe-cli/src/lampe/cli/providers/github.py
76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 | |