{"id":18820,"library":"stallion-cli","title":"Stallion CLI","description":"Stallion CLI is a unified command-line tool for deploying React Native bundles to Stallion servers. Current stable version is 2.4.3. Released actively on npm. It uses Commander.js for CLI parsing and provides commands for authentication, bundle upload, and configuration management. Key differentiator: purpose-built for Stallion deployment workflow, integrates with Stallion's console and API.","status":"active","version":"2.4.3","language":"javascript","source_language":"en","source_url":null,"tags":["javascript","cli","stallion","typescript","commander"],"install":[{"cmd":"npm install stallion-cli","lang":"bash","label":"npm"},{"cmd":"yarn add stallion-cli","lang":"bash","label":"yarn"},{"cmd":"pnpm add stallion-cli","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"CLI command parsing and argument handling","package":"commander","optional":false},{"reason":"HTTP requests to Stallion API for authentication and uploads","package":"axios","optional":false}],"imports":[{"note":"ESM-only since v2.0. Use dynamic import for CommonJS.","wrong":"const stallion = require('stallion-cli');","symbol":"stallion","correct":"import stallion from 'stallion-cli'"},{"note":"Named export, not default export. Use named import.","wrong":"import CLI from 'stallion-cli'","symbol":"CLI","correct":"import { CLI } from 'stallion-cli'"},{"note":"ESM-only; require() will fail in Node <14 or without --experimental-modules.","wrong":"const { run } = require('stallion-cli');","symbol":"run","correct":"import { run } from 'stallion-cli'"}],"quickstart":{"code":"import stallion from 'stallion-cli';\n\nasync function deploy() {\n  const apiKey = process.env.STALLION_API_KEY ?? '';\n  await stallion.login({ apiKey });\n  await stallion.uploadBundle({\n    platform: 'ios',\n    bundlePath: './build/main.jsbundle',\n    appVersion: '1.0.0',\n    channel: 'production'\n  });\n}\n\ndeploy().catch(console.error);","lang":"typescript","description":"Shows how to authenticate and upload a React Native bundle using Stallion CLI programmatically."},"warnings":[{"fix":"Use import() or switch to ESM. For CommonJS projects, use dynamic import: const stallion = await import('stallion-cli');","message":"Since v2.0, ESM-only: CommonJS require() no longer works.","severity":"breaking","affected_versions":">=2.0.0"},{"fix":"Use 'stallion config set' instead.","message":"The 'stallion init' command is deprecated in v2.4.0.","severity":"deprecated","affected_versions":">=2.4.0"},{"fix":"Upgrade Node.js to v14 or higher.","message":"Node.js v14 required, v16 recommended. v12 and below not supported.","severity":"gotcha","affected_versions":">=2.0.0"},{"fix":"Update stallion-cli to >=2.3.0. If you rely on the URL, update to 'https://api.stalliontech.io/v2'.","message":"API endpoint changed from /v1 to /v2 in v2.3.0. Old SDK versions will fail.","severity":"breaking","affected_versions":">=2.3.0 <2.3.0"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"Run 'npm install -g stallion-cli' or install locally with 'npm install stallion-cli' and use npx.","cause":"Package not installed or global install not in PATH.","error":"Error: Cannot find module 'stallion-cli'"},{"fix":"Use dynamic import or switch project to ESM: 'type': 'module' in package.json.","cause":"Using require() in CommonJS on an ESM-only package.","error":"SyntaxError: Unexpected token 'export'"},{"fix":"Set STALLION_API_KEY to your valid Stallion API key. Obtain at https://console.stalliontech.io/settings/api-keys","cause":"Missing or incorrect STALLION_API_KEY environment variable.","error":"Error: Failed to authenticate. Invalid API key."}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}