CLI (hc)
HeptaCert komut satırı aracı — otomasyon, scripting ve hızlı yönetim için. REST API'nin tamamını terminalden kullanılabilir kılar ve aynı API anahtarı + scope modelini paylaşır.
Kurulum
pip install heptacert-cliVeya kaynak koddan:
cd heptacert/cli
pip install -e .Kurulum sonrası hc komutu kullanılabilir olur:
hc --version
hc --helpKimlik Doğrulama
hc auth login
# API anahtarınızı girin: hc_live_...Anahtar ~/.heptacert/config.json dosyasına kaydedilir.
hc auth status # Giriş durumunu göster
hc auth logout # Kayıtlı anahtarı silOrtam değişkeni ile de kullanılabilir — CI/CD ve sunucu ortamları için önerilir:
export HEPTACERT_API_KEY=hc_live_...
hc events listOrtam değişkeni (HEPTACERT_API_KEY), kayıtlı config dosyasından önceliklidir. Böylece tek bir makinede farklı anahtarlarla farklı scriptler çalıştırabilirsiniz.
Komutlar
Etkinlikler
hc events list # Tüm etkinlikleri listele
hc events list --search "python" # Filtrele
hc events list --output json # JSON çıktısı
hc events get 42 # Tek etkinlik detayı
hc events stats 42 # İstatistikler
hc events create "React Workshop" \
--date 2026-10-15 \
--type workshop \
--location "İstanbul"
hc events update 42 --name "Yeni İsim" --visibility public
hc events delete 42 # Onay sorar
hc events delete 42 --yes # Onay sormadan sil
hc events close-registration 42
hc events open-registration 42Katılımcılar
hc attendees list 42 # Etkinlik 42'nin katılımcıları
hc attendees list 42 --search "ahmet" --limit 50
hc attendees list 42 --output csv # CSV çıktısı
hc attendees add 42 \
--first-name Ahmet \
--last-name Yılmaz \
--email ahmet@example.com
hc attendees import 42 katilimcilar.csv # Toplu import
hc attendees export 42 --output csv # Tüm katılımcıları dışa aktar
hc attendees update 42 101 --email yeni@example.com
hc attendees remove 42 101CSV Import Formatı:
first_name,last_name,email
Ahmet,Yılmaz,ahmet@example.com
Fatma,Demir,fatma@example.comSertifikalar
hc certs list 42
hc certs list 42 --status active
hc certs issue 42 # Tüm uygun katılımcılar
hc certs issue 42 --ids "1,2,3" # Belirli katılımcılar
hc certs revoke 9001 # Sertifika ID'si ile iptal
hc certs tier-summary 42Oturumlar
hc sessions list 42
hc sessions create 42 --title "Keynote" --start "2026-10-15T09:00" --speaker "Dr. Kaya"
hc sessions update 42 7 --location "B Salonu"
hc sessions delete 42 7Check-in
hc checkin lookup 42 "ahmet@example.com"
hc checkin manual 42 7 ahmet@example.com # event oturum email
hc checkin summary 42Otomasyon Kuralları
hc automations list 42
hc automations create 42 \
--name "Sertifika E-postası" \
--trigger certificate_issued \
--actions '[{"type":"send_email","template_id":5}]'LMS
hc lms courses
hc lms course 5
hc lms enrollments 5
hc lms enroll 5 --email ali@example.com --first-name Ali --last-name Veli
hc lms analytics
hc lms analytics 5Agent Logları
hc logs list # Son 20 agent aksiyonu
hc logs list --event 42 # Belirli etkinlik
hc logs list --tool create_event
hc logs list --limit 50 --output jsonWebhooks
hc webhooks list
hc webhooks create https://myapp.com/hooks/heptacert \
--events "cert.issued,cert.revoked"
hc webhooks delete 3Webhook olayları ve imza doğrulama için Webhooks sayfasına bakın.
Konfigürasyon
hc config show # Mevcut ayarları göster
hc config set --api-base https://heptacert.com # API base URL güncelle
hc config path # Config dosyasının yolunu gösterÇıktı Formatları
Tüm liste komutları --output / -o parametresini destekler:
| Format | Açıklama |
|---|---|
table | Renkli tablo (varsayılan) |
json | Ham JSON — programatik işleme için |
csv | Virgülle ayrılmış — başka araçlara pipe etmek için |
hc attendees list 42 --output csv > katilimcilar.csv
hc events list --output json | jq '.[].name'Scripting ve Otomasyon
CLI, script-dostudur. Başarılı komutlar 0, hatalar sıfır-dışı çıkış kodu döndürür — bunu kabuk scriptlerinde kullanabilirsiniz:
#!/usr/bin/env bash
set -euo pipefail
export HEPTACERT_API_KEY=hc_live_...
# Yeni etkinlik oluştur ve ID'sini yakala
EVENT_ID=$(hc events create "Otomatik Etkinlik" --type workshop --output json | jq '.id')
# Katılımcıları import et
hc attendees import "$EVENT_ID" katilimcilar.csv
# Herkese sertifika ver
hc certs issue "$EVENT_ID" --yesCI/CD ortamlarında etkileşimli hc auth login yerine HEPTACERT_API_KEY ortam değişkenini kullanın. Anahtarı pipeline secret'ı olarak saklayın, asla repo'ya koymayın.