AEM Sling Models + HTL Snippets + GraphQL Generator
A powerful VS Code extension that supercharges Adobe Experience Manager development with intelligent code generation for Sling Models, HTL snippets, and GraphQL types. Streamline your workflow and follow best practices with just a few clicks.
✨ Features
- 🚀 Sling Model Generation – Create production-ready Sling Models with various injection types
- 💡 HTL Snippets – Boost productivity with comprehensive HTL code completions
- ❄️ GraphQL Support – Generate GraphQL type definitions with example queries
- 🔥 Multiple Templates – Choose from different Sling Model types (Component, Request, Exporter, etc.)
- ⚡ Smart Code Generation – Automatic imports, proper annotations, and best practices
📦 Installation
- Open Visual Studio Code
- Go to Extensions view (
Ctrl+Shift+X
)
- Search for
"AEM Sling Models + HTL Snippets + GraphQL Generator"
- Click Install
🚀 Usage
Generate a Sling Model
- Open Command Palette (
Ctrl+Shift+P
or Cmd+Shift+P
on Mac)
- Type:
Generate Sling Model
- Follow the prompts to configure your model

Generate a GraphQL Type
- Open Command Palette (
Ctrl+Shift+P
or Cmd+Shift+P
on Mac)
- Type:
Generate GraphQL Model
- Enter your query name and configure as needed

HTL Snippets
Start typing any HTL data-sly attribute and get intelligent code completion suggestions.
🛠 Supported Sling Model Features
Injection Types (Annotations)
@ValueMapValue
- Inject properties from ValueMap
@Inject
- General dependency injection
@OSGiService
- Inject OSGi services
@ChildResource
- Access child resources
@RequestAttribute
- Access request attributes
@ScriptVariable
- Access script variables
@Self
- Inject the adaptable object
@PostConstruct
- Post-construction callback
@PreDestroy
- Pre-destruction callback
@Via
- Inject with resource type resolution
@Named
- Inject with OSGi service name
@Default
- Inject with default value
@Optional
- Inject with optional value
Field Types
- Primitives (String, int, long, double, boolean)
- Resource and Sling objects (Resource, ResourceResolver, Session)
- Request/Response objects (SlingHttpServletRequest, SlingHttpServletResponse)
- AEM-specific (Component, Page, Design, Style)
📝 Example Sling Model
@Model(adaptables = Resource.class)
public class MyComponent {
@ValueMapValue
private String title;
@OSGiService
private ModelFactory modelFactory;
@PostConstruct
protected void init() {
// Initialization code here
}
}
🤝 Contributing
Contributions are welcome! If you have suggestions, issues, or ideas, feel free to open an issue or submit a Pull Request.
📄 License
This project is licensed under the MIT License – see the LICENSE file for details.
👨💻 About the Author

Pradeep Sapparapu
"I created this tool to make AEM development faster and more efficient. It's 100% free and open-source — share it with your team!"
Made with ❤️ in Andhra Pradesh, India 🇮🇳
🔗 GitHub •
📧 Email Me
🙏 Support
If you find this tool helpful, please ⭐ star the repository and share it with your team!
You can also follow me on GitHub for more AEM tools and updates.
© 2025 Padde Software. All rights reserved.