Skip to main content

Expressive phrase generator, strong, modern and minimalist

Project description

๐Ÿงฉ XPHRASE GENERATION

Expressive phrase generator โ€” strong, modern, and minimalist.
Built entirely in Python for CLI environments on Linux and Windows.

Maintained CI License: MIT Python 3.10+ PyPI TestPyPI


๐Ÿ“‘ Table of Contents


๐Ÿง  Project Overview

XPhrase Generation is a multilingual phrase generator designed for command-line interface (CLI) usage.
It creates expressive, randomized phrases using words from Portuguese, English, and German, interlinked with special characters and digits. The principle of randomness enables the generation of over 12.6 trillion unique combinations by interconnecting words from three languages, along with the inclusion of special characters and numerical digits.

This project is:

  • ๐Ÿ’ฏ Written 100% in Python
  • ๐Ÿ–ฅ๏ธ CLI-compatible for Linux and Windows
  • ๐ŸŒ The CLI project has been fully converted to the web version of the HTML interface, maintaining the same phrase generation method, now accessible directly in your browser.

๐Ÿ“œ Disclaimer

Do not attempt to memorize the passwords generated by this tool. Instead, use a reliable password manager, such as Bitwardenยฉ, which I personally recommend. The only password you should memorize is the master password for your password manager's vault, created with a strong combination of uppercase and lowercase letters, numbers, and special characters. Enable two-factor authentication (2FA) whenever possible to enhance security. A great option for managing your 2FA is Ente Auth , a free, open-source, and cross-platform app that provides end-to-end encrypted backups. Ente Auth ensures your 2FA codes are secure and synced across devices, with externally audited encryption, offering robust protection for all your accounts that support 2FA.


๐ŸŒ Interactive Web Version

Experience the XPhrase Generation directly in your browser! The web version offers all the functionality of the Python script in an intuitive and responsive interface.

๐Ÿš€ Access the Web Version

โšก Interactive Demo


