Skip to content

A powerful CLI tool for Juice ORM, featuring interface implementation generation and namespace suggestions

License

Notifications You must be signed in to change notification settings

go-juicedev/juicecli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

JuiceCLI

JuiceCLI is a powerful command-line tool designed to enhance development efficiency with the Juice ORM framework.

Features

  • Interface Implementation Generator: Automatically generate implementation code for interfaces
  • Smart Namespace Suggestion: Get intelligent suggestions for package namespaces
  • XML Configuration: Customize implementation details through XML configuration

Installation

go install github.com/go-juicedev/juicecli@latest

Usage

Generate Implementation

Generate implementation for an interface:

juicecli impl --type UserRepository

Options:

  • --type, -t: The interface type name to generate implementation for (required)
  • --namespace, -n: The package name for the generated implementation. If not specified, it will be auto-generated
  • --output, -o: The output file path. If not specified, output will be written to stdout
  • --config, -c: The configuration file path. If not specified, it will search for:
    • juice.xml
    • config/juice.xml
    • config.xml
    • config/config.xml

Examples:

# Basic usage
juicecli impl --type UserRepository

# With custom namespace and output file
juicecli impl --type UserRepository --namespace repository --output user_repository.go

# With custom config file
juicecli impl --type UserRepository --config custom.xml

Get Namespace Suggestion

Get a suggested namespace for your interface:

juicecli tell --type UserRepository

Options:

  • --type, -t: The interface type name to analyze (required)

Configuration

The implementation generator can be customized through XML configuration files. Example configuration:

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <settings>
        <!-- Custom settings here -->
    </settings>
</configuration>

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

A powerful CLI tool for Juice ORM, featuring interface implementation generation and namespace suggestions

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages