Skip to main content

MyText: A Minimal AI-Powered Text Rewriting Tool


built with Python3 GitHub repo size PyPI version

Overview

MyText is a lightweight AI-powered text enhancement tool that rewrites, paraphrases, and adjusts tone using modern LLM providers. It offers a clean command-line interface and a minimal Python API, supports multiple providers (Google AI Studio & Cloudflare Workers AI), and automatically selects the first available provider based on your environment variables.

PyPI Counter
Github Stars
Branch main dev
CI
Code Quality CodeFactor

Installation

Source Code

PyPI

Usage

CLI

Single Run

Executes a one-time text transformation using the provided options and exits immediately after producing the result.

mytext \
  "Can you update me on the project timeline by the end of the day?"
  --mode="paraphrase" \
  --tone="formal"

Loop

Starts an interactive session that repeatedly accepts new text inputs from the user while keeping the same configuration until the process is terminated.

mytext \
  --mode="paraphrase" \
  --tone="formal" \
  --loop

Arguments

Argument Description Default
text/--text Text to process (required unless --loop is used) -
--mode Text processing mode polish
--tone Output text desired tone preserve
--provider AI provider selection auto
--loop Enable interactive loop mode false
--model Override provider LLM model -
--version Show application version -
--info Show application information -

ℹ️ Supported modes: polish, paraphrase, grammar, summarize, simplify, bulletize, shorten, emojify

ℹ️ Supported tones: preserve, neutral, formal, casual, friendly, professional, academic, creative, biblical, viking, zen, corporate

ℹ️ Supported providers: auto, ai-studio, cloudflare, openrouter, cerebras, groq, nvidia

Library

You can also use MyText directly inside Python.

from mytext import run_mytext
from mytext import Mode, Tone, Provider

auth = {"api_key": "YOUR_KEY"}
result = run_mytext(
    text="Let me know if you have any questions after reviewing the attached document.",
    auth=auth,
    mode=Mode.PARAPHRASE,
    tone=Tone.NEUTRAL,
    provider=Provider.AI_STUDIO
)

print(result["status"], result["message"])

Parameters

Parameter Description Default
text Input text to process -
auth Authentication parameters for the provider -
mode Text processing mode Mode.POLISH
tone Output text desired tone Tone.PRESERVE
provider AI provider Provider.AI_STUDIO
model Override provider LLM model None

Supported Providers

MyText automatically detects which providers are available based on environment variables. Each provider has a default model. You may optionally override it using either the CLI --model argument or a *_MODEL environment variable.

Provider Required Environment Variables Default Model Optional Model Override Status
AI Studio AI_STUDIO_API_KEY gemma-4-31b-it AI_STUDIO_MODEL
Cloudflare CLOUDFLARE_API_KEY, CLOUDFLARE_ACCOUNT_ID llama-3.1-8b-instruct-fast CLOUDFLARE_MODEL
OpenRouter OPENROUTER_API_KEY nvidia/nemotron-3-super-120b-a12b:free OPENROUTER_MODEL
Cerebras CEREBRAS_API_KEY gpt-oss-120b CEREBRAS_MODEL
Groq GROQ_API_KEY openai/gpt-oss-20b GROQ_MODEL
NVIDIA NVIDIA_API_KEY nvidia/nemotron-3-super-120b-a12b NVIDIA_MODEL

Configuration Resolution Priority

MyText supports multiple configuration sources (CLI arguments, environment variables, and built-in defaults). When resolving any configurable parameter (e.g., model), MyText follows this priority order:

  1. CLI argument (highest priority)
  2. Corresponding environment variable
  3. Built-in default value (lowest priority)

Issues & Bug Reports

Just fill an issue and describe it. We'll check it ASAP!

  • Please complete the issue template

Show Your Support

Star This Repo

Give a ⭐️ if this project helped you!

Donate to Our Project

Bitcoin

1KtNLEEeUbTEK9PdN6Ya3ZAKXaqoKUuxCy

Ethereum

0xcD4Db18B6664A9662123D4307B074aE968535388

Litecoin

Ldnz5gMcEeV8BAdsyf8FstWDC6uyYR6pgZ

Doge

DDUnKpFQbBqLpFVZ9DfuVysBdr249HxVDh

Tron

TCZxzPZLcJHr2qR3uPUB1tXB6L3FDSSAx7

Ripple

rN7ZuRG7HDGHR5nof8nu5LrsbmSB61V1qq

Binance Coin

bnb1zglwcf0ac3d0s2f6ck5kgwvcru4tlctt4p5qef

Tether

0xcD4Db18B6664A9662123D4307B074aE968535388

Dash

Xd3Yn2qZJ7VE8nbKw2fS98aLxR5M6WUU3s

