This is a submission for the Amazon Q Developer "Quack The Code" Challenge: Crushing the Command Line
🚀 What I Built
Code Alchemist CLI is a powerful, elegant command-line tool crafted to automate common code improvement tasks across multiple programming languages. As a student passionate about writing clean, maintainable code, I built this tool to simplify the repetitive parts of development and make code enhancement more accessible.
Whether you're diving into legacy scripts or kicking off a new project, Code Alchemist CLI boosts your productivity by offering:
- 🧠 Code Analysis – Quickly inspects structure across multiple languages, including:
- Python, JavaScript, Java
- C/C++, HTML/CSS
- Go, Ruby, Rust
- TypeScript, PHP, Swift
- And many more text-based file types!
- 📝 Auto-Generated Docstrings – Instantly creates clean, readable documentation for your code.
- 🔄 Refactoring Assistance – Transforms unoptimized code into more efficient and readable forms.
- ✂️ Import & Code Optimization – Cleans up unused imports and cluttered comments.
- 🪄 Multi-Language Support – Works seamlessly with 20+ file types and programming languages.
It's a perfect companion for developers, students, and small teams seeking to improve code hygiene and maintainability without depending on heavy IDEs or paid extensions.
📦 Code Repository & Setup
🔗 https://github.com/Anik2812/Code-Alchemist
Quick Start Guide:
# Clone the repository
git clone https://github.com/Anik2812/Code-Alchemist.git
# Navigate to the project directory
cd Code-Alchemist
# Make the setup script executable
chmod +x ./setup.sh
# Run the setup script
./setup.sh
🖥️ Demo
🧪 Try the demo to preview changes without writing them:
./demo.sh
📽️ Comprehensive CLI Commands
Here's how easy it is to use Code Alchemist CLI:
# Analyze a file
./code_alchemist.py analyze filename
# Refactor a file
./code_alchemist.py refactor filename
# Generate documentation for the file
./code_alchemist.py document filename
# Suggest performance and security improvements
./code_alchemist.py optimize filename
# Generate project dashboard
./code_alchemist.py dashboard filename
# Setup project structure and config files
./code_alchemist.py setup filename
# Run all transformations at once
./code_alchemist.py transmute filename
💻 Using Code Alchemist in Different Environments
Windows Subsystem for Linux (WSL) Support
If you're using Windows Subsystem for Linux, you can easily access files from your Windows drives:
# Access files in Windows drives
cd "/mnt/(drive name)/path to the file"
# or
cd "/mnt/c/Users/YourUsername/Documents/YourProject"
# or
cd "/mnt/d/Development/YourProject"
Pro Tips for WSL Users:
- Use
/mnt/prefix to access Windows drives - Common drive mappings:
-
/mnt/c/for C: drive -
/mnt/d/for D: drive - And so on...
-
- Ensure you have the correct permissions to access the directory
Cross-Platform Compatibility
Code Alchemist is designed to work seamlessly across:
- Linux
- macOS
- Windows (via WSL)
- Windows Git Bash
🎥 Video Demonstration
Supported Languages and File Types
Code Alchemist supports a wide range of languages and file types:
-
Programming Languages:
- Python
- JavaScript
- Java
- C/C++
- Go
- Ruby
- Rust
- TypeScript
- PHP
- Swift
-
Configuration and Markup:
- Markdown
- JSON
- XML
- YAML
- INI
- HTML
- CSS
- Shell Scripts
- Batch/PowerShell Scripts
-
Other Text-Based Files:
- Configuration files
- Plain text files
- And more!
Screenshots


Analyze structure in a single command.
🤖 How I Used Amazon Q Developer
Throughout the development of Code Alchemist CLI, Amazon Q Developer was like a coding partner—always available to support, debug, and refine my ideas. Here's how I integrated Q Developer into my process:
- 🧩 Modular Planning: Used Q Developer to brainstorm clean function breakdowns and organize the CLI structure using
argparse,os, andpathlib. - 🛠️ Refactoring & Docstrings: Q Developer assisted in creating generalized logic for code transformation and accurate docstring generation, handling edge cases gracefully.
- 🧪 Debugging: It provided quick, reliable solutions for path resolution issues, encoding errors, and text parsing bugs.
- 📚 Documentation: Helped polish project documentation, CLI help text, and inline comments for better readability and professionalism.


Top comments (0)