โœจ Features

  • Generates phrases with 3 to 21 words
  • Words are randomly selected from Portuguese, English, and German word banks
  • Each word is interlinked with:
    • At least one special character: !@#$%^&*()_+-=[]{}|;:,.<>?~\\
    • At least one digit: 0123456789
  • The last character of the final word is always uppercase
  • Example of output for generating a phrase with eight words plus numeric and special characters:
    Note,8oxidar+6truly=3Chaos\1ressaca[3kind;1achtzehn_9descrรฉditO

๐Ÿ“‹ Requirements

  • Python 3.8+
  • No external dependencies
  • Works on:
    • โœ… Linux (Debian, Ubuntu, Arch, etc.)
    • โœ… Windows (PowerShell, CMD)

๐Ÿ’พ Installation

  1. No additional dependencies are required, as the project uses only Python standard libraries.
  2. Ensure you have Python 3.8 or higher installed.
  3. Clone the repository:
git clone https://github.com/gerivanc/xphrase.git
cd xphrase

๐Ÿ“Ÿ Command Line Interface

๐Ÿ“ฆ๏ธ After installation, navigate to the directory where the XPhrase Generation repository folder was installed, then choose one of the following options to generate the phrases:

๐Ÿงช Mode 'PYTHONPATH='

5๏ธโƒฃ๐Ÿ”Ÿ The parameter should be between 5 and 10 words long.

PYTHONPATH=src python src/xphrase/main.py --count 5

โž–โž• Defines the minimum and maximum number of words to be generated in the sentence. --min and --max must be between 3-21 and min <= max.

PYTHONPATH=src python src/xphrase/main.py --min 5 --max 21

๐Ÿ“‹๐Ÿ”˜ Interactive menu - generates unique and multiple phrases.

PYTHONPATH=src python src/xphrase/main.py --interactive

๐Ÿ“ฆโœจ Show which version of XPhrase Generation it is.

PYTHONPATH=src python src/xphrase/main.py --version

๐Ÿงช Mode 'echo PYTHONPATH='

5๏ธโƒฃ๐Ÿ”Ÿ The parameter should be between 5 and 10 words long.

echo 'PYTHONPATH=src python src/xphrase/main.py "$@"' > xphrase.sh
chmod +x xphrase.sh
./xphrase.sh --count 10

โž–โž• Defines the minimum and maximum number of words to be generated in the sentence. --min and --max must be between 3-21 and min <= max.

echo 'PYTHONPATH=src python src/xphrase/main.py "$@"' > xphrase.sh
chmod +x xphrase.sh
./xphrase.sh --min 5 --max 21

๐Ÿ“‹๐Ÿ”˜ Interactive menu - generates unique and multiple phrases.

echo 'PYTHONPATH=src python src/xphrase/main.py "$@"' > xphrase.sh
chmod +x xphrase.sh
./xphrase.sh --interactive

๐Ÿ“ฆโœจ Show which version of XPhrase Generation it is.

echo 'PYTHONPATH=src python src/xphrase/main.py "$@"' > xphrase.sh
chmod +x xphrase.sh
./xphrase.sh --version

๐Ÿงช Mode './gerar'. Apply the script below before activating the './generate' mode to generate the phrases. Do this only on the first installation; after installation, navigate to the directory and generate the phrase using the function.:

cd xphrase
cat > gerar << 'EOF'
#!/usr/bin/env python3
import sys
sys.path.insert(0, 'src')
from xphrase.main import main
if __name__ == '__main__':
    main()
EOF

chmod +x gerar

๐Ÿ“โœจ The parameter generates a single sentence with 8 words.

./gerar

5๏ธโƒฃ๐Ÿ”Ÿ The parameter should be between 5 and 10 words long.

./gerar --count 7

โž–โž• Defines the minimum and maximum number of words to be generated in the sentence. --min and --max must be between 3-21 and min <= max.

./gerar --min 5 --max 21

๐Ÿ“‹๐Ÿ”˜ Interactive menu - generates unique and multiple phrases.

./gerar --interactive

๐Ÿ“ฆโœจ Show which version of XPhrase Generation it is.

./gerar --version

๐Ÿงช Mode './run.py'. Apply the script below before activating the './run.py' mode to generate the phrases. Do this only on the first installation; after installation, navigate to the directory and generate the phrase using the function.:

cd xphrase
cat > run.py << 'EOF'
#!/usr/bin/env python3
import sys
import os

sys.path.insert(0, os.path.join(os.path.dirname(__file__), 'src'))

from xphrase.main import main

if __name__ == '__main__':
    main()
EOF

chmod +x run.py

๐Ÿ“โœจ The parameter generates a single sentence with 8 words.

./run.py

5๏ธโƒฃ๐Ÿ”Ÿ The parameter should be between 5 and 10 words long.

./run.py --count 9

โž–โž• Defines the minimum and maximum number of words to be generated in the sentence. --min and --max must be between 3-21 and min <= max.

./run.py --min 5 --max 21

๐Ÿ“‹๐Ÿ”˜ Interactive menu - generates unique and multiple phrases.

./run.py --interactive

๐Ÿ“ฆโœจ Show which version of XPhrase Generation it is.

./run.py --version

๐Ÿ” Generation Rules

  • Phrase length: 3 to 21 words
  • Each word must include:
    • 1+ special character
    • 1+ digit
  • Final word must end with a capital letter
  • Language order is randomized

๐Ÿ“š Word Bank Specs

  • It contains 4,000 specific words, selected from the vocabulary of three different languages.
  • This project was created by selecting words to generate sentences in three languages: English, Portuguese, and German.
  • All words are stored in separate .txt files inside the data/ folder.
  • Words are randomly selected and mixed across languages.
Language Word Count
English 1,334
Portuguese 1,333
German 1,333

๐Ÿ“Š XPhrase Calculation Methodology

Generation phrase by Phrase Formation Rules:

For a phrase with ( n ) words (( 3 \leq n \leq 21 )):

1. Word Selection

  • Each word is selected randomly with replacement from the pool of 4,000
  • Language origin is random per word (uniform distribution across 3 languages)
  • Order matters, repetitions allowed

2. Per-Word Modification

For each selected word:

  • Insert at least one digit (0โ€“9) โ†’ 10 options
  • Insert at least one special character from:
    !@#$%^&*()_+-=[]{}|;:,.<>?~\\
    
    โ†’ 29 special characters
  • Insertions occur between letters, before, or after the word
  • Multiple insertions allowed (no upper limit per word)
  • No fixed pattern โ€” randomness ensures entropy

3. Inter-Word Linking

  • Words are concatenated directly with their modifications
  • No fixed separator between augmented words
  • Example: davor,9Mรถglichkeit]3ThermometeR

