Command-line interface for executing tasks using large language models, minimal version of Cline
Project description
minicline
Command-line and Python interface for performing software engineering tasks using large language models. It is based on Cline, but is simpler, uses fewer input tokens, has fewer capabilities, and does not depend on VSCode. It borrows prompts, logic, conventions, and formatting from Cline.
This package was created during the Pre-COSYNE Brainhack, March 2025, Montreal.
The primary focus is automatic generation of scientific notebooks, targeting projects like dandi-notebook-gen.
Installation
pip install minicline
Setup
The application requires the OPENROUTER_API_KEY environment variable to be set. You can set this variable by creating a .env file in the working directory with the following content:
OPENROUTER_API_KEY=your_api_key
Usage
From command line:
# Provide instructions directly
minicline perform-task "your instructions here"
# Specify a model
minicline perform-task --model google/gemini-2.0-flash-001 "your instructions here"
# Use a file containing instructions
minicline perform-task -f /path/to/instructions.txt
# Run in automatic mode (no user input required except for executing commands that are deemed to require user approval)
minicline perform-task --auto "your instructions here"
# Automatically approve all commands that are deemed require user approval
minicline perform-task --auto --approve-all-commands "your instructions here"
From Python:
from minicline import perform_task
instructions = '...'
# Default model (google/gemini-2.0-flash-001)
perform_task(instructions, cwd="/path/to/working/directory")
# Specify a different OpenRouter model
perform_task(instructions, cwd="/path/to/working/directory", model="...")
# Run in automatic mode (see above)
perform_task(instructions, cwd="/path/to/working/directory", auto=True)
# Automatically approve all commands (see above)
perform_task(instructions, cwd="/path/to/working/directory", auto=True, approve_all_commands=True)
Working Directory
MiniCline performs all operations within a specified working directory. File paths and commands are interpreted relative to this directory. When using the CLI, the working directory defaults to the current directory. When using the Python API, specify the working directory using the cwd parameter.
Automation Options
The CLI supports two automation flags that can streamline task execution:
-
--auto: Enables automatic mode where no user input is required. The AI will proceed with all actions without asking for confirmation, except for commands that require approval (unless--approve-all-commandsis also set). -
--approve-all-commands: Automatically approves all commands that would normally require manual approval. This includes potentially impactful operations like installing packages, modifying system files, or running network operations.
Use these options with caution, especially in production environments, as they bypass normal safety prompts and confirmations.
Some notes about changes to the system prompt relative to Cline
In auto mode, don't provide instructions for ask_followup_question as it will be ignored.
Updated the "Tool Use Formatting" to be explicit about using the tags because I found that some models didn't make use of that.
Removed all MCP functionality.
Support read_image in addition to read_file.
License
This project is licensed under the Apache 2.0 License.
Project details
Release history Release notifications | RSS feed
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 minicline-0.1.9.tar.gz.
File metadata
- Download URL: minicline-0.1.9.tar.gz
- Upload date:
- Size: 25.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a1c6efa25c10079dc3d785bf2d9ec56da2486bfa246a3078613c9207ba049142
|
|
| MD5 |
fd997adc15aa842ea11f58abe937ce2f
|
|
| BLAKE2b-256 |
67bbc1ea7b683748196d23bb2bc7c52db5ccfe2181bf4ba325dc37f6d2a376fb
|
File details
Details for the file minicline-0.1.9-py3-none-any.whl.
File metadata
- Download URL: minicline-0.1.9-py3-none-any.whl
- Upload date:
- Size: 32.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
247e18d2d56a8b9024f88cd7c5f7519ac1a18af8e1a194800a1a9211c4df38de
|
|
| MD5 |
34b685dad426873f7745bf214de54c2a
|
|
| BLAKE2b-256 |
b22a25cfab8e62fa4d39ce7d0a4043d92b062e6a52bc5463d3379e48f944cda2
|