Skip to main content

A single CLI to connect with OpenAI, Ollama, and more AI providers.

Project description

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/

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

tasklin-0.0.3.tar.gz (8.6 kB view details)

Uploaded Source

Built Distribution

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

tasklin-0.0.3-py3-none-any.whl (10.0 kB view details)

Uploaded Python 3

File details

Details for the file tasklin-0.0.3.tar.gz.

File metadata

  • Download URL: tasklin-0.0.3.tar.gz
  • Upload date:
  • Size: 8.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for tasklin-0.0.3.tar.gz
Algorithm Hash digest
SHA256 6b005ace3b2d6881e419f452d2bffe7738eba14d66ad35a59d5088e05f4591e2
MD5 ac7af57df25d92615ff8fb162ed5736e
BLAKE2b-256 3c2ec4f58fb731c5cd6a0f1d5fe617cd5c281ea08c9ebf28543066fcfa333a74

See more details on using hashes here.

File details

Details for the file tasklin-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: tasklin-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 10.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for tasklin-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 929e144091ba699533c8037109a33df59854b3c74b8e7c08658504b5dc1330a0
MD5 1d56eb807210affb6ae95c6a7a155a4e
BLAKE2b-256 42b47ec320a76acf61a5d602d5fb03f635c4a46e92754f4c44e1b66a4d43d859

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