La

Lair – CLI Tools for working with generative AI

Hacker News

Lair – CLI Tools for working with generative AI

This is a set of command line tools I made for working with generative AI. Several months back, I was looking for a new job and felt like my GitHub profile needed something more modern. I write a lot of tools, and this one in particular seemed like it might be useful to other people, so I rewrote a lot of it to make a cleaner open source version with a BSD license. Lair currently consists of three main components. First, there is "chat", a command line chat interface with autocomplete, multi-line editing, markdown rendering, persistent sessions, etc. It's really more than just a chat interface, and I use it for prompt engineering and testing things out against different models quickly. This is built using the Python PromptToolkit and Rich modules, which I can't recommend enough. Most things are configurable, and there are lots of keyboard shortcuts available. Next up we have "comfy". This uses ComfyScript ( https://github.com/Chaoses-Ib/ComfyScript ) to run workflows against a ComfyUI server. It can do image and video diffusion as well as upscaling, with a CLI that works well for scripting. ComfyScript is great, but does have some rough edges that might need to be smoothed out to get better performance, easier debugging of errors, and more control over what it writes to STDOUT/STDERR. Before I made an open source version of Lair, I was implementing a lot of this functionality by hand. It's been really nice letting ComfyUI provide features and optimizations so that I can worry more about providing an interface on top of it. Finally, there is "util". This is a one-shot tool for LLM interactions from the command line and for shell scripting will LLMs. I've seen a number of similar tools elsewhere. This one is in the style I like, and it works with most Lair features, so it supports attachments (PDF, text, and image with vision models,) sessions, and all of Lair's supported tools. The README.md has lots of examples of the functionality and there is also a Youtube video in the Overview section with a live walk-through. I hope someone else finds this useful. I am happy to answer any questions.

Share card

Actual performance

2points
Did not reach leaderboard

Launch Intel predictions

Analyze your own launch →
Product HuntOn track for Day 1 leaderboard · Strong signals: model, new, models · Missing: mac, agents, macos
95%95% predicted probability of success on Product Hunt, based on ML models trained on real launch data.
best fitHighest predicted score across all platforms for this description.
Indie HackersFits the IH revenue-focused audience · Strong signals: supports · Missing: reddit linkedin, podcasting, created
76%76% predicted probability of success on Indie Hackers, based on ML models trained on real launch data.
Hacker NewsStrong engagement from HN community · Strong signals: open source, ide, io · Missing: https docs, excited, just released
65%65% predicted probability of success on Hacker News, based on ML models trained on real launch data.
nativeThis product was originally launched on this platform.
TrustMRRFits verified-revenue profile · Strong signals: video, month · Missing: mobile apps, ios, personal
60%60% predicted probability of success on TrustMRR, based on ML models trained on real launch data.
AppSumoMay struggle as an AppSumo deal · Strong signals: interface · Missing: plus, platform, intuitive
38%38% predicted probability of success on AppSumo, based on ML models trained on real launch data.
Acquire.comPre-revenue stage for this audience · Missing: arr, mrr, revenue
13%13% predicted probability of success on Acquire.com, based on ML models trained on real launch data.
BetaListMay not resonate with beta-testers · Strong signals: chat · Missing: web3, crypto, cryptocurrency
0%0% predicted probability of success on BetaList, based on ML models trained on real launch data.

Incorrect prediction on native model

Similar products

Ge
Generative AI for TailwindCSS33%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Generative AI for TailwindCSS

Hacker News2
A
A Generative AI Encyclopedia62%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

A Generative AI Encyclopedia

Hacker News5
Ge
Generative Fill with AI and 3D58%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Generative Fill with AI and 3D

Hacker News360
Ai
Aiproduct.tools – Generative AI Tools for product, business and more30%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Aiproduct.tools – Generative AI Tools for product, business and more

Hacker News14
It
Iterative architectural design using generative AI42%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Iterative architectural design using generative AI

Hacker News4
No
No-code generative AI applications40%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

No-code generative AI applications

Hacker News3
MysticLabs AI
MysticLabs AI

MysticLabs is building a suite of generative AI tools for everyone

BetaList
SyncForge
SyncForge23%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Tools for working musicians

Product Hunt+6
Ge
Generative AI photos of your dog43%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Generative AI photos of your dog

Hacker News1
Ne
Newsletter about AI and Startups by PhD Candidate in Generative AI30%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Newsletter about AI and Startups by PhD Candidate in Generative AI

Hacker News1