npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

lastgen-cli

v1.0.4

Published

Lastgen — OpenAI uyumlu API'lere bağlanan interaktif terminal AI sohbet CLI'ı

Readme

LASTGEN CLI

Lastgen Software CLI Project

OpenAI uyumlu (/v1/chat/completions, /v1/models) herhangi bir API'ye bağlanan, terminal içinde tam ekran TUI arayüzüyle çalışan Global / Kurumsal AI Terminal Asistanı.

Kurumsal LiteLLM proxy, GLM z.ai, OpenAI, OpenRouter, Groq, Together, LM Studio, Ollama gibi tüm OpenAI uyumlu endpoint'lerle çalışır.


Kurulum

npm install
npm run build
npm link        # global "lastgen" komutu

Kullanım

lastgen

İlk çalıştırmada yapılandırma yoksa otomatik olarak /login akışı başlar.


Tam Ekran TUI

╭──────────────────────────────────────╮
│  lastGen pixel logo                  │
│  LASTGEN CLI · Global / Kurumsal AI      │
│  Lastgen Software CLI Project        │
╰──────────────────────────────────────╯

◢ LASTGEN  Merhaba! Bugün ne keşfediyoruz?

  ╭─────────────────────────────────╮
  │ kullanıcı mesajı (beyaz balon)  │
  ╰─────────────────────────────────╯

◢ LASTGEN · glm-5.2
Yanıt token token akar (daktilo efekti)...
↳ 312 tok  ·  4.1s

  ┄──────────────────────────────────
  [1] kuyrukta bekleyen mesaj         ← Ctrl+O ile genişlet/daralt
  ┄──────────────────────────────────
╭──────────────────────────────────────╮
│ › /trello-write-plan▌                │
╰─────────────────── total token: 1.2k╯

TUI özellikleri:

| Özellik | Açıklama | |---------|----------| | Tam ekran alternate buffer | Resize'da bozulma yok, synchronized output | | Daktilo efekti | LASTGEN yanıtları token token yazılır (Markdown render) | | Düşünme animasyonu | Türkçe cümleler glitch→decode efektiyle geçiş yapar | | Scroll | / satır satır, PgUp/PgDn yarım ekran | | Kuyruk (queue) | LASTGEN meşgulken mesajlar sıraya girer, / ile düzenle | | Ctrl+O | Tool call stack'ini genişlet/daralt | | Paste desteği | Bracketed paste — çok satırlı metin ⌗1 47 satır olarak gösterilir | | Komut renklendirme | /login mavi, bilinmeyen komut kırmızı | | Syntax highlighting | Kod blokları VS Code Dark+ temasına yakın renklendirilir | | Rich formatting | Dosya yolu (mavi), class (cyan), fonksiyon (yeşil), satır no (sarı) | | Token göstergesi | Her yanıtta ↳ tok · s (yeşil), sağ altta total token | | Karşılama / veda | Açılışta logo decode animasyonu + Türkçe karşılama, CTRL+C'de veda mesajı | | Lastgen logosu | Banner'da piksel bazlı LED dot-matrix, açılışta glitch→decode efekti | | Ekstra bağlam | write-plan'da kart/issue seçildikten sonra "Seçilen Task" kutusu + opsiyonel ekstra bilgi girişi |

Klavye kısayolları

| Tuş | İşlev | |-----|-------| | Enter | Mesaj gönder | | / | Scroll (normal) · Kuyruk gezme (LASTGEN meşgulken) | | PgUp / PgDn | Yarım ekran scroll | | Ctrl+O | Tool call stack genişlet/daralt (write-plan sırasında) | | Ctrl+C | Veda animasyonu + kayıt + çıkış |


Oturum Yönetimi

~/.lastgen/
├── config.json         # API yapılandırması
├── current-session     # Aktif oturum ID'si
└── sessions/
    ├── 20260618-153000-ab12.json
    └── ...
  • Yeni oturum: lastgen her açıldığında yeni oturum başlar
  • Geçiş: /resume ile ok tuşlu seçici açılır
  • Silme: Session picker'da D tuşu

Komutlar

| Komut | Açıklama | |-------|----------| | /login | Endpoint türü seç (Kurumsal / Global), key gir, doğrula, kaydet | | /models | Modelleri listele ve aktif modeli seç | | /trello | Trello kartından geliştirme planı üret ve dosyaya kaydet | | /trello-login | Trello App Key ve Token ayarla | | /trello-write-plan | Trello kartını AI ile analiz et, JSON uygulama planı üret | | /trello-execute-plan | Kaydedilen planı seçip Coding Agent ile uygula | | /jira <KEY> | Jira task'ından geliştirme planı üret | | /jira-login | Jira base URL ve PAT ayarla | | /export | Aktif oturumu Markdown dosyasına aktar | | /prompt | Sistem prompt editörü | | /config | Mevcut bağlantı ayarlarını göster | | /clear | Ekranı temizle | | /reset | Sohbet geçmişini sıfırla | | /resume | Ok tuşlu seçiciyle kayıtlı oturumlar arasında geçiş yap | | /session-delete | Eski oturumları sil | | /help | Yardımı göster | | /exit | Çıkış (Ctrl+C de çalışır) |