Stellar

GALPOLPISRHIYHLQER2TLJRGUSZH52RYDK6C3HIU4PSMNAV65Q36EGNL

Zilliqa

zil1knmz8zj88cf0exr2ry7nav9elehxfcgqu3c5e5

Coffeete

Changelog

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog and this project adheres to Semantic Versioning.

Unreleased

1.0 - 2026-10-23

Added

  • polish mode
  • preserve tone

Changed

  • Default mode changed to polish
  • Default tone changed to preserve
  • Timeout default value changed to 25
  • _print_mytext_info function modified
  • _build_instruction function modified
  • Instructions modified
  • Python 3.15 added to test.yml
  • Python 3.7 support dropped
  • README.md updated
  • Build system modified
  • OpenRouter default model changed to nvidia/nemotron-3-super-120b-a12b:free

0.9 - 2026-09-30

Added

  • text CLI argument

Changed

  • Providers credentials load bug fixed
  • API call functions modified
  • Cerebras default model changed to gpt-oss-120b
  • Cloudflare API call bug fixed
  • Test system modified
  • Validation system modified
  • CLI arguments modified
  • README.md updated
  • OpenRouter default model changed to z-ai/glm-5.2:free
  • NVIDIA default model changed to nvidia/nemotron-3-super-120b-a12b
  • max_retries parameter bug fixed
  • max_retries parameter default value changed to 3

Removed

  • GitHub provider

0.8 - 2026-06-14

Added

  • MyTextError class
  • MyTextValidationError class
  • MyTextProviderError class

Changed

  • grammar mode optimized
  • Instructions modified
  • AI Studio default model changed to gemma-4-31b-it
  • Cloudflare default model changed to llama-3.1-8b-instruct-fast
  • README.md updated
  • Test system modified
  • Dependencies structure modified

0.7 - 2026-04-24

Added

  • emojify mode
  • biblical tone
  • viking tone
  • zen tone
  • corporate tone
  • Tone hint

Changed

  • README.md updated
  • Cerebras default model changed to llama3.1-8b
  • Instructions modified

0.6 - 2026-03-11

Added

  • GitHub provider

Changed

  • CLI functions moved to cli.py
  • CLI messages updated
  • CLI modified
  • OpenRouter default model changed to openai/gpt-oss-20b:free
  • Test system modified
  • README.md updated

0.5 - 2026-02-18

Added

  • --provider argument
  • --model argument
  • _load_model_from_env function

Changed

  • model parameter added to run_mytext function
  • AI Studio default model changed to gemma-3-1b-it
  • OpenRouter default model changed to google/gemma-3-27b-it:free
  • Test system modified
  • README.md updated

0.4 - 2025-12-25

Added

  • Groq provider
  • NVIDIA provider
  • --loop argument

Changed

  • Test system modified
  • README.md updated

0.3 - 2025-12-17

Added

  • OpenRouter provider
  • Cerebras provider

Changed

  • Test system modified
  • README.md updated
  • AI Studio main model changed to gemini-2.5-flash
  • AI Studio fallback model changed to gemma-3-1b-it
  • Providers moved to providers.py

0.2 - 2025-12-05

Added

  • Logo
  • summarize mode
  • simplify mode
  • bulletize mode
  • shorten mode

Changed

  • README.md updated
  • Cloudflare fallback model changed to meta/llama-3.1-8b-instruct-fast
  • Model switching modified

0.1 - 2025-11-26

Added

  • run_mytext function
  • AI Studio provider
  • Cloudflare provider
  • --mode argument
  • --tone argument

Metadata

Release files for mytext 1.0

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

Source distribution (sdist)

Source distribution for mytext 1.0
File Size Uploaded Provenance
mytext-1.0.tar.gz 22.2 kB Without provenance Details

Built distribution (wheel)

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

Total release size: 38.4 kB

Release files / mytext-1.0.tar.gz

Download URL mytext-1.0.tar.gz
Size 22.2 kB
Tags Source
SHA-256 checksum
How to use checksums
ac1ddc8a7a0b4733035f4621c99559e59eadbb6fdaf72029b337f0d8697ccdd0
BLAKE2b-256 checksum
How to use checksums
8056fee6a195881b39214f855eb160651f18a91a1669919b62fc3781fade7769
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.8

Release files / mytext-1.0-py3-none-any.whl

Download URL mytext-1.0-py3-none-any.whl
Size 16.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b1ca4041352aaa741ea56e99012a3a93177cee280e6bf82560ae3369903e19ee
BLAKE2b-256 checksum
How to use checksums
eecec2860581522ab68a61efcc068eeedb51a16eab7edc6ebd379cc2059fa29b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.8

Security for mytext 1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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