Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions cllm/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@
import tomllib
from langchain_openai import ChatOpenAI
from langchain_core.prompts import (ChatPromptTemplate, FewShotChatMessagePromptTemplate)
from rich import print as rprint
from rich.progress import Progress, SpinnerColumn, TextColumn
from typing import Optional
import pyperclip

# version of the CLI
app = typer.Typer(help="Empower your CLI experience with a command search tool driven by LLM magic!",
Expand Down Expand Up @@ -87,6 +89,9 @@ def search(query : str):
output.content = output.content[4:]

typer.echo(output.content)
pyperclip.copy(output.content)
rprint("The command has been copied to [bold green]your clipboard 📋![/bold green]")


@app.callback()
def main(
Expand Down
12 changes: 11 additions & 1 deletion poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ python = "^3.10.9"
typer = {extras = ["all"], version = "^0.9.0"}
langchain-openai = "^0.0.5"
langchain-core = "^0.1.22"
pyperclip = "^1.8.2"


[build-system]
Expand Down