This commit is contained in:
22
app/src/promptforge/cli/main.py
Normal file
22
app/src/promptforge/cli/main.py
Normal file
@@ -0,0 +1,22 @@
|
||||
import click
|
||||
from pathlib import Path
|
||||
|
||||
from promptforge import __version__
|
||||
|
||||
|
||||
@click.group()
|
||||
@click.version_option(version=__version__, prog_name="PromptForge")
|
||||
@click.option(
|
||||
"--prompts-dir",
|
||||
type=click.Path(exists=False, file_okay=False, dir_okay=True, path_type=Path),
|
||||
help="Directory containing prompts",
|
||||
)
|
||||
@click.pass_context
|
||||
def main(ctx: click.Context, prompts_dir: Path):
|
||||
"""PromptForge - AI Prompt Versioning, Testing & Registry."""
|
||||
ctx.ensure_object(dict)
|
||||
ctx.obj["prompts_dir"] = prompts_dir or Path.cwd() / "prompts"
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
Reference in New Issue
Block a user