Expressive phrase generator β strong, modern, and minimalist.
Built entirely in Python for CLI environments on Linux and Windows.
- π§ Project Overview
- π Disclaimer
- π Interactive Web Version
- β¨ Features
- π Requirements
- πΎ Installation
- π Command Line Interface
- π Generation Rules
- π Word Bank Specs
- π XPhrase Calculation Methodology
- π’ Reporting Issues
- π Reporting Bugs
- π‘οΈ Security - Reporting a Vulnerability
- π€ Contributing
- π Release Notes
- π Changelog
- π¬ Contact
- π License
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.
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.
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.
- 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
- At least one special character:
- 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
- Python 3.8+
- No external dependencies
- Works on:
- β Linux (Debian, Ubuntu, Arch, etc.)
- β Windows (PowerShell, CMD)
- No additional dependencies are required, as the project uses only Python standard libraries.
- Ensure you have Python 3.8 or higher installed.
- Clone the repository:
git clone https://github.com/gerivanc/xphrase.git
cd xphrase
π¦οΈ 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:
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
PYTHONPATH=src python src/xphrase/main.py --interactive
PYTHONPATH=src python src/xphrase/main.py --version
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
echo 'PYTHONPATH=src python src/xphrase/main.py "$@"' > xphrase.sh
chmod +x xphrase.sh
./xphrase.sh --interactive
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
./gerar
./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
./gerar --interactive
./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
./run.py
./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
./run.py --interactive
./run.py --version
- 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
- 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
.txtfiles inside thedata/folder. - Words are randomly selected and mixed across languages.
| Language | Word Count |
|---|---|
| English | 1,334 |
| Portuguese | 1,333 |
| German | 1,333 |
Generation phrase by Phrase Formation Rules:
For a phrase with ( n ) words (( 3 \leq n \leq 21 )):
- 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
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
- Words are concatenated directly with their modifications
- No fixed separator between augmented words
- Example:
davor,9MΓΆglichkeit]3ThermometeR
- 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.
Help us improve XPhrase Generation by reporting bugs or suggesting enhancements to project. To report a bug, suggest a feature, or ask a question:
-
Go to the Issues tab.
-
Click New issue.
-
View the available options and select to: Report Bug and/or Report Issue. For security vulnerabilities, please follow our Security Policy.
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.
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.
Contributions are welcome! Please follow the guidelines in CONTRIBUTING.md.
See the RELEASE.md for detailed release notes for each version.
See the CHANGELOG.md for a detailed history of changes to this project.
E-mail: ask@gerivan.me
Location: Brazil
Feel free to reach out for collaboration or feedback!
This repository is licensed under the MIT License.
XPhrase Generation β Expressive phrases. Strong logic. Minimalist design Β© 2025