lemonpie-cli 0.2.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,154 @@
1
+ Metadata-Version: 2.5
2
+ Name: lemonpie-cli
3
+ Version: 0.2.0
4
+ Summary: LemonPie — A lightweight Ollama client for terminal users
5
+ Project-URL: homepage, https://versicode.com/projects/lemon-pie
6
+ Project-URL: repository, https://github.com/famousStratum/LemonPie
7
+ Project-URL: issues, https://github.com/famousStratum/LemonPie/issues
8
+ Author-email: famousStratum <info@versicode.com>
9
+ License-Expression: GPL-3.0-or-later
10
+ License-File: LICENSE
11
+ Classifier: Development Status :: 3 - Alpha
12
+ Classifier: Environment :: Console
13
+ Classifier: Intended Audience :: Developers
14
+ Classifier: Programming Language :: Python :: 3
15
+ Requires-Python: >=3.11
16
+ Requires-Dist: httpx
17
+ Requires-Dist: ollama
18
+ Requires-Dist: platformdirs
19
+ Description-Content-Type: text/markdown
20
+
21
+ # LemonPie
22
+
23
+ ![PyPI Version](https://img.shields.io/pypi/v/lemonpie-cli)
24
+ ![GitHub License](https://img.shields.io/github/license/famousstratum/lemonpie)
25
+ ![Python Version from PEP 621 TOML](https://img.shields.io/python/required-version-toml?tomlFilePath=https%3A%2F%2Fraw.githubusercontent.com%2FfamousStratum%2FLemonPie%2Frefs%2Fheads%2Fmain%2Fpyproject.toml)
26
+
27
+ **LemonPie — A lightweight Ollama client for terminal users**
28
+
29
+ LemonPie is a compact CLI for interacting with an Ollama server. It manages chat sessions and persists history locally, designed to be tiny and portable — ideal for lightweight systems and terminal users, but usable anywhere with Python and network access.
30
+
31
+
32
+
33
+ ## ✨ Features
34
+ - Start and manage chat sessions with Ollama models
35
+ - Persist session history in your OS's standard user data directory
36
+ - Configure host, default model, and aliases via a config file in your OS's standard user config directory
37
+ - Interactive setup wizard (`lmConfig --init`) for first-time configuration — verifies server reachability and lists available models for selection
38
+ - Add, remove, and list models with aliases (`lmConfig`)
39
+ - Switch models mid‑session with confirmation
40
+ - Atomic writes for safety (tmp + replace)
41
+ - Streaming responses from Ollama for real‑time output
42
+ - Graceful handling of Ctrl‑C interrupts
43
+
44
+
45
+
46
+ ## 📂 Project Structure
47
+
48
+ ```text
49
+ LemonPie/
50
+ ├── src/
51
+ │ └── lemonpie/ # Core package namespace
52
+ │ ├── main.py # CLI session manager (entrypoints: lm, lemonpie)
53
+ │ ├── config.py # Configuration logic & I/O
54
+ │ ├── paths.py # OS-appropriate config/data directory resolution
55
+ │ ├── time_utils.py # Timestamp helpers
56
+ │ ├── cli/
57
+ │ │ ├── parser.py # Argument parsing (lm)
58
+ │ │ ├── ui.py # Terminal helpers & confirmation
59
+ │ │ └── config_cmd.py # Config manager (entrypoint: lmConfig)
60
+ │ ├── engine/
61
+ │ │ ├── models.py # Model finding & resolution
62
+ │ │ └── ollama.py # Ollama client interaction
63
+ │ └── sessions/
64
+ │ └── storage.py # Session persistence
65
+ ├── tests/ # pytest suite
66
+ ├── docs/
67
+ │ ├── config.example.json # Configuration template
68
+ │ └── design/ # Design docs (model-verification.md, etc.)
69
+ ├── .github/workflows/ # CI & release pipelines
70
+ ├── pyproject.toml # Package & build configuration
71
+ ├── README.md # Project overview
72
+ ├── LICENSE # GPLv3 license
73
+ └── .gitignore
74
+ ```
75
+
76
+ ## ⚙️ Configuration
77
+
78
+ LemonPie keeps its config file and session history in your OS's standard user directories (via [`platformdirs`](https://pypi.org/project/platformdirs/)) — not in the project folder:
79
+
80
+ | OS | Config Path | Sessions Path |
81
+ |----------|--------------------------------------------|-----------------------------------------------------------|
82
+ | Linux | `~/.config/lemonpie/` | `~/.local/share/lemonpie/sessions/` |
83
+ | macOS | `~/Library/Application Support/lemonpie/` | `~/Library/Application Support/lemonpie/sessions/` |
84
+ | Windows | `%LOCALAPPDATA%\lemonpie\` | `%LOCALAPPDATA%\lemonpie\sessions\` |
85
+
86
+
87
+ Both are overridable via environment variables — `LEMONPIE_CONFIG_DIR` and `LEMONPIE_SESSIONS_DIR` — useful for testing or running in a container.
88
+
89
+ `docs/config.example.json` is a template. Run `lmConfig --init` to set up your config interactively — it verifies server reachability, lists installed models for selection, and writes the file for you. `lmConfig` also auto-creates a minimal config on first use if you prefer to configure manually.
90
+
91
+ ### Example structure:
92
+ ```json
93
+ {
94
+ "server": "http://127.0.0.1:11434",
95
+ "default": "qwen2.5-coder:3b",
96
+ "models": [
97
+ { "alias": "qwen", "name": "qwen2.5-coder:3b" },
98
+ { "alias": null, "name": "qwen2.5-coder:1.5b-base" }
99
+ ]
100
+ }
101
+ ```
102
+ server: Ollama host URL\
103
+ default: canonical model name (full identifier)\
104
+ models: list of objects with alias (nullable) and name
105
+
106
+ ## 🚀 Usage
107
+ ### `lm` / `lemonpie`
108
+ - Start a new session \
109
+ `lm -n "Hello"`
110
+
111
+ - Start with a specific model\
112
+ `lm -n -m qwen "Hello"`
113
+
114
+ - Send a prompt to the current session\
115
+ `lm "Tell me about git add"`
116
+
117
+ - List sessions\
118
+ `lm -l`
119
+
120
+ - Print current session history\
121
+ `lm -p`
122
+
123
+ - Switch model in current session\
124
+ `lm -m qwen2.5-coder:3b`
125
+
126
+ ### `lmConfig`
127
+ - First-time setup\
128
+ `lmConfig --init`
129
+
130
+ - First-time setup (skip server verification)\
131
+ `lmConfig --init --force`
132
+
133
+ - Manage models\
134
+ `lmConfig --add-model qwen qwen2.5-coder:3b`\
135
+ `lmConfig --list-models`\
136
+ `lmConfig --remove-model qwen`
137
+
138
+ 👉 Full [command reference](https://github.com/famousStratum/LemonPie/blob/main/docs/usage/command-index.md).
139
+
140
+ ## 🗺 Roadmap
141
+
142
+ Planned features and improvements:
143
+
144
+ - Code completion (autocomplete)
145
+ - Model verification state machine
146
+ - Enhanced error handling and user feedback
147
+ - Cross‑platform packaging (apt, winget, Homebrew)
148
+ - Future schema validation for config/session files
149
+
150
+ 👉 See the full [roadmap](https://github.com/famousStratum/LemonPie/blob/main/docs/ROADMAP.md) for details.
151
+
152
+ ## 📜 License
153
+
154
+ This project is licensed under the **GNU General Public License v3.0** (**GPLv3**).You may redistribute and/or modify it under the terms of the GPL as published by the Free Software Foundation.See the [**license**](https://github.com/famousStratum/LemonPie/blob/main/LICENSE) file for details.
@@ -0,0 +1,20 @@
1
+ lemonpie/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
+ lemonpie/_version.py,sha256=s9U3X54Pdr-Jlh9GP6LBaa_VRos7qs_wtrVefUHHNIA,520
3
+ lemonpie/config.py,sha256=tN6MpU0picGhjaC7AIPjcgFUovZbr1eaYZboPFiQiMw,1741
4
+ lemonpie/main.py,sha256=Djvuqwfvj0QJ7OewAHrucVoSVhUVZj4hh99YmzET4HA,5230
5
+ lemonpie/paths.py,sha256=AUhv_kJXslOf1OEdY9mwaDacPrWSW-gR_FE8PNep7BE,881
6
+ lemonpie/time_utils.py,sha256=p-Wb3xetuDpDvTgW8OPr4Gw498hXbUrx9olJb7xmrUM,322
7
+ lemonpie/cli/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
8
+ lemonpie/cli/config_cmd.py,sha256=7Ye90en5H7YJCwETYJdpNSq3HVUgtU1ENNH94xTRg0M,17932
9
+ lemonpie/cli/parser.py,sha256=KhbCH-AxqK9m32iVJlK3ywA0JOYFD6SXZgS-JDr1Y3c,1214
10
+ lemonpie/cli/ui.py,sha256=jpgM5SSRtAwQC0fgy97ToxLSgT0ZF8gDWlJeF9HxD4I,2008
11
+ lemonpie/engine/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
12
+ lemonpie/engine/models.py,sha256=AvUyjzkASCTyS-HnsBo8TYEkAW2nmZ1nUm2M89cURYY,1848
13
+ lemonpie/engine/ollama.py,sha256=GMPyd9HTe-aHVaR1sVUQFt64WMsizerhrSMaByJ1Wls,1937
14
+ lemonpie/sessions/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
15
+ lemonpie/sessions/storage.py,sha256=g5XB6URzbuGkrQkxKQ_-h75MZ_8B2ANmS94-IFSL688,6052
16
+ lemonpie_cli-0.2.0.dist-info/METADATA,sha256=o-LPqxLfSLEcLgtX9DyyJyQ3ESQ5M5Q_vQiJbgM4rrM,6458
17
+ lemonpie_cli-0.2.0.dist-info/WHEEL,sha256=2iZrJkDIkeDh0k9SikKMqFuRP-ua6mb4Ir1AsER4BEw,87
18
+ lemonpie_cli-0.2.0.dist-info/entry_points.txt,sha256=w_q8hXjLiN33lkapEAToYJ1qL-s8p0XdyJpq3Smyuao,112
19
+ lemonpie_cli-0.2.0.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
20
+ lemonpie_cli-0.2.0.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: hatchling 1.33.0
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
@@ -0,0 +1,4 @@
1
+ [console_scripts]
2
+ lemonpie = lemonpie.main:main
3
+ lm = lemonpie.main:main
4
+ lmConfig = lemonpie.cli.config_cmd:main