Skip to content

Explain output, distro install hints, save only what worked, 2x faster - #4

Merged
Sym-jay merged 1 commit into
mainfrom
polish
Oct 5, 2026
Merged

Sym-jay merged 1 commit into
mainfrom
polish

Conversation

@Sym-jay

@Sym-jay Sym-jay commented Oct 5, 2026

Copy link
Copy Markdown
Owner

Found by using Clishe like a beginner would: typing common requests, making mistakes, and timing it.

Bugs fixed

  • Saved commands that didn't work. A taught or AI-suggested command was saved before it ran. "install htop" → htop (not installed) got saved, then failed the same way every time. Now a phrase is saved only after its command succeeds (Ctrl-C counts, for ping / tail -f), and a failure says so.
  • "say hi" ran Clishe's own code. command -v also finds shell functions, so Clishe's internal say, warn, brain… counted as commands. Only real programs and builtins count now.
  • "go back" ran the Go toolchain on machines with Go installed. go is now a command only before a real subcommand (go build, go test, go mod tidy…), and "go back" → cd -.

New

  • "what does this mean?" After ls -l, df, du, free, ps, uptime, hostname -I, ip, ss, lsblk, wc, git status, git log, it walks through the columns in plain English. Offline, and the output itself is never sent anywhere. A one-time hint shows the first time each of these runs.
  • Install hints for your distro. "command not found", or typing a well-known program that isn't installed, says e.g. sudo dnf install bind-utils for dig on Fedora. It covers apt/dnf/pacman/zypper/apk, follows ID_LIKE (Pop!_OS → apt), and knows packages with different names. python → "try python3".
  • More beginner errors explained: pip's externally-managed-environment, apt without sudo, unable to locate package, interrupted dpkg, not in sudoers, not a git repository, SSH key rejected, DNS / no network. Specific patterns are ordered before generic ones; a test enforces this.
  • First run welcome: five things to try, instead of a blank prompt.

Faster

~455ms → ~200ms per known phrase. The AI provider code (urllib/http.client, ~35ms per call) now loads only when an AI is actually asked, and next-command prediction comes back from the logging call instead of a separate one. A test guards that offline calls don't load the providers.

Checks

  • pytest: 411 passed (was 377)
  • shell tests: 71 passed (was 59)
  • shellcheck, bash -n, py_compile: clean

🤖 Generated with Claude Code

https://claude.ai/code/session_014eH6jWVqRpxtAfy2dkxqjM


Generated by Claude Code

- "what does this mean?" after ls -l, df, du, free, ps, uptime, ip, ss,
  lsblk, wc, git status/log explains the output columns (offline guides in
  output_guides.json); one-time hint the first time each runs.
- command not found / typing a missing well-known program: install command
  for the user's package manager (apt/dnf/pacman/zypper/apk, ID_LIKE aware,
  per-distro package names); python -> python3.
- More error hints: pip externally-managed, apt lock/not root, unable to
  locate package, dpkg interrupted, sudoers, not a git repo, SSH publickey,
  DNS/no network. Specific patterns ordered before generic ones.
- Taught/AI commands are saved only after they run successfully.
- Clishe's internal functions no longer count as commands ("say hi").
- "go" is a command only before a Go subcommand; "go back" -> cd -.
- First-run welcome with five things to try.
- Lazy-load AI providers, merge predict into log: ~455ms -> ~200ms per
  known phrase.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014eH6jWVqRpxtAfy2dkxqjM
@Sym-jay
Sym-jay merged commit 4bca4ee into main Oct 5, 2026
3 checks passed
@Sym-jay
Sym-jay deleted the polish branch October 5, 2026 05:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants