🔌 Dircom
Dircom is a lightweight, cross-platform command-line utility written in Python to list available serial (COM) ports on your system, with special emphasis on USB-connected devices. Ideal for developers working with ESP32, Arduino, Raspberry Pi, sensors, and other serial peripherals.
🚀 Features
- Lists all available serial ports (COM on Windows,
/dev/tty*on Unix-like systems) - Filters only USB-connected ports (
--usb-only) - Tags USB ports with
[USB] - Compatible with Windows, Linux, and macOS
- Simple, easy-to-use CLI
- Can be packaged as a standalone executable for Windows
💻 Usage
dircom [options]
Options
| Flag | Description |
|---|---|
-u, --usb-only |
Show only USB-connected ports |
-v, --version |
Display the current Dircom version |
-h, --help |
Show help message and exit |
Examples
dircom
dircom --usb-only
dircom --version
🔧 Installation
From PyPI
pip install dircom
🛠️ Compiling to a Windows Executable
If you want to distribute Dircom without requiring Python:
- Install PyInstaller:
pip install pyinstaller
- Build the executable:
pyinstaller --onefile --name dircom dircom.py
- The standalone executable will be created at:
dist/dircom.exe
🐧 Linux / macOS
Run directly with Python:
python3 dircom.py
Or package with PyInstaller on the target operating system.
📂 Recommended Project Structure
dircom/
├── dircom.py
├── README.md
├── .gitignore
├── requirements.txt
├── setup.py
├── MANIFEST.in
├── LICENSE
└── .github/
└── workflows/
└── python-ci.yml
📦 Requirements
Ensure your requirements.txt contains:
pyserial>=3.5
📜 License
This project is licensed under the GNU General Public License v3.0 (GPL-3.0). See the LICENSE file for details.
📝 TODO
- Fully test functionality on Windows
- Test on Linux (various distributions)
- Test on macOS
- Add automated tests (e.g., pytest)
- Build executables for Linux and macOS
- Publish GitHub releases
🤝 Contributions
Contributions are welcome! Feel free to open issues or pull requests.
🔗 Author
Nelson Almeida
https://github.com/ncamilo
Metadata
Release files for dircom 1.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| dircom-1.0.2.tar.gz | 15.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| dircom-1.0.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 31.7 kB
Release files / dircom-1.0.2.tar.gz
| Download URL | dircom-1.0.2.tar.gz |
|---|---|
| Size | 15.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
14d60bd88cae0ee2b706b50481f76e93f8c615bbe6746407edc4ee15b2bcb82b
|
|
BLAKE2b-256 checksum How to use checksums |
8e90cbb9ec267b190e42e8bf106d63e64fd9a116f34b8504cd24519ba656a268
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.10.11
|
Release files / dircom-1.0.2-py3-none-any.whl
| Download URL | dircom-1.0.2-py3-none-any.whl |
|---|---|
| Size | 15.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
059277e545c57fd68c7034ee1c3b500228992754ee80555a85b3781d3a313353
|
|
BLAKE2b-256 checksum How to use checksums |
5d7d31b48cbaede9aef549ff4d9cf7eda7e7f1584520ec6ddbd0429ee6d98338
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.10.11
|