Skip to main content

ask-cli

Plain English in, Linux command out: confirm, run, interpret. Works with a local model (via Ollama) or a remote one (Groq, OpenAI, Anthropic) — you choose. Python packaging of the original ask.sh used in COMP-175 (System Admin & Security), Module 15 (AI in the Terminal).

Install

pip install .

This installs an ask command on your PATH.

Choosing a provider

ask --list-providers
supported providers:
  ollama     Ollama (local)   default model: llama3.2:3b  (local, no key)
  groq       Groq (remote)    default model: llama-3.1-8b-instant  (needs $GROQ_API_KEY)
  openai     OpenAI (remote)  default model: gpt-4o-mini  (needs $OPENAI_API_KEY)
  anthropic  Anthropic (remote) default model: claude-haiku-5-5  (needs $ANTHROPIC_API_KEY)

Default is ollama (fully local, no API key, no data leaves your machine). Pick a remote one with --provider (or set $ASK_PROVIDER so you don't have to repeat it), and --model (or $ASK_MODEL) to override the default model for that provider.

Local (default) — Ollama

curl -fsSL https://ollama.com/install.sh | sh
ollama pull llama3.2:3b
ask how much disk space is free

Remote — Groq, OpenAI, or Anthropic

export GROQ_API_KEY=gsk_...
ask --provider groq how much disk space is free

export OPENAI_API_KEY=sk-...
ask --provider openai --model gpt-4o-mini who am I logged in as

export ANTHROPIC_API_KEY=sk-ant-...
ask --provider anthropic show hidden files too

Usage

ask how much disk space is free
ask show hidden files too
ask who am I logged in as

The tool asks the chosen model to translate your request into one Linux command plus a short explanation, flags anything destructive (rm, dd, mkfs, shutdown, reboot), asks for confirmation before running it, then asks the model to interpret the command's output in plain English.

Development

pip install -e .
ask how much disk space is free

Metadata

Release files for shell-ask 0.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for shell-ask 0.2.1
File Size Uploaded Provenance Actions
shell_ask-0.2.1.tar.gz 6.6 kB Without provenance Details for shell_ask-0.2.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for shell-ask 0.2.1
File Interpreter ABI Platform Actions
shell_ask-0.2.1-py3-none-any.whl Python 3 none any Details for shell_ask-0.2.1-py3-none-any.whl

Total release size: 13.6 kB

Release files / shell_ask-0.2.1.tar.gz

Download URL shell_ask-0.2.1.tar.gz
Size 6.6 kB
Tags Source
SHA-256 checksum
How to use checksums
004bda55269a17e8b1a5dc7cf828c21282c03b9f0c2a731a49a57c5dc04fecbe
BLAKE2b-256 checksum
How to use checksums
9ca90bf8849591816b4f766d4d318a7d7670ef07802efa8821834224481cf83d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.0

Release files / shell_ask-0.2.1-py3-none-any.whl

Download URL shell_ask-0.2.1-py3-none-any.whl
Size 7.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
eadad3b706d2488120cf40f841fd0289b2d8b36b6dcb4210e1e98fc1222010a8
BLAKE2b-256 checksum
How to use checksums
8834a43bcc96cd236f858edd29eaf591622a47b7568e6879f8c35f5fc88f387e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.0

Security for shell-ask 0.2.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.2.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page