@swotpal/cli
v0.1.0
Published
The world's only SWOT analysis tool with a CLI. Generate AI-powered SWOT analyses from your terminal.
Maintainers
Readme
@swotpal/cli
The world's only SWOT analysis tool with a CLI.
Generate AI-powered SWOT analyses from your terminal. Powered by SWOTPal.
Installation
npm install -g @swotpal/cliQuick Start
# Set your API key
swotpal login # Opens browser to get your key
swotpal config set-key # Paste your API key
# Generate a SWOT analysis
swotpal analyze "Tesla"
# Compare two companies
swotpal compare "Apple" "Samsung"
# Browse 33 built-in examples (offline, no API key needed)
swotpal examples
swotpal examples teslaCommands
swotpal analyze <topic>
Generate a SWOT analysis for any company, brand, product, or topic.
swotpal analyze "Netflix"
swotpal analyze "Tesla 2026" --language ja
swotpal analyze "OpenAI" --json | jq '.strengths'swotpal compare <left> <right>
Compare two entities side-by-side with SWOT analysis for each.
swotpal compare "Tesla" "BYD"
swotpal compare "ChatGPT" "Claude" --markdownswotpal list
List your saved SWOT analyses.
swotpal list
swotpal list --page 2 --limit 20
swotpal list --jsonswotpal show <id>
Show details of a specific saved analysis.
swotpal show abc123
swotpal show abc123 --jsonswotpal examples [id]
Browse 33 built-in SWOT analysis examples. Works offline, no API key required.
swotpal examples # List all
swotpal examples --industry fashion # Filter by industry
swotpal examples --search nvidia # Search by name
swotpal examples tesla # Show specific exampleswotpal config
Manage CLI configuration.
swotpal config show # Show current config
swotpal config set-key # Set API key interactively
swotpal config set-language ja # Set default languageswotpal login
Open the SWOTPal dashboard in your browser to get an API key.
Global Options
| Option | Description |
|--------|-------------|
| --json | Output as machine-readable JSON |
| --markdown | Output as Markdown |
| --language <lang> | Set analysis language (en, ja, zh_TW, ko, etc.) |
| -V, --version | Show version |
| -h, --help | Show help |
Authentication
Get your API key at swotpal.com/dashboard, then:
# Option 1: Environment variable
export SWOTPAL_API_KEY=sk_live_...
# Option 2: CLI config (persisted)
swotpal config set-keyOutput Formats
# Pretty terminal output (default)
swotpal analyze "Tesla"
# JSON (pipe to jq, save to file, etc.)
swotpal analyze "Tesla" --json > tesla-swot.json
# Markdown (great for docs and READMEs)
swotpal analyze "Tesla" --markdown >> strategy.mdSupported Languages
en, ja, zh_TW, zh, ko, vi, pt, de, es, fr, it, ru
Requirements
- Node.js 20+
- API key from swotpal.com
License
MIT
