1 unstable release
Uses new Rust 2024
| new 0.1.0 | Jan 12, 2026 |
|---|
#2 in #project-generator
26KB
451 lines
Axer
>>==================================================<<
|| ||
|| /$$$$$$ ||
|| /$$__ $$ ||
|| | $$ \ $$ /$$ /$$ /$$$$$$ /$$$$$$ ||
|| | $$$$$$$$| $$ /$$/ /$$__ $$ /$$__ $$ ||
|| | $$__ $$ \ $$$$/ | $$$$$$$$| $$ \__/ ||
|| | $$ | $$ >$$ $$ | $$_____/| $$ ||
|| | $$ | $$ /$$/\ $$| $$$$$$$| $$ ||
|| |__/ |__/|__/ \__/ \_______/|__/ ||
|| ||
>>==================================================<<
π Fast and flexible project generator - Create projects from predefined templates with an intuitive TUI interface
Axer is a CLI tool written in Rust that accelerates the startup of new projects through predefined templates. Forget about repetitive configurations and start coding in seconds.
β¨ Features
- β‘ Fast and efficient - Written in Rust for optimal performance
- π¨ Interactive TUI interface - Smooth and visual navigation to select templates (inquire)
- π¦ TOML-based templates - Simple and flexible configuration
- π Variable system - Dynamic replacement using Handlebars
- π Multi-language support - Extensible architecture for different ecosystems (NodeJS, Rust, Python, etc.)
- π§ User configuration - Templates stored in system-specific directories
- π― Non-opinionated - Templates establish a starting point, not imposed architectures
π― Why Axer?
Axer was born from the need to eliminate friction when starting projects. Instead of copying folders, configuring files, and remembering the "correct" structure, simply run Axer and you'll have a solid base project in seconds.
Templates are opinionated but not restrictive - they provide conventions and a clear initial structure, but give you the freedom to modify according to your needs.
π¦ Installation
Requirements
- Rust 1.70+
- Cargo (comes with Rust)
From source
git clone https://github.com/Arekkazu/axer.git
cd axer
cargo build --release
The compiled binary will be in target/release/axer
Install globally (optional)
cargo install --path .
This will install axer on your system to run it from anywhere.
π Usage
TUI Mode (Terminal Interface)
Run Axer without arguments to open the interactive interface:
# If installed globally
axer
# Or from the project directory
cargo run
Navigate with the keyboard arrows, select your template, answer the configuration questions and you're done!
CLI Mode (Coming Soon)
Full CLI support is in active development. The clap dependency is already integrated and will be implemented soon to allow creating projects directly from the command line:
# Example of future usage
axer new my-project --template nest-api
axer list # List available templates
ποΈ Available Templates
Currently Axer includes:
- π NodeJS: NestJS API
Templates on Roadmap
The following templates are planned:
- π Web: React, Vue, Angular, Next.js, Express
- π¦ Rust: CLI, Web API (Axum/Actix), Desktop (Tauri)
- π Python: FastAPI, Django, Flask
- π± Mobile: React Native, Flutter
Contributions of new templates are welcome!
π Template Structure
Template Locations
Templates are stored in system-specific directories. The directory is automatically created the first time you run Axer.
π§ Coming Soon: Automatic download of official templates on first run. Currently, you need to manually copy templates from the repository to your local directory. In future versions, Axer will automatically download and install official templates when you first launch the application.
| Operating System | Location |
|---|---|
| Linux | ~/.config/axer-cli/templates/ |
| macOS | ~/Library/Application Support/top.Arekkazu.axer-cli/templates/ |
| Windows | C:\Users\<Username>\AppData\Roaming\Arekkazu\axer-cli\config\templates\ |
To add your own templates, create a new folder for each template inside the templates/ directory (e.g., templates/my-template/).
Template Configuration
Each template must have a template.toml file:
[metadata]
name = "NestJs Api"
language = "nodejs"
[[variables]]
field = "author"
prompt = "Project's author?: "
default = "arekkazu"
[[variables]]
field = "description"
prompt = "Project Description: "
default = "Building an API using NestJs"
template.toml Fields
- metadata.name: Descriptive name of the template
- metadata.language: Language/runtime (
nodejs,rust,python, etc.) - variables: Array of variables that will be replaced in files
- field: Variable name (used in Handlebars as
{{field}}) - prompt: Question shown to the user
- default: Default value if the user doesn't enter anything
- field: Variable name (used in Handlebars as
Using Variables in Files
Use Handlebars syntax in any template file:
{
"name": "{{project_name}}",
"author": "{{author}}",
"description": "{{description}}"
}
π οΈ Development
Build
cargo build
Run in development mode
cargo run
Run tests
cargo test
π Note: Project tests are under development. Unit and integration tests will be added soon to ensure code quality.
Check the code
cargo check
cargo clippy
π§ͺ Project Status
Axer is in active development. I'm learning and improving my Rust skills, so:
- β οΈ There may be compilation warnings (unused variables, dead code, etc.)
- π§ The code is in constant refactoring to follow best practices
- π I'm implementing features while learning idiomatic Rust patterns
- π If you find bugs or improvements, issues and PRs are welcome!
- β±οΈ Development pace: This project is updated occasionally, not on a fixed schedule
This project is also a learning opportunity, so I appreciate any constructive feedback on the code.
π‘ Note: Axer is maintained as a side project and receives updates when time allows. The
0.x.xversion indicates that the project is functional but still evolving.
πΊοΈ Roadmap
- Basic TUI interface (inquire)
- TOML template system
- Variable replacement system (Handlebars)
- Support for multiple package managers
- Configuration directory management
- Full CLI support with clap
- Automatic download of official templates on first run
- Clean warnings and improve code quality
- Binaries precompiled for multiple platforms
- More predefined templates (React, Vue, Rust, Python)
- User custom templates (documentation)
- Plugin system
- Global preferences configuration
- Support for remote templates (GitHub, GitLab)
π€ Contributing
Contributions are welcome! If you have ideas for new templates or improvements:
- Fork the project
- Create a branch for your feature (
git checkout -b feature/new-template) - Commit your changes (
git commit -m 'Add template for X') - Push to the branch (
git push origin feature/new-template) - Open a Pull Request
Contributing Templates
To add a new template:
- Run Axer once to auto-generate the templates directory
- Inside
templates/, create a new folder for your template (e.g.,my-react-app/) - Add a
template.tomlfile with the configuration - Include your project files using
{{variable}}variables for dynamic content - Test the template locally with Axer
- Submit a PR with documentation
π Main Dependencies
- inquire - Interactive TUI interface
- clap - CLI argument parsing (in implementation)
- handlebars - Template engine for variable replacement
- fs_extra - Advanced file system operations
- colored - Colorized terminal output
- serde + toml - TOML file parsing
- directories - System-specific directory paths
π License
This project is licensed under the MIT License. See the LICENSE file for more details.
MIT License - Copyright (c) 2026 Arekkazu
Dependencies
~10β24MB
~331K SLoC