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

selena-ai-sdk

v1.0.4

Published

SDK JavaScript moderno para Selena AI

Readme

Selena AI SDK

SDK JavaScript moderno e elegante para integração com a Selena AI

npm version License: MIT Node.js Version

✨ Características

  • 🎯 Simples e Elegante - API intuitiva e fácil de usar
  • Zero Dependências - Sem axios, apenas fetch nativo
  • 📝 Logging Configurável - Controle total sobre debug logs
  • 🖥️ CLI Completa - Chat interativo no terminal
  • 🚀 Streaming em Tempo Real - Respostas com efeito de digitação
  • 📚 Documentação Linda - Site com VitePress e gradientes
  • 🔧 TypeScript Ready - Types via JSDoc
  • Performance - HTTP client nativo com timeout e retry

🚀 Instalação

# Com npm
npm install selena-ai-sdk

# Com yarn
yarn add selena-ai-sdk

# Global para CLI
npm install -g selena-ai-sdk

🔑 Configuração

  1. Obtenha sua API key em selena-ai.site/dashboard
  2. Configure a variável de ambiente:
export SELENA_API_KEY=sua_chave_aqui

💻 Uso Básico

import { SelenaAI } from 'selena-ai-sdk';

const client = new SelenaAI({
  apiKey: process.env.SELENA_API_KEY,
  logging: 'debug' // 'none' para desativar logs
});

async function chat() {
  const response = await client.chat.completions({
    model: 'selena-pro-v1',
    message: 'Olá! Me apresente-se.'
  });
  
  console.log('Resposta:', response.response);
}

chat().catch(console.error);

🚀 Streaming

Responda com streaming em tempo real:

// Streaming simples
await client.chat.completions({
  model: 'selena-pro-v1',
  message: 'Me explique sobre IA',
  stream: true,
  onToken: (token) => {
    process.stdout.write(token); // Cada token aparece em tempo real
  }
});

// Streaming com efeito de digitação (como no CLI)
await client.chat.completions({
  model: 'selena-pro-v1',
  message: 'Me explique sobre IA',
  stream: true,
  onToken: (token) => {
    for (const char of token) {
      process.stdout.write(char);
      // Delay aleatório entre 10-50ms para parecer mais natural
      const delay = Math.random() * 40 + 10;
      Atomics.wait(new Int32Array(new SharedArrayBuffer(4)), 0, 0, delay);
    }
  }
});

🖥️ CLI

Chat Interativo

# Iniciar chat interativo
selena chat

# Com streaming (resposta em tempo real)
selena chat --stream

# Com logs detalhados
selena chat --verbose

# Sem logs
selena chat --quiet

Pergunta Única

# Pergunta normal
selena ask "Qual a capital da França?"

# Com streaming (resposta em tempo real)
selena ask "Me conte uma história" --stream

📖 Documentação

Visite selena-ai-sdk-docs para documentação completa.

🔧 Opções de Configuração

const client = new SelenaAI({
  apiKey: 'sua-chave-aqui',
  baseURL: 'https://selena-ai.site',  // Custom base URL
  logging: 'info'               // 'none', 'error', 'info', 'debug'
});

📝 Níveis de Log

  • none - Sem logs
  • error - Apenas erros
  • info - Informações básicas
  • debug - Logs completos de request/response

🤝 Contribuição

Contribuições são bem-vindas! Por favor:

  1. Fork este repositório
  2. Crie uma feature branch
  3. Faça commit das suas mudanças
  4. Push para o branch
  5. Abra um Pull Request

📄 Licença

MIT License - veja o arquivo LICENSE para detalhes.

🔗 Links


Feito com ❤️ pela equipe Elaxi