ββββββ βββ ββββββββββββ βββββββ βββββββ βββββββ ββββββ βββββββββββββββββ
βββββββββββ βββββββββββββββββββββββββββββ βββββββββββββββββββββββββββββββββ
βββββββββββ βββ βββ βββ ββββββ βββββββ ββββββββ βββ ββββββ
βββββββββββ βββ βββ βββ ββββββ ββββββββββββββββ βββ ββββββ
βββ ββββββββββββ βββ βββββββββββββββββββββ ββββββ βββ βββ ββββββββ
βββ βββ βββββββ βββ βββββββ βββββββ βββ ββββββ βββ βββ ββββββββ
AutoCrate is a smart command-line tool built with Rust to supercharge your development workflow. It eliminates the repetitive task of setting up new Rust projects. Just run one command, and AutoCrate creates a sequentially named project, initializes it, and opens it in your editor, getting you straight to coding. π
Stop wasting time setting up projects β just run one command and start coding.
- Guided First-Run Setup: An interactive, colorful setup wizard on the first launch to configure everything perfectly.
- Sequential Project Creation: Automatically names your projects in sequence (e.g.,
my_project1,my_project2, ...), so you never have to think of a name again. - Automatic
cargo new: Creates a fresh, valid Rust project using the official Cargo command. - Instant Editor Launch: Opens the newly created project directly in VS Code, ready for you to start coding.
- Smart Configuration: Remembers your project's parent folder and naming preference in a simple JSON file.
- Native Folder Picker: Uses your operating system's native file explorer to choose your main project folder during setupβno manual path typing needed!
- Robust Error Handling & Logging: If something goes wrong, errors are clearly reported, and a detailed
log.txtis created for easy debugging.
Getting started with AutoCrate is incredibly simple.
β οΈ Important Note: Currently, AutoCrate is designed to work only on Windows. Support for other operating systems is planned for the future.
The easiest way to install AutoCrate is by using the pre-compiled binary.
- Head over to the Releases Page on GitHub.
- Download the zip and Extract it.
- Open the zip and run
install.bat. This script will automatically set up AutoCrate and add it to your system's PATH. - Now Open Command Prompt from Start Menu
After installation, open a new terminal (CMD, PowerShell, or Windows Terminal) and run:
autocrateThe first time you run this, a guided setup wizard will launch:
- It will ask you for a base name for your sequential projects (e.g.,
project,leet_code,learning_rust). - A file explorer window will pop up, allowing you to graphically select the main "super-folder" where all these projects will be stored.
- That's it! Your configuration is saved.
Once the setup is complete, creating a new project is as simple as running autocrate in your terminal. It will automatically find the next number in the sequence, create the project folder (e.g., learning_rust3), and ask if you'd like to open it in VS Code.
Clone the repo and build with Cargo:
git clone https://github.com/your-username/autocrate.git
cd autocrate
### π¨ Compile
Build in **debug mode** (faster, good for testing):
```bash
cargo buildBuild in release mode (optimized, good for daily use):
cargo build --releaseAutoCrate is designed to be transparent and easy to manage.
Your preferences are stored in a _Config.json file located in your user's AppData directory:
%APPDATA%\sharmadevanshu089\autocrate\config\_Config.json
A typical config file looks like this:
{
"serial_name": "my_rust_project",
"super_folder_path": "D:\\Development\\Rust_Projects",
"add_shortcut": true,
"editor": "code"
}For troubleshooting, AutoCrate creates a log.txt file in the same directory as the config file. If you encounter any issues, this log file is the first place to look for details.
This project is actively developed. Here is the current plan:
- Smart configuration management (
_Config.json). - First-run interactive setup wizard.
- Automatic project creation with
cargo new. - Sequential project naming (
project1,project2, etc.). - Launch project in VS Code.
- Robust error handling and logging system.
- Initialize a local Git repository automatically.
- Create a remote GitHub repository and push the initial commit.
- Support for more editors (JetBrains RustRover, Neovim, Helix).
- Project templates (CLI app, library, web server).
-
GUI frontend with a project browser.(Idea deprecated in favor of a powerful CLI experience).
- Packaged the first stable, feature-complete release candidate for public use. π
- Finalized in-app user guidance and documentation to ensure a smooth out-of-the-box experience.
- Enabled seamless workflow integration by adding functionality to automatically launch newly created projects in Visual Studio Code.
- Integrated direct command-line calls to
cargoto fully automate the creation and scaffolding of new Rust projects.
- Addressed a critical edge case where the sequential counter failed if no previous project folders existed, enhancing reliability.
- Deployed the core logic for intelligently scanning directories to determine the next sequential project number, forming the heart of the "auto-crate" feature.
- Engineered a comprehensive file I/O system for robustly reading from and writing to the
_Config.jsonfile.
- Deployed significant patches to address and resolve multiple underlying stability problems, resulting in a more resilient application.
- Leveraged the
rfdcrate to integrate native OS file dialogs, enabling a seamless and intuitive graphical folder selection experience during setup.
- Implemented a regex-based input filter to validate and sanitize user-defined project names, ensuring compatibility and preventing errors.
- Revamped the interactive setup with a vibrant, color-coded UI for a more intuitive and engaging user onboarding process.
- Addressed memory management challenges by resolving key borrowing issues within the Rust codebase, improving performance and stability.
- Optimized log file formatting for improved clarity and easier diagnostic parsing.
- Overhauled the configuration-saving mechanism to use system-standard directories, ensuring platform compliance and predictability.
- Resolved a critical issue where configuration was incorrectly saved to the current working directory instead of the user's dedicated profile folder.
- Rolled out the first version of the interactive user setup sequence.
- Engineered automated creation of the root configuration directory, complete with resilient error handling.
- Introduced a scalable error-handling framework and integrated diagnostic logging to a dedicated
log.txtfile for streamlined troubleshooting.
- Implemented the initial logic to detect existing configuration files, laying the groundwork for the entire application.
For those interested in building from source or contributing, here are the key crates that power AutoCrate:
colored: Adds beautiful, easy-to-read colors to the terminal output, enhancing the user experience.rfd(Rust File Dialog): Provides the native, OS-level "select a folder" dialog during setup.directories: A helper library to find the standard, platform-specific paths for config files, ensuring data is stored in the correct location.serde&serde_json: Used for seamless serialization and deserialization of the_Config.jsonfile, making configuration management robust and simple.regex: Ensures that the project base names provided by the user are valid and won't cause issues with file systems or Cargo.
Got an idea? Found a bug? Contributions are welcome!
Please feel free to open an issue to discuss a new feature or report a problem. If you'd like to contribute code, pull requests are highly encouraged.
This project is licensed under the MIT License. You can find the full license text in the LICENSE.md file.