afrohub-cli
v1.0.2
Published
CLI pour AfroHub - Plateforme de gestion de code pour l'Afrique. Alternative simple africaine à GitHub
Maintainers
Readme
🌍 AfroHub CLI
La plateforme de gestion de code pour l'Afrique
Installation • Utilisation • Documentation • Contribuer
✨ Fonctionnalités
- 🔐 Authentification sécurisée - Système complet de gestion de comptes
- 📦 Gestion de cores - Créez et gérez vos repositories (équivalent GitHub repos)
- 🚀 Push intelligent - Upload automatique avec détection de structure de projet
- 🌍 Public/Privé - Contrôlez la visibilité de vos projets
- 📊 Statistiques - Suivez la taille et le nombre de fichiers
- 🎯 Scan automatique - Détection des technologies utilisées (React, Vue, Python, etc.)
- ☁️ Stockage cloud - Powered by Supabase pour une infrastructure fiable
- 🌐 Cross-platform - Fonctionne sur Windows, macOS, Linux
🚀 Installation
Via npm (Recommandé)
npm install -g afrohub-cliVia GitHub
git clone https://github.com/devanios/afrohub-cli.git
cd afrohub-cli
npm install
npm linkVérification
afrohub --version
afrohub --help📖 Utilisation
Démarrage rapide (5 minutes)
# 1. Créer un compte
afrohub signup
# 2. Créer un core (repository)
afrohub core --create
# 3. Initialiser votre projet
cd /path/to/your/project
afrohub core --init
# 4. Pousser vos fichiers
afrohub core --pushCommandes principales
Authentification
afrohub signup # Créer un compte
afrohub login # Se connecter
afrohub logout # Se déconnecter
afrohub whoami # Voir le profil
afrohub status # Statut de connexionGestion des Cores
afrohub core --create # Créer un nouveau core
afrohub core --init # Initialiser un core dans le projet actuel
afrohub core --push # Pousser les fichiers vers AfroHub
afrohub core --list # Lister tous vos cores
afrohub core --delete # Supprimer un coreUtilitaires
afrohub --version # Afficher la version
afrohub --help # Afficher l'aide
afrohub about # À propos d'AfroHub CLI💡 Exemples d'utilisation
Exemple 1 : Créer et pousser un projet React
# Créer votre projet React
npx create-react-app mon-app
cd mon-app
# Se connecter à AfroHub
afrohub login
# Créer un core
afrohub core --create
# Nom: mon-app-react
# Description: Ma super application React
# Visibilité: Public
# Initialiser et pousser
afrohub core --init
afrohub core --push
# ✅ Votre projet est maintenant sur AfroHub!Exemple 2 : Workflow complet
# Authentification
afrohub signup
# Email: [email protected]
# Username: devafricain
# Password: ********
# Vérifier le profil
afrohub whoami
# Créer un core pour un projet Node.js
afrohub core --create
# Nom: api-nodejs
# Description: API REST avec Express
# Visibilité: Privé
# Naviguer vers le projet
cd ~/projets/mon-api
# Initialiser
afrohub core --init
# Sélectionner: api-nodejs
# ✅ 45 fichiers détectés (2.3 MB)
# Technologies: Express, MongoDB
# Push
afrohub core --push
# ✅ 45/45 fichiers uploadés avec succès!
# Lister tous les cores
afrohub core --list🔧 Configuration
Fichier de configuration
AfroHub CLI stocke ses configurations dans ~/.afrohub/config.json
{
"auth": {
"accessToken": "...",
"refreshToken": "...",
"user": {
"id": "...",
"email": "..."
}
}
}Fichier .store.afrohub
Après afrohub core --init, un fichier .store.afrohub est créé :
{
"version": "1.0.0",
"core": {
"id": "...",
"name": "mon-projet",
"description": "...",
"is_public": true
},
"project": {
"fileCount": 45,
"totalSize": 2456789
},
"files": [...]
}⚠️ Important : Ajoutez .store.afrohub à votre .gitignore
🌍 Fichiers ignorés par défaut
AfroHub ignore automatiquement :
node_modules/.git/.envet fichiers d'environnementdist/,build/,.next/,out/- Fichiers IDE (
.vscode/,.idea/) - Fichiers OS (
.DS_Store,Thumbs.db) *.log
Personnalisez avec votre .gitignore
📊 Limites
- Taille max par fichier : 50 MB
- Taille max par core : 1 GB
- Nombre de cores : Illimité
- Technologies supportées : Tous langages et frameworks
🛠️ Compatibilité
Systèmes d'exploitation
- ✅ Linux (Ubuntu, Debian, Fedora, Arch, etc.)
- ✅ macOS (10.15+)
- ✅ Windows (10, 11)
Terminaux
- ✅ Bash
- ✅ Zsh
- ✅ Fish
- ✅ PowerShell
- ✅ CMD
- ✅ Git Bash
- ✅ WSL (Windows Subsystem for Linux)
IDE
- ✅ VS Code (Terminal intégré)
- ✅ WebStorm / IntelliJ
- ✅ Sublime Text
- ✅ Atom
- ✅ Vim / Neovim
- ✅ GitHub Codespaces
Node.js
- Minimum : Node.js 16.x
- Recommandé : Node.js 18.x ou 20.x
🐛 Dépannage
Erreur "Module not found"
npm install -g afrohub-cliErreur de permissions (Linux/macOS)
sudo npm install -g afrohub-cliCommande introuvable après installation
# Vérifier l'installation
npm list -g afrohub-cli
# Réinstaller
npm uninstall -g afrohub-cli
npm install -g afrohub-cliEffacer la configuration
rm -rf ~/.afrohub
afrohub loginProblème de connexion
afrohub logout
afrohub login🤝 Contribuer
Les contributions sont les bienvenues !
Comment contribuer
- Fork le projet
- Créez une branche (
git checkout -b feature/AmazingFeature) - Committez vos changements (
git commit -m 'Add AmazingFeature') - Push vers la branche (
git push origin feature/AmazingFeature) - Ouvrez une Pull Request
Guidelines
- Suivez le style de code existant
- Ajoutez des tests si possible
- Mettez à jour la documentation
- Décrivez clairement vos changements
📝 Changelog
Version 1.0.0 (2026-01-25)
- ✨ Nouveau : Système d'authentification complet (signup/login)
- ✨ Nouveau : Gestion des cores (create, init, push, list, delete)
- ✨ Nouveau : Scan automatique de projet
- ✨ Nouveau : Détection de technologies
- ✨ Nouveau : Upload vers Supabase Storage
- ✨ Nouveau : Support multi-plateformes
📄 License
MIT © AfroHub
Voir le fichier LICENSE pour plus de détails.
🙏 Remerciements
- Supabase pour l'infrastructure backend
- Tous les contributeurs et utilisateurs
- La communauté des développeurs africains
🔗 Liens
- 🌐 Site web : https://afrohub.com
- 📖 Documentation : https://docs.afrohub.com
- 🐛 Issues : https://github.com/devanios/afrohub-cli/issues
- 💬 Discussions : https://github.com/devanios/afrohub-cli/discussions
- 📧 Contact : [email protected]
👨💻 Auteur
Devai
- GitHub: @devanios
- Email: [email protected]
Made with ❤️ in Africa, for Africa 🌍
⭐ N'oubliez pas de donner une étoile si ce projet vous a été utile !
ÉTAPE 4 : Créer LICENSE
Créez un fichier LICENSE :
MIT License
Copyright (c) 2026 AfroHub
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.ÉTAPE 5 : Créer .npmignore
Créez .npmignore pour exclure les fichiers inutiles :
# Tests
tests/
*.test.js
coverage/
.nyc_output/
# Development
.vscode/
.idea/
*.swp
*.swo
*~
# Logs
*.log
npm-debug.log*
# OS
.DS_Store
Thumbs.db
# Git
.git/
.gitignore
# Config locale
.afrohub/
.store.afrohub
# Misc
.env
.env.local
TODO.md
NOTES.mdÉTAPE 6 : Mettre à jour .gitignore
Vérifiez votre .gitignore :
# Dependencies
node_modules/
.pnp
.pnp.js
# Testing
coverage/
*.test.js.snap
# Production
build/
dist/
# Environment
.env
.env.local
.env.development.local
.env.test.local
.env.production.local
# Logs
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*
# OS
.DS_Store
Thumbs.db
# IDE
.vscode/
.idea/
*.swp
*.swo
*~
# Config locale (ne pas commit les tokens)
.afrohub/
# Store file
.store.afrohub
# Temp
tmp/
temp/