This directory contains shell script examples demonstrating all available Swarms CLI commands and features. Each script is simple, focused, and demonstrates a single CLI command.
All scripts are executable. Run them directly:
chmod +x *.sh
./01_setup_check.shOr execute with bash:
bash 01_setup_check.sh-
01_setup_check.sh - Environment setup verification
swarms setup-check
-
02_onboarding.sh - Interactive onboarding process
swarms onboarding
-
03_get_api_key.sh - Retrieve API keys
swarms get-api-key
-
04_check_login.sh - Verify authentication
swarms check-login
-
05_create_agent.sh - Create and run custom agents
swarms agent --name "Agent" --description "Description" --system-prompt "Prompt" --task "Task"
-
06_run_agents_yaml.sh - Execute agents from YAML
swarms run-agents --yaml-file agents.yaml
-
07_load_markdown.sh - Load agents from markdown files
swarms load-markdown --markdown-path ./agents/
-
08_llm_council.sh - Run LLM Council collaboration
swarms llm-council --task "Your question here" -
09_heavy_swarm.sh - Run HeavySwarm for complex tasks
swarms heavy-swarm --task "Your complex task here" -
10_autoswarm.sh - Auto-generate swarm configurations
swarms autoswarm --task "Task description" --model "gpt-4"
-
11_features.sh - Display all available features
swarms features
-
12_help.sh - Display help documentation
swarms help -
13_auto_upgrade.sh - Update Swarms package
swarms auto-upgrade
-
14_book_call.sh - Schedule strategy session
swarms book-call
-
research_agent_example.sh - Research agent example
swarms research-agent --task "Research task"
- run_all_examples.sh - Run multiple examples in sequence
bash run_all_examples.sh
Each script follows a simple pattern:
- Shebang -
#!/bin/bash - Comment - Brief description of what the script does
- Single Command - One CLI command execution
Example:
#!/bin/bash
# Swarms CLI - Setup Check Example
# Verify your Swarms environment setup
swarms setup-checkswarms <command> [options]swarms <command> --verboseSet API keys before running scripts that require them:
export OPENAI_API_KEY="your-key-here"
export ANTHROPIC_API_KEY="your-key-here"
export GOOGLE_API_KEY="your-key-here"- Environment setup verification
- Onboarding workflow
- API key management
- Authentication verification
- Custom agent creation
- Agent configuration from YAML
- Agent loading from markdown
- LLM Council for collaborative problem-solving
- HeavySwarm for complex analysis
- Auto-generated swarm configurations
- Feature discovery
- Help documentation
- Package management
All scripts are located in examples/cli/:
examples/cli/01_setup_check.shexamples/cli/02_onboarding.shexamples/cli/03_get_api_key.shexamples/cli/04_check_login.shexamples/cli/05_create_agent.shexamples/cli/06_run_agents_yaml.shexamples/cli/07_load_markdown.shexamples/cli/08_llm_council.shexamples/cli/09_heavy_swarm.shexamples/cli/10_autoswarm.shexamples/cli/11_features.shexamples/cli/12_help.shexamples/cli/13_auto_upgrade.shexamples/cli/14_book_call.shexamples/cli/research_agent_example.shexamples/cli/run_all_examples.sh
- CLI Reference - Complete CLI documentation
- Main Examples README - Other Swarms examples
- Swarms Documentation - Full Swarms documentation