Skip to main content

Tasklin

PyPI Python Version License Build

Tasklin is a Python CLI for integrating multiple AI providers into scripts, pipelines, or automation workflows. It’s built for developers who want structured AI outputs for tasks, processing, or data generation, without being limited to interactive chat.

Website: https://tasklin.dev


Features

  • Single CLI for multiple AI providers
  • Supports OpenAI, Ollama, Anthropic (Claude), DeepSeek, and more
  • Returns structured responses including tokens used and execution time
  • Supports sync and async execution
  • Clean error handling for missing models, invalid API keys, etc.
  • Cross-platform
  • Installable from PyPI as tasklin

Installation

Clone the repo and install dependencies:

git clone https://github.com/jetroni/tasklin.git
cd tasklin
python -m venv .venv
source .venv/bin/activate   # Windows: .venv\Scripts\activate
pip install -r requirements.txt

Or install directly from PyPI:

pip install tasklin

(Optional) Make the CLI globally executable:

pip install --editable .

Usage

Basic example:

tasklin "Generate a report from this data" --type openai --key MY_KEY

Ollama example (self-hosted):

tasklin "Run analysis" --type ollama --base-url http://localhost:11434 --model codellama

⚠️ Async mode is planned but not implemented yet.


CLI Options

Option Description
--type AI provider type (openai, ollama, etc.)
--key API key for authenticated providers
--model Model name (default varies per provider)
--base-url Base URL for self-hosted providers
--async-mode Run asynchronously (flag, no value needed)
"prompt" Your actual input/prompt (positional argument)

Response Structure

All responses are returned as a structured JSON object:

{
  "provider": "openai",
  "model": "gpt-4o-mini",
  "output": "Task output here",
  "raw": {...},
  "tokens_used": 17,
  "duration_ms": 543
}

Contributing

Contributions are welcome:

  • Add new AI providers
  • Improve error handling
  • Enhance async execution and CLI experience

Fork the repo and submit a pull request.


PyPI

Install via:

pip install tasklin

Latest releases: https://pypi.org/project/tasklin/

Release files for tasklin 0.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tasklin 0.0.3
File Size Uploaded
tasklin-0.0.3.tar.gz 8.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for tasklin 0.0.3
File Interpreter ABI Platform
tasklin-0.0.3-py3-none-any.whl Python 3 none any Details

Total release size: 18.6 kB

Release files / tasklin-0.0.3.tar.gz

Download URL tasklin-0.0.3.tar.gz
Size 8.6 kB
Tags Source
SHA-256 checksum
How to use checksums
6b005ace3b2d6881e419f452d2bffe7738eba14d66ad35a59d5088e05f4591e2
BLAKE2b-256 checksum
How to use checksums
3c2ec4f58fb731c5cd6a0f1d5fe617cd5c281ea08c9ebf28543066fcfa333a74
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.9

Release files / tasklin-0.0.3-py3-none-any.whl

Download URL tasklin-0.0.3-py3-none-any.whl
Size 10.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
929e144091ba699533c8037109a33df59854b3c74b8e7c08658504b5dc1330a0
BLAKE2b-256 checksum
How to use checksums
42b47ec320a76acf61a5d602d5fb03f635c4a46e92754f4c44e1b66a4d43d859
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.9

Release history Release notifications | RSS feed

This release

0.0.3 This release

2 release files

0.0.2

2 release files

0.0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page