Skip to content

Instantly share code, notes, and snippets.

View possibilities's full-sized avatar

Mike Bannister possibilities

  • AI Life
  • Portland East
  • 18:31 (UTC -05:00)
View GitHub Profile

gen-queries.py: Random Selection + Scaled Questions

Replace LLM-based document selection with random selection, scaling questions by document size.

Constants

MIN_DOC_CHARS = 500
CHARS_PER_QUESTION = 500
MAX_QUESTIONS_PER_DOC = 8

gen-queries.py: pairctl Interaction Analysis

Looking at the script, there are 3 distinct pairctl interactions, all routed through a common helper.

Core Mechanism: ask_llm_for_json() (lines 153-213)

All pairctl calls flow through this helper which:

  1. Generates a unique /tmp/knowctl-{uuid}.json output path
  2. Constructs a prompt with TypeScript schema + instruction to write JSON to that file
  3. Calls pairctl send-message <prompt> --cli <cli> with 5-minute timeout
@possibilities
possibilities / searchctl-v2-summary.md
Created January 14, 2026 18:18
searchctl v2 redesign summary - compound subcommands for Perplexity API

searchctl v2 - Redesigned CLI for Perplexity API

New Subcommands

Command Model Use Case Cost
quick-search sonar Fast facts, simple Q&A ~$0.006/query
web-search sonar-pro Grounded Q&A with citations ~$0.01/query
pro-search sonar-pro + Pro Search Multi-step reasoning with tools ~$0.015-0.025/query
reason-search sonar-reasoning-pro Complex reasoning and analysis ~$0.01/query
@possibilities
possibilities / searchctl-redesign.md
Last active January 14, 2026 18:00
searchctl CLI redesign analysis for Perplexity API

searchctl CLI Redesign Analysis

Analysis Summary

Current searchctl Issues

  1. Confusing default behavior - Default query uses chat completions; raw is a hidden subcommand
  2. Flag overload - 15+ flags mixed together (model, context, mode, domains, dates, effort, media, etc.)
  3. Model complexity hidden - Four distinct models with different capabilities collapsed into one flag
  4. Pro Search absent - The new search_type: pro/auto feature isn't exposed
@possibilities
possibilities / searchctl-redesign.md
Created January 14, 2026 17:53
searchctl CLI redesign analysis for Perplexity API

searchctl CLI Redesign Analysis

Analysis Summary

Current searchctl Issues

  1. Confusing default behavior - Default query uses chat completions; raw is a hidden subcommand
  2. Flag overload - 15+ flags mixed together (model, context, mode, domains, dates, effort, media, etc.)
  3. Model complexity hidden - Four distinct models with different capabilities collapsed into one flag
  4. Pro Search absent - The new search_type: pro/auto feature isn't exposed
@possibilities
possibilities / cli-tools-reference.md
Created January 14, 2026 17:03
arthack-marketplace CLI tools help reference

arthack-marketplace CLI Tools Reference

Help output for all *ctl commands in the arthack-marketplace project.


aictl

AI chat management CLI. Manage conversations across multiple AI backends.

@possibilities
possibilities / gist:e91be7e8d0edff59b84ab3f3b7930d9d
Created January 14, 2026 16:53
arthack-marketplace CLI tools help reference
# arthack-marketplace CLI Tools Reference
Help output for all `*ctl` commands in the arthack-marketplace project.
---
## aictl
AI chat management CLI. Manage conversations across multiple AI backends.

Arthack Marketplace CLI Tools Help

aictl

usage: aictl [-h]  ...

AI chat management CLI. Manage conversations across multiple AI backends.

positional arguments: