CLI para listar portas seriais (COM/USB) no Windows, Linux e macOS
Project description
🔌 Dircom
Dircom é um utilitário de linha de comando leve, multiplataforma e escrito em Python, para listar portas seriais disponíveis no sistema — com destaque para portas USB. Ideal para desenvolvedores que trabalham com ESP32, Arduino, Raspberry Pi, sensores e outros dispositivos seriais.
🚀 Funcionalidades
- Lista todas as portas COM/seriais disponíveis
- Filtra somente portas conectadas via USB (
--usb-only) - Marcação clara de portas USB com tag
[USB] - Compatível com Windows, Linux e macOS
- Interface por linha de comando, fácil de usar
- Compilável em
.exepara uso offline em Windows
💻 Uso
python dircom.py
Opções:
| Parâmetro | Descrição |
|---|---|
-u, --usb-only |
Mostra apenas portas USB |
-v, --version |
Mostra a versão atual do utilitário |
-h, --help |
Exibe ajuda e instruções de uso |
Exemplos:
python dircom.py --usb-only
python dircom.py -v
🔧 Instalação
Requisitos:
- Python 3.6 ou superior
- Biblioteca
pyserial
Instale com pip:
pip install pyserial
🛠️ Compilando para .exe no Windows
Para distribuir como um executável standalone (sem Python instalado):
1. Instale o PyInstaller
pip install pyinstaller
2. Compile o script
pyinstaller --onefile --name dircom dircom.py
O executável será gerado em:
dist/dircom.exe
🐧 Linux/macOS
Você pode rodar com:
python3 dircom.py
Ou compilar com PyInstaller no próprio sistema operacional.
📂 Estrutura recomendada
dircom/
├── dircom.py
├── README.md
├── .gitignore
├── requirements.txt
└── LICENSE
📦 Requisitos
Conteúdo de requirements.txt:
pyserial>=3.5
📜 Licença
Distribuído sob a licença MIT.
🤝 Contribuições
Contribuições são bem-vindas! Sinta-se livre para abrir issues ou pull requests com melhorias, sugestões ou correções.
📝 TODO
- Testar funcionalidade completa no Windows
- Testar no Linux com diversas distribuições
- Testar no macOS (ainda não verificado)
- Adicionar testes automatizados (opcional)
- Criar executável para Linux e macOS com PyInstaller
- Publicar no PyPI (como pacote Python)
Sinta-se à vontade para contribuir com testes ou melhorias!
🔗 Autor
Nelson Almeida
github.com/ncamilo
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file dircom-1.0.0.tar.gz.
File metadata
- Download URL: dircom-1.0.0.tar.gz
- Upload date:
- Size: 15.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0b6a0ab6d40bc451ceba631a4d0989ef1f3f04ff2e52109926c47eabc07ccf56
|
|
| MD5 |
702bf5b9d3a0597cf53b582ffcc0afa4
|
|
| BLAKE2b-256 |
b3ac32d3d0ecc0ec494441414f76a1752e05e153ceec75ca36a7b97f0d40cf57
|
File details
Details for the file dircom-1.0.0-py3-none-any.whl.
File metadata
- Download URL: dircom-1.0.0-py3-none-any.whl
- Upload date:
- Size: 15.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c21ea01cc28219513004572a2bac105b241dda456ea303a3f5ea2162443c79ba
|
|
| MD5 |
e340df484e2ce6c73c5e2427a07fdcee
|
|
| BLAKE2b-256 |
24c4d0f635d0598d1f47c299e0c4926c8bec42c1a491bf4998e65ac7ab2974b3
|