Skip to main content

a simple yet useful cli for interacting with google gemini

Project description

lana

a simple semi-agentic chatbot interface for gemini built around the terminal.

context

i wanted aistudio in the terminal. but i kept going. after trimming out some feature creep, i settled on a nice little general-purpose cli chatbot with some useful tools.

how ai was used during the creation of this project

  • used to help understand docs
  • used to implement prototype solutions to complicated problems that i then studied/understood and replaced w/ my own solutions
  • the project itself is merely a client for AI APIs

getting started

installation

this project is on pypi! you just have to install python and

pip install lana_gemcli
lana

however, if your system does not support direct pip install (f.e. system-managed python packages), you will unfortunately have to run the cli inside a venv. you can look up the relevant documentation for this online.

configuration

the CLI tool name is lana, not lana_gemcli. the CLI uses alt+enter for submit and enter for newlines (this includes commands!) all commands are prefixed with / and do not take any arguments when inferred. instead, they're given settings via user input.

so, for instance, to set the thinking level to high, it would look something like this:

> /set thinking_level [alt+enter]
enter new thinking level: high [alt+enter]
will now use thinking level high

obviously, [alt+enter] would be replaced by you actually pressing alt+enter.

api keys

as expected, a gemini api key is required to use the cli. you can generate one over at https://ai.studio. the cli itself will instruct you on setting one. however, i am also going to provide instructions here:

  1. you install the cli normally and enter.
  2. inside the cli, type /set api_key and press alt+enter.
  3. paste in your api key and press alt+enter again. the cli will now work, but you also want to run /config save to save the api key to your configuration.

conversation

after you've set all your settings, you just type in your prompts and send them with alt+enter. you'll get the ai's response back. there's not much to explain here.

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

lana_gemcli-1.0.2.tar.gz (1.6 MB view details)

Uploaded Source

Built Distribution

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

lana_gemcli-1.0.2-py3-none-any.whl (22.2 kB view details)

Uploaded Python 3

File details

Details for the file lana_gemcli-1.0.2.tar.gz.

File metadata

  • Download URL: lana_gemcli-1.0.2.tar.gz
  • Upload date:
  • Size: 1.6 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.14.2

File hashes

Hashes for lana_gemcli-1.0.2.tar.gz
Algorithm Hash digest
SHA256 6d3d51733e87710fd9f97b6eeb74df808f7cb0d701399980dc1b3998e6e99872
MD5 46be255ac55d3f42af18866498a6276b
BLAKE2b-256 1477c35a2cce7f48cb04030ce260a2f619960fa498d05ed30e3e4613e623a407

See more details on using hashes here.

File details

Details for the file lana_gemcli-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: lana_gemcli-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 22.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.14.2

File hashes

Hashes for lana_gemcli-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 5b192942afa6edfd3e6df24b601a52c7e6ee7a0446f6a9178afc237bf731f4f7
MD5 52ac5176dac2b557da5216ae39190126
BLAKE2b-256 58826d1e9e7852e8edaea56a07f7386ccac4c14373f53f3e1eca57ba238dd1d4

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