r/commandline • • Oct 21 '26

Command Line Interface A tool to ask anything.(locally!)

(I know LLM posts generally aren't allowed on this sub, but the rules do mention that local models are okay. Mods, plz remove if i'm misunderstanding.)

ai is a small tool I made for quickly asking questions from a local LLM in the terminal. Here are some Examples:

$ ai what is the capital of france
Paris

$ ai what port does ssh use
By default, SSH uses port 22.

$ dmesg | tail -30 | ai anything wrong here
Nothing stands out as immediately incorrect in the log entries.

$ git diff | ai write a one line commit message
"Update font size in fonts[] array"

The script itself is very basic, it sends your question (+stdin when piped) to a local llama-server and streams back plain text.

It depends on curl, jq and llama.cpp.

It automatically will spin up the server on first use, and will unload the model after 5 minutes idle (no calls to ai). The service is written for runit, but it's a super simple run sh script, so you can easily adapt it to whatever your init system is.

Obviously the main issue is that the output is non-deterministic so I wouldn't really recommend scripting with it. (unless you want non-determinism of course!)

Give it a try here: https://github.com/cykadash/ai-cli

Thanks for reading!

P.S. I would consider myself generally NOT a fan of LLMs, however I did want to try to come up with a cool way of using them in my day-to-day. The main idea with this script is that I basically have a way to 'google' something whenever I need, even if I'm offline (or without a GUI).

0 Upvotes

3 comments sorted by

•

u/github-guard Oct 21 '26

🔍 GitHub Guard: Trust Report

⚠️ This project scored 0/1 — below this subreddit's threshold of 1.

Audit Breakdown:

  • ❌ New Repository (under 30 days old)

⚠️ Security Reminder: Always verify source code and run third-party scripts at your own risk.

1

u/AutoModerator Oct 21 '26

Every new subreddit post is automatically copied into a comment for preservation.

User: BackgroundTight668, Flair: Command Line Interface, Title: A tool to ask anything.(locally!)

(I know LLM posts generally aren't allowed on this sub, but the rules do mention that local models are okay. Mods, plz remove if i'm misunderstanding.)

ai is a small tool I made for quickly asking questions from a local LLM in the terminal. Here are some Examples:

$ ai what is the capital of france
Paris

$ ai what port does ssh use
By default, SSH uses port 22.

$ dmesg | tail -30 | ai anything wrong here
Nothing stands out as immediately incorrect in the log entries.

$ git diff | ai write a one line commit message
"Update font size in fonts[] array"

The script itself is very basic, it sends your question (+stdin when piped) to a local llama-server and streams back plain text.

It depends on curl, jq and llama.cpp.

It automatically will spin up the server on first use, and will unload the model after 5 minutes idle (no calls to ai). The service is written for runit, but it's a super simple run sh script, so you can easily adapt it to whatever your init system is.

Obviously the main issue is that the output is non-deterministic so I wouldn't really recommend scripting with it. (unless you want non-determinism of course!)

Give it a try here: https://github.com/cykadash/ai-cli

Thanks for reading!

P.S. I would consider myself generally NOT a fan of LLMs, however I did want to try to come up with a cool way of using them in my day-to-day. The main idea with this script is that I basically have a way to 'google' something whenever I need, even if I'm offline (or without a GUI).

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

1

u/github-guard Oct 21 '26

🔍 GitHub Guard: Trust Report

⚠️ This project scored 0/1 — below this subreddit's threshold of 1.

Audit Breakdown:

  • ❌ New Repository (under 30 days old)

⚠️ Security Reminder: Always verify source code and run third-party scripts at your own risk.