{"id":29600734,"url":"https://github.com/chunghha/prompt-maker","last_synced_at":"2025-10-04T23:51:15.550Z","repository":{"id":302767851,"uuid":"1013550014","full_name":"chunghha/prompt-maker","owner":"chunghha","description":"A CLI tool to help you craft the perfect prompt for Gemini models using a two-step refinement process","archived":false,"fork":false,"pushed_at":"2025-07-31T22:01:17.000Z","size":184,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-01T00:42:14.669Z","etag":null,"topics":["bubbletea","daisyui","gemini","golang","htmx","templ"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/chunghha.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-07-04T05:01:10.000Z","updated_at":"2025-07-31T22:01:07.000Z","dependencies_parsed_at":"2025-07-04T06:21:34.532Z","dependency_job_id":"edc24aa9-c0ad-4e55-aa93-505621a09a4c","html_url":"https://github.com/chunghha/prompt-maker","commit_stats":null,"previous_names":["chunghha/prompt-maker"],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/chunghha/prompt-maker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chunghha%2Fprompt-maker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chunghha%2Fprompt-maker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chunghha%2Fprompt-maker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chunghha%2Fprompt-maker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chunghha","download_url":"https://codeload.github.com/chunghha/prompt-maker/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chunghha%2Fprompt-maker/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278391191,"owners_count":25978944,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-04T02:00:05.491Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bubbletea","daisyui","gemini","golang","htmx","templ"],"created_at":"2025-07-20T12:36:38.331Z","updated_at":"2025-10-04T23:51:15.530Z","avatar_url":"https://github.com/chunghha.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Prompt Maker\n\n**A CLI and Web tool to help you craft the perfect prompt for Gemini models using a two-step refinement process.**\n\n`prompt-maker` is an interactive application built with Go. It takes your rough idea for a prompt, sends it to a Gemini model with a specialized \"prompt optimization\" system prompt, and returns a beautifully crafted, detailed prompt. You can then review this new prompt and resubmit it to get your final, high-quality answer.\n\nIt can be run as a terminal application (using Bubble Tea) or as a web server (using Echo and HTMX).\n\n## Features\n\n*   **Dual-Mode Operation**: Use the polished terminal UI for quick command-line access or run it as a web server with an HTMX-powered interface.\n*   **Interactive Model Selection**: (TUI Mode) Choose from the latest Gemini models at startup.\n*   **Two-Step Prompt Refinement**:\n    1.  Provide a rough prompt.\n    2.  Receive a detailed, optimized prompt crafted by the AI.\n    3.  Resubmit the optimized prompt to get your final answer.\n*   **Polished Terminal UI**: A clean, full-screen interface built with the Bubble Tea framework.\n*   **Dynamic Versioning**: The application version is injected at build time for easy tracking.\n\n## Installation\n\n### Prerequisites\n\n*   Go (version 1.18 or newer is recommended).\n*   Git.\n\n### Building from Source\n\n1.  **Clone the repository:**\n    ```bash\n    git clone https://github.com/chunghha/prompt-maker.git\n    cd prompt-maker\n    ```\n\n2.  **Build the application:**\n    This project uses `Task` for simple build commands. If you have `Task` installed, you can build the project with:\n    ```bash\n    task build\n    ```\n    This will create a binary named `prompt_maker` in the project root.\n\n    Alternatively, you can use the standard Go build command:\n    ```bash\n    go build -ldflags=\"-X 'prompt-maker/cmd.version=1.0.1'\" -o prompt_maker .\n    ```\n\n3.  **Install (Optional):**\n    You can move the `prompt_maker` binary to a directory in your system's `PATH` for easy access.\n    ```bash\n    mv prompt_maker /usr/local/bin/\n    ```\n\n## Usage\n\n### 1. Configuration\n\nBefore running the application, you must set your Google AI API key as an environment variable:\n\n```bash\nexport GEMINI_API_KEY=\"your_google_ai_api_key\"\n```\n\n### 2. Running the Application\n\nYou can run the application in two modes:\n\n**TUI (Terminal) Mode**\n\nThis is the default mode. Execute the binary from your terminal:\n\n```bash\n./prompt_maker\n```\n\n**Web Mode**\n\nRun the application with the `--web` flag to start the web server.\n\n```bash\n./prompt_maker --web\n```\nOr, using the development task:\n```bash\ntask run:web\n```\nThen, open your browser and navigate to `http://localhost:8080`.\n\n### 3. Workflows\n\n#### TUI Workflow\n\n1.  **Select a Model**: Use the arrow keys to choose a Gemini model and press `Enter`.\n2.  **Enter a Rough Prompt**: Type your basic idea (e.g., \"an email to my boss asking for a raise\") and press `Enter`.\n3.  **Review the Crafted Prompt**: The application will display a detailed, optimized prompt.\n4.  **Resubmit or Edit**:\n    *   Press `r` to immediately resubmit the crafted prompt to get your final answer.\n    *   Alternatively, you can type a new prompt.\n5.  **Get the Final Answer**: The final response from the model will be displayed.\n6.  **Copy or Quit**:\n    *   Press `c` to copy the response to your clipboard.\n    *   Press `Enter` to start over or `esc` to quit.\n\n#### Web Workflow\n\n1.  **Enter a Rough Prompt**: Type your basic idea into the text area.\n2.  **Craft the Prompt**: Click the \"Craft Prompt\" button.\n3.  **Review the Crafted Prompt**: The detailed, optimized prompt will appear in the \"Response\" section.\n4.  **Resubmit**: Click the \"Resubmit to Get Final Answer\" button that appears below the crafted prompt.\n5.  **Get the Final Answer**: The final response from the model will replace the crafted prompt in the \"Response\" section.\n\n### TUI Keyboard Shortcuts\n\n| Key     | Action                                     | Context                               |\n| :------ | :----------------------------------------- | :------------------------------------ |\n| `Enter` | Submit prompt                              | When entering a rough prompt          |\n| `r`     | **R**esubmit the crafted prompt            | After a prompt has been crafted       |\n| `c`     | **C**opy the response to the clipboard     | After a prompt or answer is displayed |\n| `esc`   | Quit the application                       | At any time                           |\n\n## Development\n\nThis project uses `Taskfile.yml` to manage common development tasks.\n\n*   **Build the binary**: `task build`\n*   **Run the web server**: `task run:web`\n*   **Run all tests**: `task test`\n*   **Run linters**: `task lint`\n*   **Format the code**: `task format`\n*   **Install the binary**: `task install` (copies it to `~/bin/`)\n\n___\n\n### Credit\n\nThe core \"Lyra\" prompt optimization methodology was inspired by a post from Min Choi. [View the original post on X](https://x.com/minchoi/status/1940251597050646766).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchunghha%2Fprompt-maker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchunghha%2Fprompt-maker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchunghha%2Fprompt-maker/lists"}