repositories / dotfiles

dotfiles

bugabingas dorkfiles

owned by bugabinga

nushell: proquints fun and printer tui

58919a4de87a1032c8074606ef757e0ccbe6dcd8

Oliver Jan Krylow <oliver@bugabinga.net> ·

SSH signature · not checked

Browse filesCompare with HEAD

Changed files (6)

nushell/login.nu

Modified
1 1 use prompt.nu
2 +use proquint.nu
2 3 use sy.nu
3 4 use wezterm_integration.nu
4 5 use md.nu
6 7 use ssh.nu *
7 8 use vim.nu
8 9 use btrfs.nu
10 +use printer.nu
9 11 use start.nu
10 12 use dwnld.nu
11 13 use notes.nu

nushell/modules/printer.nu

Added
new file mode 100644
1 +def run-command [command: string, args: list<string>] {
2 + let result = (run-external $command ...$args | complete)
3 + {
4 + ok: ($result.exit_code == 0)
5 + output: ($result.stdout | str trim)
6 + error: ($result.stderr | str trim)
7 + }
8 +}
10 +def first-line [text: string] {
11 + let line = ($text | lines | first)
12 + if $line == null { "" } else { $line }
15 +def style [text: string, color: string] {
16 + $"(ansi $color)($text)(ansi reset)"
19 +def screen [] {
20 + print -n $"(ansi cls)(ansi home)"
23 +def key [] {
24 + let event = (input listen --types [key])
25 + $event.code
28 +def default-printer [] {
29 + let result = (run-command "lpstat" ["-d"])
30 + if not $result.ok { return "" }
32 + try {
33 + $result.output
34 + | parse --regex '^system default destination: (?<name>\S+)$'
35 + | get 0.name
36 + } catch { "" }
39 +def printer-names [] {
40 + let result = (run-command "lpstat" ["-p"])
41 + if not $result.ok {
42 + error make {msg: ($result.error | default "lpstat failed")}
43 + }
45 + $result.output
46 + | lines
47 + | where {|line| $line | str starts-with "printer "}
48 + | each {|line|
49 + try {
50 + $line
51 + | parse --regex '^printer (?<name>\S+) (?<summary>.*)$'
52 + | get 0.name
53 + } catch { null }
54 + }
55 + | where {|name| $name != null}
58 +def printer-summary [name: string] {
59 + let result = (run-command "lpstat" ["-p" $name])
60 + let line = (first-line $result.output)
61 + try {
62 + $line
63 + | parse --regex '^printer \S+ (?<summary>.*)$'
64 + | get 0.summary
65 + } catch {
66 + if $result.error == "" { $line } else { $result.error }
67 + }
70 +def printer-acceptance [name: string] {
71 + let result = (run-command "lpstat" ["-a" $name])
72 + let line = (first-line $result.output)
73 + if $line == "" { $result.error } else { $line }
76 +def printer-device [name: string] {
77 + let result = (run-command "lpstat" ["-v" $name])
78 + try {
79 + $result.output
80 + | parse --regex '^device for \S+: (?<device>.*)$'
81 + | get 0.device
82 + } catch { "" }
85 +def printer-alerts [name: string] {
86 + let result = (run-command "lpstat" ["-l" "-p" $name])
87 + $result.output
88 + | lines
89 + | each {|line| $line | str trim}
90 + | where {|line| $line | str starts-with "Alerts:"}
91 + | each {|line| $line | str replace "Alerts: " ""}
92 + | str join ", "
95 +def printer-jobs [name: string] {
96 + let result = (run-command "lpstat" ["-o" $name])
97 + if $result.output == "" { [] } else { $result.output | lines }
100 +def ipp-value [xml: string, field: string] {
101 + let lines = ($xml | lines)
102 + let marker = $"<key>($field)</key>"
103 + let matches = ($lines | enumerate | where item == $marker)
104 + if ($matches | is-empty) { return "" }
106 + let raw = ($lines | get (($matches | get 0 | get index) + 1) | str trim)
107 + if ($raw | str contains "<true") { "true" } else if ($raw | str contains "<false") { "false" } else {
108 + $raw | str replace --regex '^<[^>]+>(.*)</[^>]+>$' '$1'
112 +def printer-ipp [name: string] {
113 + let result = (run-command "ipptool" ["-q" "-X" "-T" "3" $"ipp://localhost/printers/($name)" "get-printer-attributes.test"])
114 + if not $result.ok { return {} }
117 + state: (ipp-value $result.output "printer-state")
118 + accepting: (ipp-value $result.output "printer-is-accepting-jobs")
119 + reasons: (ipp-value $result.output "printer-state-reasons")
120 + message: (ipp-value $result.output "printer-state-message")
121 + jobs: (ipp-value $result.output "queued-job-count")
125 +def printer-logs [name: string] {
126 + let files = (try { glob "/var/log/cups/error_log*" } catch { [] })
127 + $files
128 + | each {|file|
129 + try {
130 + open --raw $file
131 + | lines
132 + | where {|line| $line | str contains $name}
133 + } catch { [] }
135 + | flatten
136 + | last 12
139 +def printer-network [device: string] {
140 + if not (($device | str starts-with "ipp://") or ($device | str starts-with "ipps://")) {
141 + return "n/a"
144 + let result = (run-command "ipptool" ["-q" "-t" "-T" "3" $device "get-printer-attributes.test"])
145 + if $result.ok { "reachable" } else { "unreachable" }
148 +def printer-record [name: string] {
149 + let device = (printer-device $name)
150 + let ipp = (printer-ipp $name)
152 + name: $name
153 + summary: (printer-summary $name)
154 + acceptance: (printer-acceptance $name)
155 + device: $device
156 + alerts: (printer-alerts $name)
157 + jobs: (printer-jobs $name)
158 + ipp: $ipp
159 + network: (printer-network $device)
160 + logs: (printer-logs $name)
164 +def state-label [summary: string] {
165 + let lower = ($summary | str lowercase)
166 + if ($lower | str contains "disabled") or ($lower | str contains "stopped") or ($lower | str contains "error") {
167 + style "● DISABLED" "red_bold"
168 + } else if ($lower | str contains "printing") {
169 + style "● PRINTING" "yellow_bold"
170 + } else {
171 + style "● READY" "green_bold"
175 +def render-list [names: list<string>, selected: int, notice: string] {
176 + screen
177 + print (style " PRINTERS " "cyan_bold")
178 + print ""
179 + let default = (default-printer)
180 + for $item in ($names | enumerate) {
181 + let marker = if $item.index == $selected { style ">" "cyan_bold" } else { " " }
182 + let suffix = if $item.item == $default { style " default" "d" } else { "" }
183 + print $" ($marker) ($item.item)($suffix)"
185 + if $notice != "" {
186 + print ""
187 + print (style $notice "yellow")
189 + print ""
190 + print (style " ↑/↓ select enter open q quit " "d")
193 +def render-detail [record: record, notice: string] {
194 + screen
195 + print (style $" ($record.name) " "cyan_bold")
196 + print ""
197 + print $" (state-label $record.summary) ($record.summary)"
198 + print $" acceptance ($record.acceptance)"
199 + print $" device ($record.device)"
200 + print $" network ($record.network)"
202 + let ipp_reasons = ($record.ipp.reasons? | default "")
203 + let message = ($record.ipp.message? | default "")
204 + if $ipp_reasons != "" { print $" reasons ($ipp_reasons)" }
205 + if $message != "" { print $" message ($message)" }
206 + if $record.alerts != "" { print $" alerts ($record.alerts)" }
208 + print ""
209 + let jobs = ($record.jobs | length)
210 + let ipp_jobs = ($record.ipp.jobs? | default "")
211 + if $ipp_jobs != "" { print $" jobs ($jobs) queued / ($ipp_jobs) reported" } else { print $" jobs ($jobs) queued" }
213 + if $notice != "" {
214 + print ""
215 + print (style $notice "yellow")
217 + print ""
218 + print (style " p print j jobs l logs e enable+accept d default " "d")
219 + print (style " r refresh ? help q quit " "d")
222 +def render-jobs [record: record, selected: int, notice: string] {
223 + screen
224 + print (style $" ($record.name) / JOBS " "cyan_bold")
225 + print ""
226 + if ($record.jobs | is-empty) {
227 + print " no queued jobs"
228 + } else {
229 + for $item in ($record.jobs | enumerate) {
230 + let marker = if $item.index == $selected { style ">" "cyan_bold" } else { " " }
231 + print $" ($marker) ($item.item)"
234 + if $notice != "" {
235 + print ""
236 + print (style $notice "yellow")
238 + print ""
239 + print (style " ↑/↓ select c cancel h hold u release b back " "d")
242 +def render-logs [record: record] {
243 + screen
244 + print (style $" ($record.name) / CUPS ERRORS " "cyan_bold")
245 + print ""
246 + if ($record.logs | is-empty) {
247 + print " no matching entries in /var/log/cups/error_log*"
248 + } else {
249 + for $line in $record.logs { print $" ($line)" }
251 + print ""
252 + print (style " b back r refresh q quit " "d")
255 +def render-help [name: string] {
256 + screen
257 + print (style $" ($name) / HELP " "cyan_bold")
258 + print ""
259 + print " p print a file"
260 + print " j inspect and manage queued jobs"
261 + print " l show matching CUPS error log entries"
262 + print " e enable printer and accept new jobs"
263 + print " d set user default printer"
264 + print " r refresh status"
265 + print " q quit"
266 + print ""
267 + print (style " press any key " "d")
270 +def confirm [prompt: string] {
271 + let answer = (input $"($prompt) [y/N] " | str lowercase | str trim)
272 + $answer == "y" or $answer == "yes"
275 +def action-enable [name: string] {
276 + let enabled = (run-command "cupsenable" [$name])
277 + if not $enabled.ok { return ($enabled.error | default "could not enable printer") }
278 + let accepted = (run-command "cupsaccept" [$name])
279 + if not $accepted.ok { return ($accepted.error | default "enabled, but could not accept jobs") }
280 + "printer enabled; accepting jobs"
283 +def action-default [name: string] {
284 + let result = (run-command "lpoptions" ["-d" $name])
285 + if $result.ok { "user default updated" } else { $result.error | default "could not set default printer" }
288 +def action-print [name: string] {
289 + let input_path = (input "file to print: " | str trim)
290 + if $input_path == "" { return "cancelled" }
291 + let file = ($input_path | path expand)
292 + if not ($file | path exists) { return $"file not found: ($file)" }
293 + let result = (run-command "lp" ["-d" $name $file])
294 + if $result.ok { $result.output | default "print job submitted" } else { $result.error | default "print failed" }
297 +def job-id [line: string] {
298 + $line | split row -r '\s+' | first
301 +def action-job [job: string, action: string] {
302 + let id = (job-id $job)
303 + let result = if $action == "cancel" {
304 + run-command "cancel" [$id]
305 + } else if $action == "hold" {
306 + run-command "lp" ["-i" $id "-H" "hold"]
307 + } else {
308 + run-command "lp" ["-i" $id "-H" "resume"]
310 + if $result.ok { $"job ($id): ($action)" } else { $result.error | default $"job action failed: ($action)" }
313 +def printer-app [names: list<string>, selected: int, initial_view: string] {
314 + mut view = $initial_view
315 + mut selected_printer = $selected
316 + mut selected_job = 0
317 + mut notice = ""
319 + loop {
320 + if $view == "list" {
321 + render-list $names $selected_printer $notice
322 + let pressed = (key)
323 + match $pressed {
324 + "up" => { if $selected_printer > 0 { $selected_printer -= 1 } }
325 + "down" => { if $selected_printer < (($names | length) - 1) { $selected_printer += 1 } }
326 + "enter" => { $view = "detail"; $notice = "" }
327 + "q" | "esc" => { break }
328 + _ => {}
330 + continue
333 + let name = ($names | get $selected_printer)
334 + let record = (printer-record $name)
336 + if $view == "detail" {
337 + render-detail $record $notice
338 + let pressed = (key)
339 + match $pressed {
340 + "p" => { $notice = (action-print $name) }
341 + "j" => { $selected_job = 0; $view = "jobs"; $notice = ""}
342 + "l" => { $view = "logs"; $notice = "" }
343 + "e" => { $notice = (action-enable $name) }
344 + "d" => { $notice = (action-default $name) }
345 + "r" => { $notice = "refreshed" }
346 + "?" => { $view = "help"; $notice = "" }
347 + "q" | "esc" => { break }
348 + _ => {}
350 + } else if $view == "jobs" {
351 + render-jobs $record $selected_job $notice
352 + let pressed = (key)
353 + match $pressed {
354 + "up" => { if $selected_job > 0 { $selected_job -= 1 } }
355 + "down" => {
356 + if not ($record.jobs | is-empty) and $selected_job < (($record.jobs | length) - 1) { $selected_job += 1 }
358 + "c" => {
359 + if not ($record.jobs | is-empty) and (confirm "cancel selected job?") { $notice = (action-job ($record.jobs | get $selected_job) "cancel") }
361 + "h" => {
362 + if not ($record.jobs | is-empty) and (confirm "hold selected job?") { $notice = (action-job ($record.jobs | get $selected_job) "hold") }
364 + "u" => {
365 + if not ($record.jobs | is-empty) { $notice = (action-job ($record.jobs | get $selected_job) "release") }
367 + "b" | "esc" => { $view = "detail"; $notice = "" }
368 + "q" => { break }
369 + _ => {}
371 + } else if $view == "logs" {
372 + render-logs $record
373 + let pressed = (key)
374 + match $pressed {
375 + "b" | "esc" => { $view = "detail" }
376 + "r" => { $notice = "" }
377 + "q" => { break }
378 + _ => {}
380 + } else {
381 + render-help $name
382 + let _ = (key)
383 + $view = "detail"
388 +export def main [name?: string] {
389 + if (which lpstat | is-empty) { error make {msg: "lpstat is not installed"} }
390 + if (which lp | is-empty) { error make {msg: "lp is not installed"} }
392 + let names = (printer-names)
393 + if ($names | is-empty) {
394 + error make {msg: "CUPS has no configured printers"}
397 + if $name != null and not ($name in $names) {
398 + error make {msg: $"unknown printer: ($name)"}
401 + let default = (default-printer)
402 + let selected = if $name != null {
403 + $names | enumerate | where item == $name | get 0.index
404 + } else if $default != "" and ($default in $names) {
405 + $names | enumerate | where item == $default | get 0.index
406 + } else { 0 }
407 + let initial_view = if $name != null or (($names | length) == 1) { "detail" } else { "list" }
408 + printer-app $names $selected $initial_view

nushell/modules/proquint.nu

Added
new file mode 100644
1 +const CONSONANTS = "bdfghjklmnprstvz" | split chars
2 +const VOWELS = "aiou" | split chars
4 +# Encode a value as lowercase proquint blocks.
5 +# Scalars use Nushell's compact big-endian representation. Compound values use
6 +# compact JSON; binary and strings keep their raw bytes. Odd byte counts get
7 +# zero-padded for the final 16-bit block.
8 +export def main [value?: any] {
9 + let input = if ($value == null) { $in } else { $value }
10 + let bytes = (to-bytes $input)
12 + $bytes
13 + | chunks 2
14 + | each {|word|
15 + let high = $word.0
16 + let low = ($word.1? | default 0)
17 + let number = ($high * 256 + $low)
19 + [
20 + ($CONSONANTS | get (($number // 4096) mod 16))
21 + ($VOWELS | get (($number // 1024) mod 4))
22 + ($CONSONANTS | get (($number // 64) mod 16))
23 + ($VOWELS | get (($number // 16) mod 4))
24 + ($CONSONANTS | get ($number mod 16))
25 + ] | str join
26 + }
27 + | str join "-"
30 +def to-bytes [value: any] {
31 + let type = ($value | describe)
33 + if $type == "binary" {
34 + $value
35 + } else if $type == "string" {
36 + $value | into binary
37 + } else if $type in ["int" "float" "bool" "filesize" "duration" "datetime"] {
38 + $value | into binary --compact --endian big
39 + } else {
40 + $value | to json --raw --serialize | into binary
41 + }

pi/agent/settings.json

Modified
2 - "lastChangelogVersion": "0.86.1",
3 - "packages": [
4 - "~/Workspace/pi-ext"
5 - ],
6 - "skills": [
7 - "-skills/fxdriver/fxdriver-instructions/SKILL.md",
8 - "-skills/fxdriver/fxdriver/SKILL.md",
9 - "-skills/java/java-class-file-api/SKILL.md",
10 - "-skills/java/java-ffm/SKILL.md",
11 - "-skills/java/java-final-field-mutation/SKILL.md",
12 - "-skills/java/java-flexible-constructors/SKILL.md",
13 - "-skills/java/java-http3-client/SKILL.md",
14 - "-skills/java/java-kdf-api/SKILL.md",
15 - "-skills/java/java-kem-api/SKILL.md",
16 - "-skills/java/java-markdown-doc-comments/SKILL.md",
17 - "-skills/java/java-ml-dsa/SKILL.md",
18 - "-skills/java/java-ml-kem/SKILL.md",
19 - "-skills/java/java-module-imports/SKILL.md",
20 - "-skills/java/java-native-access-restrictions/SKILL.md",
21 - "-skills/java/java-pattern-switch/SKILL.md",
22 - "-skills/java/java-record-patterns/SKILL.md",
23 - "-skills/java/java-scoped-values/SKILL.md",
24 - "-skills/java/java-security-manager-disabled/SKILL.md",
25 - "-skills/java/java-sequenced-collections/SKILL.md",
26 - "-skills/java/java-source-scripts/SKILL.md",
27 - "-skills/java/java-stream-gatherers/SKILL.md",
28 - "-skills/java/java-unnamed-variables-patterns/SKILL.md",
29 - "-skills/java/java-unsafe-memory-migration/SKILL.md",
30 - "-skills/java/java-virtual-threads/SKILL.md",
31 - "-skills/mdbook/SKILL.md",
32 - "-skills/niri/SKILL.md",
33 - "-skills/nugu/SKILL.md",
34 - "-skills/qml/SKILL.md",
35 - "-skills/quickshell/SKILL.md",
36 - "-skills/rust-maud/SKILL.md",
37 - "-skills/wezterm/SKILL.md",
38 - "-skills/luci-ci/SKILL.md"
39 - ],
40 - "theme": "terminal",
41 - "defaultProvider": "openai-codex",
42 - "defaultModel": "gpt-5.6-luna",
43 - "defaultThinkingLevel": "high",
44 - "defaultTools": ["bash", "edit", "read", "write", "ls", "grep"],
45 - "collapseChangelog": true,
46 - "editorPaddingX": 1,
47 - "tuiMode": "fullscreen",
48 - "fullscreenExitOutput": "resume-hint",
49 - "terminal": {
50 - "showTerminalProgress": true
51 - },
52 - "sessionDir": "~/.local/state/pi/sessions",
53 - "masks": {
54 - "pickerShortcut": "alt+m",
55 - "items": [
56 - {
57 - "name": "default",
58 - "model": "openai-codex/gpt-5.6-luna",
59 - "thinkingLevel": "high",
60 - "shortcut": "alt+0"
61 - },
62 - {
63 - "name": "glm",
64 - "model": "zai/glm-5.3-flash",
65 - "thinkingLevel": "high",
66 - "shortcut": "alt+1"
67 - },
68 - {
69 - "name": "sol",
70 - "model": "openai-codex/gpt-5.6-sol",
71 - "thinkingLevel": "high",
72 - "shortcut": "alt+2"
73 - },
74 - {
75 - "name": "astra",
76 - "model": "openai-codex/gpt-6-astra",
77 - "thinkingLevel": "high",
78 - "shortcut": "alt+3"
79 - },
80 - {
81 - "name": "opus",
82 - "model": "klaus/claude-opus-5",
83 - "thinkingLevel": "high",
84 - "shortcut": "alt+4"
85 - },
86 - {
87 - "name": "fable",
88 - "model": "klaus/claude-fable-5-1",
89 - "thinkingLevel": "high",
90 - "shortcut": "alt+5"
91 - },
92 - {
93 - "name": "luna",
94 - "model": "openai-codex/gpt-5.6-luna",
95 - "thinkingLevel": "high"
96 - },
97 - {
98 - "name": "qwen3.6",
99 - "model": "hetzner/Qwen/Qwen3.6-35B-A3B-FP8",
100 - "thinkingLevel": "off"
101 - },
102 - {
103 - "name": "qwen3.8",
104 - "model": "hetzner/Qwen3.8-27B",
105 - "thinkingLevel": "medium"
106 - }
107 - ]
108 - },
109 - "angel": {
110 - "thinkingLevel": "high",
111 - "subagentExtensions": [
112 - "pfui",
113 - "klaus",
114 - "fast",
115 - "rtk",
116 - "uv",
117 - "git-safe",
118 - "web"
119 - ],
120 - "pairs": [
121 - {
122 - "executor": "openai-codex/gpt-5.6-sol",
123 - "advisor": "openai-codex/gpt-6-astra"
124 - },
125 - {
126 - "executor": "openai-codex/gpt-5.6-terra",
127 - "advisor": "openai-codex/gpt-5.6-sol"
128 - },
129 - {
130 - "executor": "openai-codex/gpt-5.6-luna",
131 - "advisor": "openai-codex/gpt-5.6-sol"
132 - },
133 - {
134 - "executor": "klaus/claude-opus-5",
135 - "advisor": "klaus/claude-fable-5-1"
136 - },
137 - {
138 - "executor": "zai/glm-5.3-flash",
139 - "advisor": "zai/glm-5.3"
140 - }
141 - ]
142 - },
143 - "iq": {
144 - "judgeModel": "zai/glm-5.3",
145 - "stateDir": "~/Notes/LLMs",
146 - "counterJudgeModel": [
147 - "openai-codex/gpt-5.6-sol",
148 - "openai-codex/gpt-6-astra",
149 - "klaus/claude-fable-5-1",
150 - "klaus/claude-opus-5"
151 - ],
152 - "counterSampleRate": 0.25
153 - },
154 - "fast": {
155 - "enable": true
156 - },
157 - "ultra": {
158 - "auto_enable": true,
159 - "subagentExtensions": [
160 - "pfui",
161 - "klaus",
162 - "angel",
163 - "fast",
164 - "git-safe",
165 - "rtk",
166 - "uv",
167 - "web"
168 - ],
169 - "actionSummarizerModel": "openai-codex/gpt-5.6-luna",
170 - "modelTiers": {
171 - "tiny": {
172 - "model": "openai-codex/gpt-5.6-luna",
173 - "thinkingLevel": "minimal"
174 - },
175 - "small": {
176 - "model": "openai-codex/gpt-5.6-luna",
177 - "thinkingLevel": "high"
178 - },
179 - "medium": {
180 - "model": "openai-codex/gpt-5.6-terra",
181 - "thinkingLevel": "high"
182 - },
183 - "large": {
184 - "model": "openai-codex/gpt-6-sol",
185 - "thinkingLevel": "high"
186 - },
187 - "huge": {
188 - "model": "openai-codex/gpt-6-astra",
189 - "thinkingLevel": "high"
190 - }
191 - }
192 - },
193 - "goodJob": {
194 - "model": "openai-codex/gpt-5.5",
195 - "thinkingLevel": "medium"
196 - },
197 - "decay": {
198 - "model": "openai-codex/gpt-5.6.luna",
199 - "summarizerModel": "openai-codex/gpt-5.5"
200 - },
201 - "intellij": {
202 - "url": "http://127.0.0.1:64343/stream"
203 - },
204 - "hideThinkingBlock": false
2 + "lastChangelogVersion": "0.86.1",
3 + "packages": [
4 + "~/Workspace/pi-ext"
5 + ],
6 + "skills": [
7 + "-skills/fxdriver/fxdriver-instructions/SKILL.md",
8 + "-skills/fxdriver/fxdriver/SKILL.md",
9 + "-skills/java/java-class-file-api/SKILL.md",
10 + "-skills/java/java-ffm/SKILL.md",
11 + "-skills/java/java-final-field-mutation/SKILL.md",
12 + "-skills/java/java-flexible-constructors/SKILL.md",
13 + "-skills/java/java-http3-client/SKILL.md",
14 + "-skills/java/java-kdf-api/SKILL.md",
15 + "-skills/java/java-kem-api/SKILL.md",
16 + "-skills/java/java-markdown-doc-comments/SKILL.md",
17 + "-skills/java/java-ml-dsa/SKILL.md",
18 + "-skills/java/java-ml-kem/SKILL.md",
19 + "-skills/java/java-module-imports/SKILL.md",
20 + "-skills/java/java-native-access-restrictions/SKILL.md",
21 + "-skills/java/java-pattern-switch/SKILL.md",
22 + "-skills/java/java-record-patterns/SKILL.md",
23 + "-skills/java/java-scoped-values/SKILL.md",
24 + "-skills/java/java-security-manager-disabled/SKILL.md",
25 + "-skills/java/java-sequenced-collections/SKILL.md",
26 + "-skills/java/java-source-scripts/SKILL.md",
27 + "-skills/java/java-stream-gatherers/SKILL.md",
28 + "-skills/java/java-unnamed-variables-patterns/SKILL.md",
29 + "-skills/java/java-unsafe-memory-migration/SKILL.md",
30 + "-skills/java/java-virtual-threads/SKILL.md",
31 + "-skills/mdbook/SKILL.md",
32 + "-skills/niri/SKILL.md",
33 + "-skills/qml/SKILL.md",
34 + "-skills/quickshell/SKILL.md",
35 + "-skills/rust-maud/SKILL.md",
36 + "-skills/wezterm/SKILL.md",
37 + "-skills/luci-ci/SKILL.md",
38 + "-skills/chrome-cdp/SKILL.md",
39 + "-skills/firefox-bidi/SKILL.md",
40 + "-skills/x230/SKILL.md",
41 + "-skills/archlinux/SKILL.md",
42 + "-skills/ascii-boxes/SKILL.md",
43 + "-skills/jj/jj-bookmark-move/SKILL.md",
44 + "-skills/jj/jj-commit/SKILL.md",
45 + "-skills/jj/jj-review/SKILL.md",
46 + "-skills/jj/jj-sync/SKILL.md",
47 + "-skills/linux/SKILL.md",
48 + "-skills/linux-console/SKILL.md",
49 + "-skills/linux-userland/SKILL.md",
50 + "-skills/presenterm/SKILL.md",
51 + "-skills/security/SKILL.md",
52 + "-skills/terminal-harness/SKILL.md",
53 + "-skills/win32-drive/SKILL.md"
54 + ],
55 + "theme": "terminal",
56 + "defaultProvider": "openai-codex",
57 + "defaultModel": "gpt-5.6-luna",
58 + "defaultThinkingLevel": "high",
59 + "defaultTools": [
60 + "bash",
61 + "edit",
62 + "read",
63 + "write",
64 + "ls",
65 + "grep"
66 + ],
67 + "collapseChangelog": true,
68 + "editorPaddingX": 1,
69 + "tuiMode": "fullscreen",
70 + "fullscreenExitOutput": "resume-hint",
71 + "terminal": {
72 + "showTerminalProgress": true
73 + },
74 + "sessionDir": "~/.local/state/pi/sessions",
75 + "masks": {
76 + "pickerShortcut": "alt+m",
77 + "items": [
78 + {
79 + "name": "default",
80 + "model": "openai-codex/gpt-5.6-luna",
81 + "thinkingLevel": "high",
82 + "shortcut": "alt+0"
83 + },
84 + {
85 + "name": "glm",
86 + "model": "zai/glm-5.3-flash",
87 + "thinkingLevel": "high",
88 + "shortcut": "alt+1"
89 + },
90 + {
91 + "name": "sol",
92 + "model": "openai-codex/gpt-5.6-sol",
93 + "thinkingLevel": "medium",
94 + "shortcut": "alt+2"
95 + },
96 + {
97 + "name": "astra",
98 + "model": "openai-codex/gpt-6-astra",
99 + "thinkingLevel": "high",
100 + "shortcut": "alt+3"
101 + },
103 + "name": "opus",
104 + "model": "klaus/claude-opus-5",
105 + "thinkingLevel": "high",
106 + "shortcut": "alt+4"
107 + },
109 + "name": "fable",
110 + "model": "klaus/claude-fable-5-1",
111 + "thinkingLevel": "high",
112 + "shortcut": "alt+5"
113 + },
115 + "name": "luna",
116 + "model": "openai-codex/gpt-5.6-luna",
117 + "thinkingLevel": "high"
118 + },
120 + "name": "qwen3.6",
121 + "model": "hetzner/Qwen/Qwen3.6-35B-A3B-FP8",
122 + "thinkingLevel": "off"
123 + },
125 + "name": "qwen3.8",
126 + "model": "hetzner/Qwen3.8-27B",
127 + "thinkingLevel": "medium"
130 + },
131 + "angel": {
132 + "thinkingLevel": "high",
133 + "subagentExtensions": [
134 + "pfui",
135 + "klaus",
136 + "fast",
137 + "rtk",
138 + "uv",
139 + "git-safe",
140 + "web"
141 + ],
142 + "pairs": [
144 + "executor": "openai-codex/gpt-5.6-sol",
145 + "advisor": "openai-codex/gpt-6-astra"
146 + },
148 + "executor": "openai-codex/gpt-5.6-terra",
149 + "advisor": "openai-codex/gpt-5.6-sol"
150 + },
152 + "executor": "openai-codex/gpt-5.6-luna",
153 + "advisor": "openai-codex/gpt-5.6-sol"
154 + },
156 + "executor": "klaus/claude-opus-5",
157 + "advisor": "klaus/claude-fable-5-1"
158 + },
160 + "executor": "zai/glm-5.3-flash",
161 + "advisor": "zai/glm-5.3"
164 + },
165 + "iq": {
166 + "judgeModel": "zai/glm-5.3",
167 + "stateDir": "~/Notes/LLMs",
168 + "counterJudgeModel": [
169 + "openai-codex/gpt-5.6-sol",
170 + "openai-codex/gpt-6-astra",
171 + "klaus/claude-fable-5-1",
172 + "klaus/claude-opus-5"
173 + ],
174 + "counterSampleRate": 0.25
175 + },
176 + "fast": {
177 + "enable": true
178 + },
179 + "ultra": {
180 + "auto_enable": true,
181 + "subagentExtensions": [
182 + "pfui",
183 + "klaus",
184 + "angel",
185 + "fast",
186 + "git-safe",
187 + "rtk",
188 + "uv",
189 + "web"
190 + ],
191 + "actionSummarizerModel": "openai-codex/gpt-5.6-luna",
192 + "modelTiers": {
193 + "tiny": {
194 + "model": "openai-codex/gpt-5.6-luna",
195 + "thinkingLevel": "minimal"
196 + },
197 + "small": {
198 + "model": "openai-codex/gpt-5.6-luna",
199 + "thinkingLevel": "high"
200 + },
201 + "medium": {
202 + "model": "openai-codex/gpt-5.6-terra",
203 + "thinkingLevel": "high"
204 + },
205 + "large": {
206 + "model": "openai-codex/gpt-6-sol",
207 + "thinkingLevel": "high"
208 + },
209 + "huge": {
210 + "model": "openai-codex/gpt-6-astra",
211 + "thinkingLevel": "high"
214 + },
215 + "goodJob": {
216 + "model": "openai-codex/gpt-5.5",
217 + "thinkingLevel": "medium"
218 + },
219 + "decay": {
220 + "model": "openai-codex/gpt-5.6.luna",
221 + "summarizerModel": "openai-codex/gpt-5.5"
222 + },
223 + "intellij": {
224 + "url": "http://127.0.0.1:64343/stream"
225 + },
226 + "hideThinkingBlock": false

pi/agent/skills/coding-guidelines/SKILL.md

Modified
2 2 name: coding-guidelines
3 -description: "Use before designing, implementing, debugging, testing, or reviewing code."
3 +description: "Use before writing code"
6 6 # Coding guidelines

pi/agent/skills/nushell/scripts/check.mjs

Modified
33 33 let entry;
34 34 try { entry = JSON.parse(line); }
35 35 catch { throw new Error("Malformed Nu diagnostic JSON"); }
36 + if (entry?.type === "hint") continue;
36 37 if (entry?.type !== "diagnostic" || typeof entry.message !== "string"
37 38 || !["Error", "Warning", "Information", "Hint"].includes(entry.severity)) {
38 39 throw new Error("Unsupported Nu diagnostic output");