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 🙏

© 2025 – Pkg Stats / Ryan Hefner

awgcli

v1.1.8

Published

Paquete CLI en node y typescript para la creación de proyectos y templates de AWG

Readme

AWG CLI

CLI para crear, actualizar y commitear proyectos con ayuda de IA.
Hecho en Node.js + TypeScript.

  • 🧪 Crear proyectos desde templates (wizard interactivo)
  • 🧬 “Despegar” el git del template y hacer el primer commit
  • ⚙️ Generar .env según tipo de proyecto (web | native) desde cli-config.json
  • 📦 Detectar package manager e instalar dependencias
  • ⬆️ --update: aplicar cambios del template original a proyectos ya creados (one‑way, con rama backup)
  • 🤖 --ai-commit: mensajes de commit con IA (OpenAI u Ollama), con Aceptar / Editar / Cancelar
  • 🔐 SSH auto‑setup: si no tenés clave, la generamos y te ayudamos a subirla a GitHub

Requisitos: Node 18+ y Git.


🚀 Uso rápido

npx awgcli            # abre el wizard para crear un proyecto
npx awgcli --help     # ver ayuda

Comandos principales:

# Actualizar un proyecto desde el template (one-way)
npx awgcli --update
npx awgcli --update --to v1.4.0
npx awgcli --update --dry-run
npx awgcli --update --exclude ".env" "dist/**" "node_modules/**"

# Commit con IA (Conventional Commits)
npx awgcli --ai-commit         # asume que ya hiciste 'git add'
npx awgcli --ai-commit --all   # hace 'git add -A' y luego commitea con IA

Flags útiles:

  • --help, --version
  • --to <ref> (tag/rama/commit destino para --update)
  • --dry-run (simula el update)
  • --exclude "<glob>" [...] (excluye rutas en el patch del update)
  • --all (staging automático antes del --ai-commit)

🔐 SSH (simple y directo)

Cuando corrés npx awgcli:

  1. Si ya tenés clave SSH → Continua clonando.
  2. Si NO tenés clave → el CLI:
    • Genera una clave ed25519 (por ejemplo ~/.ssh/id_ed25519).
    • Si tenés GitHub CLI (gh) instalado y logueado, intenta subir la clave pública automaticamente.
    • Si no hay gh o falla, te mostramos tu clave pública y 3 pasos para agregarla manualmente.

⚙️ Configuración de IA (opcional)

Elegí proveedor y modelo:

OpenAI

AWG_AI_PROVIDER=openai
AWG_AI_MODEL=gpt-4o-mini
AWG_AI_KEY=sk-xxxxxxxxxxxxxxxx

Ollama (local)

AWG_AI_PROVIDER=ollama
AWG_AI_MODEL=llama3
OLLAMA_URL=http://localhost:11434

El CLI también respeta:
CLI_CONFIG (ruta a un cli-config.json alternativo) y DEBUG_CLI_CONFIG=1 (logs de carga).
Leemos .env.local > .env.cli > .env si existen. Asegurate de git‑ignorar tu .env.


🧩 cli-config.json

Ejemplo mínimo:

{
  "org": "awg-org",
  "vcs": "github",
  "defaultBranch": "main",
  "naming": {
    "prefix": "acp",
    "suffix": "awg",
    "types": { "web": "web", "native": "native" }
  },
  "templates": [
    { "name": "Web App", "repoUrl": "url ssh de github a clonar" },
    { "name": "App Native", "repoUrl": "url ssh de github a clonar" }
  ],
  "env": {
    "web": {
      ".env": [
        { "key": "APP_NAME", "default": "${projectName}" },
        { "key": "NODE_ENV", "default": "development" },
        { "key": "API_BASE_URL", "required": true },

        { "key": "AWG_AI_PROVIDER", "required": false, "default": "ollama" },
        { "key": "AWG_AI_MODEL", "required": false, "default": "llama3" },
        { "key": "OLLAMA_URL", "required": false, "default": "http://localhost:11434" }
      ]
    },
    "native": {
      ".env": [
        { "key": "APP_NAME", "default": "${projectName}" },
        { "key": "API_BASE_URL", "required": true }
      ]
    }
  },
  "packageManager": "auto"
}

Si no existe en tu CWD, usamos el bundled del paquete.


💡 Scripts útiles en proyectos creados

El CLI agrega a tu package.json del proyecto:

{
  "scripts": {
    "ai:preview": "npx awgcli --ai-commit",
    "ai:commit": "npx awgcli --ai-commit --all"
  }
}

Usos:

npm run ai:preview
npm run ai:commit

🧾 Publicar nueva versión en npm (simple)

Tenés estos scripts en el package.json del CLI:

# patch = fixes pequeños (x.y.z -> x.y.(z+1))
npm run release:patch

# minor = features compatibles (x.y.z -> x.(y+1).0)
npm run release:minor

# major = cambios incompatibles (x.y.z -> (x+1).0.0)
npm run release:major

Qué hacen por detrás (en resumen):

  • Compilan (prepublishOnlynpm run build).
  • Commit “build: prepare release” si hay cambios staged.
  • npm version <tipo> (bump + tag).
  • git push && git push --tags.
  • npm publish --access public.

Prerrequisitos:

npm login
npm whoami
# (si tu org usa 2FA, tenela a mano)

❓ Ayuda / Versión

npx awgcli --help
npx awgcli --version