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

@mindhousebr/siaf

v1.0.2

Published

SIAF Evolution CLI - Gerenciamento de agentes IA e RAG

Readme

SIAF Evolution CLI

Interface de linha de comando para o SIAF Evolution AI Core — agentes de IA especializados em tributos e notas fiscais brasileiras, com base de conhecimento RAG.

A CLI conecta-se à API do SIAF para invocar agentes fiscais (classificação NCM, cálculo de tributos, validação de NF-e, consultoria legal) e gerenciar coleções de documentos RAG (ingestão, busca semântica e perguntas com IA).


Instalação

npm install -g @mindhousebr/siaf

Requer Node.js >= 20.

Após a instalação, o comando disponível no terminal é siaf:

siaf --version
siaf help

Início rápido

# 1. Autenticar (informe a URL da API e sua API Key)
siaf login

# 2. Listar agentes disponíveis
siaf agents

# 3. Invocar um agente
siaf invoke ncm-classifier "parafuso de aço inox M8"

# 4. Fazer uma pergunta usando a base de conhecimento
siaf ask col-ncm "qual o ncm de prego"

Autenticação

A autenticação é feita por API Key. As credenciais ficam salvas em ~/.siafrc.

| Comando | Descrição | |---------|-----------| | siaf login | Autentica com a API. Pergunta a URL da API (padrão http://localhost:3000) e a API Key. | | siaf logout | Remove as credenciais salvas. | | siaf whoami | Mostra a sessão atual (URL e tenant autenticado). |

siaf login
# URL da API: http://localhost:3000
# API Key: ********************

Agentes de IA

| Comando | Descrição | |---------|-----------| | siaf agents | Lista os agentes ativos. | | siaf invoke <slug> "<input>" | Invoca um agente com um texto de entrada. |

Opções de invoke:

| Opção | Descrição | |-------|-----------| | --model <model> | Modelo LLM a usar (sobrescreve o padrão do agente). | | --temperature <temp> | Temperatura 0-1 (sobrescreve o padrão do agente). |

siaf invoke ncm-classifier "parafuso de aço inox M8"
siaf invoke tax-calculator "venda interestadual SP→RJ, NCM 7318.15.00" --temperature 0

RAG — Base de Conhecimento

Gerenciamento de coleções, documentos e busca semântica.

| Comando | Descrição | |---------|-----------| | siaf collections | Lista as coleções RAG. | | siaf ingest <coleção> <arquivo> | Ingere um documento em uma coleção. | | siaf search <coleção> "<query>" | Busca semântica (similaridade vetorial). | | siaf ask <coleção> "<query>" | Pergunta com IA: busca RAG + resposta do LLM. | | siaf chunk <id> | Mostra o conteúdo de um chunk pelo ID. | | siaf docs <coleção> | Lista os documentos de uma coleção. | | siaf docs:clear <coleção> | Remove todos os documentos de uma coleção. | | siaf docs:delete <id> | Remove um documento específico. |

Opções de ingest:

| Opção | Descrição | |-------|-----------| | -t, --title <title> | Título do documento. | | -s, --source <source> | Fonte/origem do documento. |

Opções de search e ask:

| Opção | Padrão | Descrição | |-------|--------|-----------| | -k, --topK <number> | 5 | Número máximo de resultados / chunks de contexto. | | -m, --minScore <number> | 0.3 | Score mínimo de similaridade. |

siaf ingest col-ncm ./tabela-ncm.txt --title "Tabela NCM 2025"
siaf search col-ncm "alíquota icms são paulo" -k 10
siaf ask col-ncm "qual o ncm de prego" --minScore 0.5
siaf docs col-ncm
siaf chunk ckxyz123

Sistema

| Comando | Descrição | |---------|-----------| | siaf status | Verifica o status/saúde da API. | | siaf --version | Mostra a versão da CLI. | | siaf help | Mostra a ajuda completa. |


Arquivo de configuração

As credenciais são armazenadas em ~/.siafrc (JSON):

{
  "apiUrl": "http://localhost:3000",
  "apiKey": "sk-...",
  "tenant": "Autenticado"
}

Use siaf logout para removê-lo.


Variáveis de ambiente

A CLI aceita variáveis de ambiente para ajustar os timeouts de rede — úteis ao ingerir arquivos grandes, cujo processamento de embeddings no servidor pode demorar vários minutos.

| Variável | Padrão | Descrição | |----------|--------|-----------| | SIAF_UPLOAD_TIMEOUT_MS | 600000 (10 min) | Timeout do upload em siaf ingest. | | SIAF_REQUEST_TIMEOUT_MS | 120000 (2 min) | Timeout das demais requisições (GET/POST/DELETE). |

# Aumentar o timeout do ingest para 20 minutos
SIAF_UPLOAD_TIMEOUT_MS=1200000 siaf ingest col-ncm ./arquivo-gigante.json

No Windows PowerShell:

$env:SIAF_UPLOAD_TIMEOUT_MS = "1200000"; siaf ingest col-ncm .\arquivo-gigante.json

Licença

UNLICENSED — uso interno Mindhouse / SIAF Evolution.