4. Final Word Capitalization

  • The last character of the final word must be a letter and is forced uppercase
  • If the last character after modification is not a letter, a valid letter is appended and uppercased

See the XPHRASECALCULATION.md for details.


๐Ÿ“ข REPORTING ISSUES

Help us improve XPhrase Generation by reporting bugs or suggesting enhancements to project. To report a bug, suggest a feature, or ask a question:

  1. Go to the Issues tab.

  2. Click New issue.

  3. View the available options and select to: Report Bug and/or Report Issue. For security vulnerabilities, please follow our Security Policy.


๐Ÿž REPORTING BUGS

If you encounter a bug in the XPhrase Generation, please report it using our dedicated Bug Report template. This template ensures that your report includes essential details, such as steps to reproduce, environment information, and logs, enabling us to address issues efficiently. For other types of contributions or inquiries, refer to our CONTRIBUTING.md.


๐Ÿ›ก๏ธ Security - Reporting a Vulnerability

For security vulnerabilities, follow the process in SECURITY.md instead of opening a public issue. We recommend using a password manager and enabling 2FA for enhanced security.


๐Ÿค CONTRIBUTING

Contributions are welcome! Please follow the guidelines in CONTRIBUTING.md.


๐Ÿ“ RELEASE NOTES

See the RELEASE.md for detailed release notes for each version.


๐Ÿ“… CHANGELOG

See the CHANGELOG.md for a detailed history of changes to this project.


๐Ÿ’ฌ CONTACT

E-mail: ask@gerivan.me
Location: Brazil
Feel free to reach out for collaboration or feedback!


๐Ÿ“œ LICENSE

This repository is licensed under the MIT License.


Copyright ยฉ 2025 Gerivan Costa dos Santos

XPhrase Generation โ€” Expressive phrases. Strong logic. Minimalist design ยฉ 2025

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

xphrase-1.0.4.tar.gz (967.3 kB view details)

Uploaded Source

Built Distribution

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

xphrase-1.0.4-py3-none-any.whl (44.9 kB view details)

Uploaded Python 3

File details

Details for the file xphrase-1.0.4.tar.gz.

File metadata

  • Download URL: xphrase-1.0.4.tar.gz
  • Upload date:
  • Size: 967.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for xphrase-1.0.4.tar.gz
Algorithm Hash digest
SHA256 8a1a016c3171abfa031871f4bc4763819792ba8cdc7608d2d287fce923773ce0
MD5 56ea692df5b2d30fcbf02e7a8117aacf
BLAKE2b-256 9d907a4e4ff61fe369707bc682307baeb1868c5f1d8a8c239ae5d0a5ca08cb50

See more details on using hashes here.

File details

Details for the file xphrase-1.0.4-py3-none-any.whl.

File metadata

  • Download URL: xphrase-1.0.4-py3-none-any.whl
  • Upload date:
  • Size: 44.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for xphrase-1.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 bf0bc63384a45d5c74f8c792cf205cee4a601c6b2e57fbd95061d644e32dc6a8
MD5 f441d0d1d0117a90420520ff77f34807
BLAKE2b-256 6642013bc5e6d0f86f0671ae290f7396f9bec2f21b204a3fa7a87eb2c2724d5e

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