Losna CLI AI agent assistant
Project description
Losna CLI
An advanced, terminal-based AI developer assistant designed to interface with OpenRouter APIs. Losna CLI streamlines complex workspace orchestration, code generation, diagnostics, and testing with a clean, light-weight terminal interface.
Features
- Interactive Shell: Seamless conversational loop powered by OpenRouter models (defaults to Deepseek V4 Flash) with auto-suggestions, slash command autocompletion, and visual feedback.
- Web Search Integration: Optional, dynamic web search powered by Tavily. Prompts for API keys only when the search tool is requested.
- Dynamic Task Execution: Executes operations, tests, and file modifications safely through integrated agent tools.
- Memory Compaction: Automatically compresses conversational context to optimize token usage and maintain long-term memory constraints.
- Local Persistence: Encapsulates chat logs, sessions, and long-term memory in a local SQLite database.
Installation & Execution
Method 1: Using uv (Recommended & Fastest)
Running Losna CLI via uvx is the recommended method. It automatically manages Python, dependencies, and environment isolation without modifying your system's global state.
uvx losna-cli
Note: If you do not have uv installed, you can install it instantly via pip install uv or visit astral.sh/uv.
Method 2: Standard pip Installation
Install Losna CLI directly from PyPI:
pip install losna-cli
Then start the interactive session:
losna
Troubleshooting command not found:
If your operating system returns an error stating that losna is not recognized, it means the Python Scripts directory is not configured in your OS PATH environment variable. You can bypass this by executing the package module directly using Python:
python -m main
# or if main module structure is registered:
python -c "import main; main.main()"
Setup
Upon the first execution, Losna CLI will guide you through the setup process:
- OpenRouter API Key: Required for core operations.
- Web Search Configuration: Asks if you would like to enable the optional web search feature. If enabled, it will request your Tavily API key.
Your configuration keys are stored securely in your user home directory (~/.losnarc).
Usage
Start the interactive session using your preferred execution method above (e.g. uvx losna-cli or losna).
Slash Commands
/help- Displays the help menu listing all commands./sessions- Lists all active chat sessions and their IDs./new <title>- Starts a new chat session with a custom title./switch <id>- Switches to another chat session by its ID./search <query>- Executes an agent-guided web search./exitor/quit- Closes the active session.
License
This project is licensed under the ISC License.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file losna_cli-0.1.3.tar.gz.
File metadata
- Download URL: losna_cli-0.1.3.tar.gz
- Upload date:
- Size: 120.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5e0805d84245bcb62eed708bbdbdb230479f12bfbd0d8b7e7ba0f3fb36aff6e7
|
|
| MD5 |
b5bce6be10adbd8dfeff7fd03825a552
|
|
| BLAKE2b-256 |
2e060819abe50c06bf9da1b06e395986f5cb9164a38e2354562d54bf6987e650
|
File details
Details for the file losna_cli-0.1.3-py3-none-any.whl.
File metadata
- Download URL: losna_cli-0.1.3-py3-none-any.whl
- Upload date:
- Size: 33.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a62fa0c74a84bb00d61e4ab7722f0aa21146c87aee578485b25d1056699ad8b4
|
|
| MD5 |
f2009743bd561ea01fd7c63fd4b2fa6c
|
|
| BLAKE2b-256 |
58ddadbe94b934876b6758264320e0817bb935ccb8040be110d0cb01f519315f
|