Skip to content

Instantly share code, notes, and snippets.

View dfinke's full-sized avatar

Doug Finke dfinke

View GitHub Profile
@dfinke
dfinke / Get-BootStrapPrompt.ps1
Created December 5, 2025 13:22
Generates prompt engineering best practices for specified AI models
#Requires -Modules PSAI
function Get-BootStrapPrompt {
<#
.SYNOPSIS
Generates prompt engineering best practices for specified AI models.
.DESCRIPTION
For each AI model in the FavoriteAI array, this function uses an agent to research and produce
#>
param(
@dfinke
dfinke / PSChatBot.ps1
Created December 2, 2025 20:19
Interactive PowerShell AI Chat Script
#Requires -Module PSAISuite
# Install-Module PSAISuite
$messages = @()
while ($true) {
$userQuery = Read-Host "User"
$messages += @{ role = "user"; content = $userQuery }
@dfinke
dfinke / New-JiraTicket.ps1
Last active September 28, 2025 22:03
One-Shot JIRA Ticket Generator with PowerShell and PSAISuite
#Requires -Module PSAISuite
$feature = 'Implement a GO program to chat with OpenAI models'
$prompt = @'
Based on this engineering spec for `{0}`, write a JIRA ticket that includes:
- problem statement
- context
- goals
@dfinke
dfinke / Find-Date.ps1
Last active August 9, 2025 17:13
A PowerShell function that uses GPT to parse questions like 'a week ago' or 'in July' into precise YYYY-MM-DD formats.
#Requires -Module PSAISuite
function Find-Date {
param(
[string]$question,
[string]$model = 'github:openai/gpt-4.1'
)
$instructions = @"
Current Date: $(Get-Date -Format "yyyy-MM-dd")
@dfinke
dfinke / cli.md
Last active August 1, 2025 17:20
AI CLI Tool Provider Open Source Key Features Cost/Access Unique Aspects Link
Gemini CLI Google Yes (Apache 2.0) Code generation, debugging, file system interaction, real-time web search, task automation, supports large codebases with 1M token context window. Free tier: 60 requests/min, 1,000/day with Google a
@dfinke
dfinke / Todo.ps1
Last active July 27, 2025 17:23
AI-Powered To-Do List in PowerShell
# using psaisuite
# Ensure PSAISuite is available
#Requires -Module PSAISuite
<#
.SYNOPSIS
Outputs text using the 'glow' markdown renderer if available, otherwise falls back to Write-Host.
.DESCRIPTION
This function checks if the 'glow' command is available. If so, it pipes the input to 'glow' for rich markdown rendering. Otherwise, it outputs the text using Write-Host.
# 📦 Install-Module: PSAISuite
# 🔗https://github.com/dfinke/psaisuite
# Get-ChatProviders
# PSAISuite supports 13 providers, and their models.
# $model = "github:openai/gpt-4.1"
$model = "anthropic:claude-opus-4-20250514"
param(
[int]$Year = (Get-Date).Year,
[int]$Month = (Get-Date).Month
)
# Set up day names
$days = @("Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat")
# Print header
Write-Host ""
$Inst = @"
You are powershell expert and an Excel expert and a ImportExcel expert.
I want to create an Excel template. I'll provide you with all the options to
include in the template, and when I have finished,
you'll format it as an .xlsx file to be saved in the current directory.
just the code, no explanation, no comments, no markdown, no fence blocks
"@
#Requires -Module PSAISuite
# Step 1: Generate PowerShell function from a prompt (Model A - GPT-4)
$genPrompt = @"
You're a PowerShell expert.
Write a function that takes a CSV file and creates an Excel file using ImportExcel module.
Return only the code.
"@