Skip to main content

Deterministic-first Linux CLI assistant with optional, gated AI augmentation.

Project description

clippy ๐Ÿ“Ž

A Linux-first CLI assistant that actually helps you get shit done.

clippy is a modular, terminal-native helper designed for Linux and security workflows. It prioritizes deterministic logic first (parsing, heuristics, local knowledge) and uses AI only to fill the gaps when needed.

This is not a chatbot wrapper. It is a real CLI tool that respects Unix philosophy.


Philosophy

  • Linux-first
  • Local logic > AI
  • AI is optional and explicit
  • Modular & extensible
  • Pipe / stdin / redirection friendly
  • No GUI, no fluff

If it breaks shell workflows, it doesnโ€™t belong here.


Project Structure

clippy/
โ”œโ”€โ”€ clippy/
โ”‚   โ”œโ”€โ”€ __init__.py
โ”‚   โ”œโ”€โ”€ cli.py          # CLI entry point
โ”‚   โ”œโ”€โ”€ config.py       # ~/.config/clippy/config.yml
โ”‚   โ”œโ”€โ”€ core/           # Core subcommands
โ”‚   โ”‚   โ”œโ”€โ”€ explain.py  # Explain commands (hybrid logic + AI)
โ”‚   โ”‚   โ”œโ”€โ”€ why.py      # Diagnose errors
โ”‚   โ”‚   โ”œโ”€โ”€ note.py     # Knowledge base / Obsidian
โ”‚   โ”‚   โ”œโ”€โ”€ lab.py      # Automation / lab setup
โ”‚   โ”‚   โ””โ”€โ”€ gen.py      # Payload / snippet generators
โ”‚   โ””โ”€โ”€ utils/          # Shared helpers
โ”‚       โ”œโ”€โ”€ shell.py
โ”‚       โ”œโ”€โ”€ parsing.py
โ”‚       โ”œโ”€โ”€ fs.py
โ”‚       โ””โ”€โ”€ ai.py       # AI backend interface
โ”œโ”€โ”€ pyproject.toml
โ””โ”€โ”€ README.md

Installation (Development)

git clone <repo>
cd clippy
pip install -e .

Commands

clippy explain

Explain Linux commands and one-liners.

clippy explain "find / -perm -4000 2>/dev/null"
  • Deterministic parsing first
  • Shell-aware explanations
  • Security context
  • AI backend only if needed

clippy why

Diagnose errors (pipe-aware).

gcc test.c 2>&1 | clippy why

clippy note

Search and extend personal notes.

clippy note suid

clippy lab

Automate lab environments.

clippy lab malware

clippy gen

Generate payloads and snippets.

clippy gen reverse-shell bash

Configuration

The configuration file is located at ~/.config/clippy/config.yml. It is created automatically on first run.

Default Configuration (Safe & Explicit):

ai:
  enabled: false
  backend: azure
  confidence_threshold: 0.6

knowledge:
  use_man_pages: true
  user_knowledge_dir: ~/.config/clippy/knowledge

AI Contract

  • Disabled by default: AI never runs unless ai.enabled is true.
  • Silent Failure: Network or API errors are suppressed by default to preserve CLI utility.
  • Augmentation: AI only runs when local confidence is below confidence_threshold.
  • Backend: Azure AI Inference via GitHub Models (microsoft/Phi-4)
  • Authentication: Requires GITHUB_TOKEN in .env or environment variables

Setting up authentication:

Linux / macOS:

export GITHUB_TOKEN="your_token_here"

Windows (PowerShell):

$env:GITHUB_TOKEN="your_token_here"

Knowledge Resolution Order

Clippy resolves commands in the following strict order:

  1. Built-in Knowledge: Static definitions (fastest, most trusted).
  2. User Knowledge: Custom definitions in ~/.config/clippy/knowledge.
  3. System Man Pages: Standard Linux manual pages (read-only).
  4. AI (Optional): Only if enabled and confidence is low.

Non-Goals

  • No Auto-Learning: Clippy does not "learn" from your usage to avoid drift.
  • No Telemetry: No usage data is sent anywhere.
  • No Background Agents: Clippy only runs when you type a command.

Status

Stable v1.0.0

This project adheres to Semantic Versioning.


License

MIT


Why โ€œclippyโ€?

Because this one is finally useful.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

clippy_cli-1.0.0.tar.gz (12.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

clippy_cli-1.0.0-py3-none-any.whl (14.4 kB view details)

Uploaded Python 3

File details

Details for the file clippy_cli-1.0.0.tar.gz.

File metadata

  • Download URL: clippy_cli-1.0.0.tar.gz
  • Upload date:
  • Size: 12.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.3

File hashes

Hashes for clippy_cli-1.0.0.tar.gz
Algorithm Hash digest
SHA256 674d3e7f6f3786a9a0493a02850e28a43ed92e697b42d1c30409e1fde40fb025
MD5 47e5ebf2e5c7fe55ed55dc9a6f7249bd
BLAKE2b-256 a5863504ce9f33361878621d74c31f14123ea0a72765647a878d59dceb7d39b0

See more details on using hashes here.

File details

Details for the file clippy_cli-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: clippy_cli-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 14.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.3

File hashes

Hashes for clippy_cli-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 cf7bd3e48f6a5fe17eb68cbd6ae6e56eaa18e77191ded17e17b2cd704388bf24
MD5 f4e2bc98a8657fe43bad3cda8658d658
BLAKE2b-256 e6cf0faa79c04e7ab77054407ac20fd71743986ff643b65ccde14833c912c290

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page