We were in Mammoth Lakes for a week. Day 1: Canoeing and DnD Rented a Canoe and splashed around Lake Mary for about an hour. Sempi was in the front, Vian in the middle and I sat in the back. Our coordination was abysmal but we managed. Next a hike near Horseshoe Lake on an easy trail to the double falls view point. The kids were engrossed in their fantasy DnD world building.| Amjith Ramanujam
Part 1 LiteCLI has an optional feature to use LLM powered SQL generation to get answers from your database. The default LLM used by LiteCLI is OpenAI’s gpt-4o-mini. This can be changed to a different model including a local LLM running on Ollama. Here are the steps to show how to switch your LLM model. Run \llm to enable the feature. sqlite> \llm This will offer to enable this feature by installing the necessary libraries.| Amjith Ramanujam
** This feature is ONLY enabled when it is used for the first time. ** LiteCLI v1.14.2 now has an LLM feature to help you write SQL. AsciinemaPlayer.create('/llm-in-litecli-1/litecli1.cast', document.getElementById('demo1'), { idleTimeLimit: 2, poster: 'npt:0:07', terminalFontSize: "15px", fit: false, }); Getting Started: Upgrade litecli to the latest version (at least v1.14.2 or higher). uv tool install litecli@latest Open a SQLite database with litecli. $ litecli your_database_file.db Run t...| Amjith Ramanujam
Click is a python library for creating command line applications in Python. The llm tool created by Simon uses click and it has a lot of subcommands. eg: $ llm keys set openai Enter key: ... $ llm models default gpt-4o I am building a wrapper around this CLI tool that let’s me use it in an interactive REPL. I wanted autocompletion to help me remind the available subcommands and their appropriate nested subcommands. Here’s how I got a list of all the nested subcommands and built an autocom...| Amjith Ramanujam
A simple snippet to restart a Python CLI from within the CLI. import os import sys import click @click.command() defcli(): click.echo("CLI is running.") # Logic that determines when to restartif click.confirm("Do you want to restart the CLI?"): click.echo("Restarting CLI...") executable = sys.executable args = sys.argv os.execv(executable, [executable] + args) else: click.echo("Exiting CLI.") if __name__ =='__main__': cli() os.execv is the system call that can replace the current process with...| Amjith Ramanujam