CLI

CLI (hc)

HeptaCert komut satırı aracı — otomasyon, scripting ve hızlı yönetim için.

Kurulum

pip install heptacert-cli

Veya kaynak koddan:

cd heptacert/cli
pip install -e .

Kurulum sonrası hc komutu kullanılabilir olur:

hc --version

Kimlik 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ı sil

Ortam değişkeni ile de kullanılabilir:

export HEPTACERT_API_KEY=hc_live_...
hc events list

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 42

Katı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 101

CSV Import Formatı:

first_name,last_name,email
Ahmet,Yılmaz,ahmet@example.com
Fatma,Demir,fatma@example.com

Sertifikalar

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 42

Oturumlar

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 7

Check-in

hc checkin lookup 42 "ahmet@example.com"
hc checkin manual 42 7 ahmet@example.com   # event oturum email
hc checkin summary 42

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 5

Otomasyon Kuralları

hc automations list 42
hc automations create 42 \
  --name "Sertifika E-postası" \
  --trigger certificate_issued \
  --actions '[{"type":"send_email","template_id":5}]'

Agent 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 json

Webhooks

hc webhooks list
hc webhooks create https://myapp.com/hooks/heptacert \
  --events "certificate.issued,attendee.registered" \
  --secret mygizlisifre
hc webhooks delete 3
hc webhooks test 3 --event certificate.issued

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

Bağlantı Testi

hc ping                                    # API bağlantısını ve auth'u test et

Örnek çıktı:

✓ Connected to https://heptacert.com
  API:     ok  v1.0.0
  Account: admin@example.com
  Scopes:  all (unscoped)

Çıktı Formatları

Tüm komutlar --output / -o parametresini destekler:

FormatAçıklama
tableRenkli tablo (varsayılan)
jsonHam JSON
csvVirgü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'