Coding Agent Pipeline

/trello-write-plan

Trello kartını gerçek kaynak kodla analiz ederek atomik uygulama planı üretir.

1. Pano seçici (ok tuşlu) → Kart seçici (ok tuşlu)
2. Seçilen Task kutusu + ekstra bilgi promptu (opsiyonel)
3. AI araştırma: list_files + read_file ile proje incelenir
   ⚙ 34 araç çağrısı  Ctrl+O genişlet
4. Araştırma özeti → bağlam sıkıştırma
5. JSON plan üretimi (temperature: 0.3, token limiti yok)
6. .trello_plans/{id}.json olarak kaydedilir

Plan formatı (JSON):

{
  "task_source": "Trello",
  "task_id": "AbCdEfGh",
  "title": "Görev başlığı",
  "summary": "Teknik özet",
  "affected_files": ["src/services/UserService.java"],
  "steps": [
    {
      "step_number": 1,
      "description": "UUID import ekle",
      "target_file": "src/utils/UsernameGenerator.java",
      "instructions": "generateUsername() metodunu güncelle..."
    }
  ],
  "verification_command": "mvn test"
}

/trello-execute-plan

Kaydedilen planı seçip Coding Agent ile uygular.

1. Plan seçici (ok tuşlu)
2. Onay
3. Agent döngüsü:
   - Her adım: read_file → apply_patch → run_command (test)
   - Test başarısızsa: hata analiz → yeni patch → tekrar test
   - Döngü sonu: verification_command otomatik çalıştırılır
4. Tüm çıktılar TUI transcript'e yazılır

Güvenlik:

  • Yalnızca proje dizini içindeki dosyalara erişim
  • İzinli komutlar: pytest, npm test, mvn test, go test, cd && ... vb.
  • Her apply_patch .{timestamp}.bak yedek oluşturur

Endpoint Türleri

| Tür | Açıklama | |-----|----------| | Kurumsal | Endpoint elle girilir, verifySsl/caBundlePath desteklenir | | Global (GLM z.ai) | https://api.z.ai/api/coding/paas/v4 sabit, sadece API key istenir |


Yapılandırma

~/.lastgen/config.json:

{
  "provider": "external",
  "baseUrl": "https://api.z.ai/api/coding/paas/v4",
  "apiKey": "<Z_AI_API_KEY>",
  "model": "glm-5.2",
  "trelloKey": "<TRELLO_APP_KEY>",
  "trelloToken": "<TRELLO_USER_TOKEN>",
  "trelloBoardId": "<BOARD_ID>",
  "trelloBoardName": "My Board",
  "jiraBaseUrl": "https://jira.sirket.com",
  "jiraToken": "<JIRA_PAT>"
}

Ortam Değişkenleri

| Değişken | Açıklama | |----------|----------| | LASTGEN_CONFIG_DIR | Yapılandırma dizini (varsayılan: ~/.lastgen) | | LASTGEN_NO_TUI | 1 → TUI devre dışı, klasik readline modu |


Geliştirme

npm test          # Vitest birim testleri (96 test)
npm run typecheck # TypeScript tip kontrolü
npm run build     # dist/ çıktısı (tsup, ESM)

Proje yapısı:

src/
├── index.ts            # Giriş noktası
├── repl.ts             # Ana döngü ve başlangıç
├── tui.ts              # Tam ekran TUI (~1250 satır) — logo decode animasyonu
├── session-picker.ts   # Ok tuşlu oturum seçici
├── sessions.ts         # Oturum kayıt/yükleme sistemi
├── history.ts          # Geriye dönük uyumluluk
├── commands.ts         # Slash komutları + agent fonksiyonları + ekstra bağlam
├── agent-tools.ts      # list_files, read_file, apply_patch, run_command
├── agent-loop.ts       # Execute agent döngüsü, self-correction
├── agent-plan.ts       # Write-plan: araştırma, özet, JSON plan
├── rich-format.ts      # Terminal rich formatting
├── api.ts              # OpenAI uyumlu streaming + retry
├── markdown.ts         # Markdown→ANSI renderer + syntax highlighting
├── ui.ts               # Terminal yardımcıları, renkler, animasyon, banner, logo decode, promptExtraContext
├── config.ts           # Yapılandırma okuma/yazma
├── providers.ts        # Endpoint preset sistemi
├── jira.ts             # Jira REST API istemcisi
├── trello.ts           # Trello API + kart/pano seçici
├── context.ts          # Proje dosyası tarayıcı
└── plan.ts             # Jira geliştirme planı üretici

scripts/
└── png-to-blocks.mjs   # PNG → terminal half-block karakter dönüştürücü

Lisans

MIT