Last active
March 14, 2026 08:53
-
-
Save up1/4dbafcdbfc3cf76c3b63924aceec18b3 to your computer and use it in GitHub Desktop.
Hello Qwen Code
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $bash -c "$(curl -fsSL https://qwen-code-assets.oss-cn-hangzhou.aliyuncs.com/installation/install-qwen.sh)" -s --source qwenchat | |
| ========================================== | |
| Qwen Code Installation Script | |
| ========================================== | |
| ℹ️ System: Darwin 25.2.0 | |
| ℹ️ Shell: zsh | |
| ✅ Node.js v25.1.0 is already installed (>= 20) | |
| ℹ️ Using existing Node.js installation | |
| ℹ️ Checking npm permissions... | |
| ℹ️ npm global directory is writable: ... | |
| ℹ️ Installing Qwen Code... | |
| added 5 packages in 7s | |
| npm notice | |
| npm notice New minor version of npm available! 11.6.2 -> 11.11.1 | |
| npm notice Changelog: https://github.com/npm/cli/releases/tag/v11.11.1 | |
| npm notice To update run: npm install -g npm@11.11.1 | |
| npm notice | |
| ✅ Qwen Code installed successfully! | |
| ℹ️ Qwen Code version: 0.12.3 | |
| ✅ Installation source saved to ~/.qwen/source.json | |
| ========================================== | |
| ✅ Installation completed! | |
| ========================================== | |
| ✅ Qwen Code is ready to use! | |
| You can now run: qwen | |
| ℹ️ Starting Qwen Code... | |
| ▄▄▄▄▄▄ ▄▄ ▄▄ ▄▄▄▄▄▄▄ ▄▄▄ ▄▄ ┌──────────────────────────────────────────────────────────┐ | |
| ██╔═══██╗██║ ██║██╔════╝████╗ ██║ │ >_ Qwen Code (v0.12.3) │ | |
| ██║ ██║██║ █╗ ██║█████╗ ██╔██╗ ██║ │ │ | |
| ██║▄▄ ██║██║███╗██║██╔══╝ ██║╚██╗██║ │ Unknown | coder-model (/model to change) │ | |
| ╚██████╔╝╚███╔███╔╝███████╗██║ ╚████║ │ ~/demo │ | |
| ╚══▀▀═╝ ╚══╝╚══╝ ╚══════╝╚═╝ ╚═══╝ └──────────────────────────────────────────────────────────┘ | |
| Tips: Use /bug to submit issues to the maintainers when something goes off. | |
| ┌──────────────────────────────────────────────────────────────────────────────────────────────────┐ | |
| │ │ | |
| │ Select Authentication Method │ | |
| │ │ | |
| │ ● Qwen OAuth │ | |
| │ Free · Up to 1,000 requests/day · Qwen latest models │ | |
| │ │ | |
| │ Alibaba Cloud Coding Plan │ | |
| │ Paid · Up to 6,000 requests/5 hrs · All Alibaba Cloud Coding Plan Models │ | |
| │ │ | |
| │ API Key │ | |
| │ Bring your own API key │ | |
| │ │ | |
| │ ──────────────────────────────────────────────────────────────────────────────── │ | |
| │ │ | |
| │ Terms of Services and Privacy Notice: │ | |
| │ https://qwenlm.github.io/qwen-code-docs/en/users/support/tos-privacy/ │ | |
| │ │ | |
| └──────────────────────────────────────────────────────────────────────────────────────────────────┘ | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # ralph.sh - A persistent autonomous loop for Qwen Code | |
| set -e | |
| # Default to 10 iterations if no argument is provided | |
| MAX_ITERATIONS=${1:-10} | |
| SIGIL="<promise>COMPLETE</promise>" | |
| echo "Starting Ralph Loop with Qwen Code..." | |
| for i in $(seq 1 $MAX_ITERATIONS); do | |
| echo "═══ Iteration $i / $MAX_ITERATIONS ═══" | |
| # Run Qwen Code in non-interactive mode. | |
| # It reads the requirements and progress, performs one task, then exits. | |
| OUTPUT=$(qwen -p "@PRD.md @progress.txt \ | |
| 1. Read PRD.md and progress.txt to find the next task. \ | |
| 2. Implement ONLY that task and run tests in folder api. \ | |
| 3. Update progress.txt with your actions. \ | |
| 4. Commit your changes to git. \ | |
| 5. If all PRD items are finished, output: $SIGIL" -y) | |
| echo "$OUTPUT" | |
| # Check if the agent signaled completion | |
| if echo "$OUTPUT" | grep -q "$SIGIL"; then | |
| echo "✅ Task complete! Ralph is satisfied." | |
| exit 0 | |
| fi | |
| # Optional: brief pause to allow file system/git to settle | |
| sleep 2 | |
| done | |
| echo "⚠️ Reached max iterations ($MAX_ITERATIONS) without completion." | |
| exit 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment