A command-line client for the Confy encrypted communication system.
A secure command-line interface for peer-to-peer encrypted messaging using the Confy communication system. This CLI enables users to establish encrypted connections with other peers, exchange cryptographic keys, and communicate with end-to-end encryption using industry-standard algorithms.
Learn more about the project at github.com/confy-security
Made with dedication by students from Brazil π§π·.
- End-to-End Encryption - Messages are encrypted using AES-256 in CFB mode
- Digital Signatures - Messages are signed using RSA with PSS padding for authenticity
- Secure Key Exchange - RSA-4096 key exchange with OAEP padding
- Interactive Terminal - User-friendly command-line interface using prompt-toolkit and Typer
- Debug Mode - Detailed logging for troubleshooting and development
- Cross-Platform - Works on Windows, macOS, and Linux
- WebSocket Support - Secure peer-to-peer communication over WebSocket (WSS)
- Python: 3.13 or higher
- OS: Windows, macOS, or Linux
Install the CLI globally with your Python package manager of choice.
pipx install confy-cliYou can install the CLI from the AUR using an AUR helper like yay:
yay -S confy-cliAlternatively, you can use the CLI via a Docker container:
docker run -it ghcr.io/confy-security/cli:latestOnce inside the container, you can use the CLI normally:
confy start your-user-id recipient-user-idTo build the Docker image locally:
docker build -t confy-cli .
docker run -it confy-cliStart a secure conversation with another peer:
confy start your-user-id recipient-user-idWhen prompted, enter the server address:
Server address: wss://secure-server.example.comTip
To learn how to deploy your own self-hosted Confy server, see github.com/confy-security/server.
Once connected, you can:
- Send messages - Type your message and press Enter
- Receive messages - Messages from peers appear in real-time
- Exit - Type
exitto end the session
$ confy start alice bob
Server address: wss://secure-server.example.com
[SYSTEM] Waiting for recipient to connect...
[SYSTEM] The recipient is now connected.
> Hello Bob, this is Alice!
[RECEIVED] Hi Alice! I received your message.
> exit- RSA Key Generation - Each client generates a 4096-bit RSA key pair
- Public Key Exchange - Public keys are exchanged securely over WebSocket
- AES Key Generation - A random 256-bit AES key is generated
- Encrypted Key Distribution - AES key is encrypted with peer's RSA public key
- Secure Communication - All messages are encrypted with the shared AES key and signed
- Message Encryption - AES-256 in CFB mode
- Key Encryption - RSA-4096 with OAEP padding
- Signatures - RSA-4096 with PSS padding and SHA-256
- Cryptography Library - Uses the
cryptographylibrary (actively maintained)
Configure the CLI using environment variables:
# Enable debug mode
export DEBUG=true
# Or set it in .env file
DEBUG=falseCreate a .env file in your project directory:
DEBUG=falseThe server address can be specified as:
- Secure WebSocket -
wss://example.com(recommended) - WebSocket -
ws://example.com(use only for testing) - HTTPS -
https://example.com(automatically converts to WSS) - HTTP -
http://example.com(automatically converts to WS)
The CLI stores your connection history in:
~/.confy_address_historyThis allows you to quickly access previously used server addresses using arrow keys.
"Error connecting to server"
- Verify the server address is correct
- Ensure the server is running and accessible
- Check your network connectivity
- For WSS connections, verify the SSL certificate is valid
"Connection refused"
- Confirm the server is listening on the specified address and port
- Check if a firewall is blocking the connection
"AES key has not been established yet"
- Wait a moment for the key exchange to complete
- Ensure both peers are connected
- Check if the server is properly relaying messages
"Failed to encrypt/verify message"
- This indicates an issue with the encryption layer
- Try reconnecting to the server
- Check if both peers are running compatible CLI versions
Slow response times
- Check your network latency to the server
- Consider using a server closer to your location
- Reduce the frequency of large messages
confy start alice bobYou'll be prompted to enter the server address. For the first time, you can enter:
Server address: wss://secure-server.example.comSimply type your message and press Enter:
> Your encrypted message here- Verify Recipients - Ensure you're communicating with the intended person
- Secure Connections - Always use WSS (WebSocket Secure) in production
- Key Management - Store your user ID securely
- Session Management - End sessions with
exitwhen finished
Enable debug mode to see detailed information:
DEBUG=true confy start alice bobThis will display:
- Key exchange details
- Message encryption/decryption info
- Connection status changes
- Signature verification steps
Connect to a custom server:
confy start your-id recipient-id
Server address: wss://your-custom-server.com:8080Confy CLI relies on:
- typer (>=0.15.4, <0.16.0) - CLI framework
- websockets (>=15.0.1, <16.0.0) - WebSocket protocol support
- pydantic-settings (>=2.11.0, <3.0.0) - Configuration management
- confy-addons (>=1.1.0, <2.0.0) - Encryption primitives
- prompt-toolkit (>=3.0.52, <4.0.0) - Terminal interface
All dependencies are installed automatically with pip.
If you encounter any issues, please report them:
- Check if the issue already exists on GitHub Issues
- Provide clear reproduction steps
- Include your Python version and OS
- Attach relevant logs with
DEBUG=true
See CONTRIBUTING.md for more information.
For security vulnerabilities, please follow responsible disclosure:
DO NOT open a public GitHub issue.
Instead, email: confy@henriquesebastiao.com
See SECURITY.md for detailed information.
We welcome contributions! Please see CONTRIBUTING.md for guidelines on:
- Setting up the development environment
- Code standards and style guidelines
- Testing requirements
- Pull request process
Confy CLI is open source software licensed under the GPL-3.0 license.
- Confy Security - github.com/confy-security
- Contributing Guide - CONTRIBUTING.md
- Security Policy - SECURITY.md
- Code of Conduct - CODE_OF_CONDUCT.md
For questions and support:
- Check existing issues and discussions on GitHub
- Review the CONTRIBUTING.md guide
- Contact the team at confy@henriquesebastiao.com
This project was created with dedication by Brazilian students π§π· as part of the Confy Security initiative.
Built with β€οΈ by the Confy Security Team