Skip to content

Build your own web-apps in a single command. 100% customisable.

License

Notifications You must be signed in to change notification settings

SpinUp-CLI/spinup

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

28 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

SpinUp Banner

πŸŒ€ SpinUp CLI

Build web-apps, with the frameworks of your choice, with a single command. 100% customisable.

SpinUp is a powerful CLI tool that enables developers to quickly scaffold full-stack web applications using customizable templates. It supports various frontend frameworks and backend technologies, all configurable through a simple YAML configuration file.

✨ Features

  • πŸš€ Rapid Project Setup: Create full-stack projects with a single command
  • πŸ”§ Fully Customizable: Configure frontend, and backend services
  • πŸ“¦ Template System: Support for remote Git repositories as templates
  • πŸ” Private Repository Support: Authentication for private template repositories
  • 🌍 Environment Variables: Dynamic configuration using environment files
  • 🎨 Beautiful CLI Output: Colored and formatted terminal output
  • ⚑ Concurrent Deployment: Parallel service creation for faster setup

πŸ“¦ Installation

Prerequisites

  • Go 1.25.2 or later
  • Git

Build from Source

git clone https://github.com/SpinUp-CLI/spinup
cd spinup
make all

This will create a spin executable in the project directory.

πŸš€ Quick Start

1. Initialize Configuration

./spin init

This creates a default configuration file at ~/.config/spinup/defaults.yaml.

2. Create a Project

# Using default project name
./spin create

# Using custom project name
./spin create my-awesome-app

3. Reset Configuration

./spin reset

βš™οΈ Configuration

SpinUp uses a YAML configuration file located at ~/.config/spinup/defaults.yaml.

Default Configuration Structure

env_file: none
templates:
  remote_templates:
    - name: none
      url: https://github.com/SpinUp-CLI/
      secret: none
defaults:
  frontend: vue-template
  backend: go
  project_name: web-app

Configuration Options

Environment File

env_file: path/to/.env  # Path to environment variables file

Template Remotes

templates:
  remote_templates:
    - name: github
      url: https://github.com/your-org/
      secret: your_github_token
    - name: gitlab
      url: https://gitlab.com/your-org/
      secret: your_gitlab_token

Default Stacks

defaults:
  frontend: vue-template     # Frontend framework template
  backend: go               # Backend framework template
  project_name: web-app     # Default project name

Environment Variables

You can use environment variables in your configuration:

templates:
  remote_templates:
    - name: github
      url: https://github.com/my-org/
      secret: ${GITHUB_TOKEN:default_value}

πŸ—οΈ Project Structure

When you create a project, SpinUp generates the following structure:

my-project/
β”œβ”€β”€ my-project-front/    # Frontend service
└── my-project-back/     # Backend service

Each service is cloned from the corresponding template repository based on your configuration.

πŸ› οΈ Available Commands

spin init

Initialize SpinUp configuration. Creates a default configuration file if it doesn't exist.

Usage:

./spin init

spin create [project-name]

Create a new full-stack project.

Usage:

./spin create                    # Uses default project name
./spin create my-awesome-app     # Uses custom project name

What it does:

  1. Checks/creates configuration
  2. Sets up project directory
  3. Clones frontend template (if required)
  4. Clones backend template (if required)
  5. Configures services concurrently

spin reset

Reset the configuration to defaults. Recreates the configuration file.

Usage:

./spin reset

🎯 Template System

SpinUp uses Git repositories as templates. Templates are organized by framework name and fetched from configured remote URLs.

Template URL Structure

{remote_url}{framework_name}

Example:

  • Remote URL: https://github.com/SpinUp-CLI/
  • Framework: vue-template
  • Final URL: https://github.com/SpinUp-CLI/vue-template

Supported Authentication

  • Public repositories: No authentication required
  • Private repositories: Basic authentication using tokens

πŸ”§ Development

Project Architecture

spinup/
β”œβ”€β”€ cmd/                    # Cobra CLI commands
β”‚   β”œβ”€β”€ root.go            # Root command and help
β”‚   β”œβ”€β”€ init.go            # Init command
β”‚   β”œβ”€β”€ create.go          # Create command
β”‚   └── reset.go           # Reset command
β”œβ”€β”€ internal/
β”‚   β”œβ”€β”€ commands/          # Command implementations
β”‚   β”‚   β”œβ”€β”€ init_cmd.go
β”‚   β”‚   β”œβ”€β”€ create_cmd.go
β”‚   β”‚   β”œβ”€β”€ reset_cmd.go
β”‚   β”‚   └── utils/         # Command utilities
β”‚   β”œβ”€β”€ config/            # Configuration management
β”‚   β”‚   β”œβ”€β”€ config.go      # Config structures
β”‚   β”‚   β”œβ”€β”€ yaml.go        # YAML parsing
β”‚   β”‚   └── env_manager.go # Environment variable handling
β”‚   └── project/           # Project creation logic
β”‚       β”œβ”€β”€ project.go     # Project structures
β”‚       β”œβ”€β”€ create_project.go # Project creation
β”‚       └── cloner.go      # Git repository cloning
β”œβ”€β”€ pkg/                   # Reusable packages
β”‚   β”œβ”€β”€ fileutils/         # File system utilities
β”‚   β”œβ”€β”€ iostream/          # Formatted output
β”‚   └── utils/             # ANSI colors and formatting
└── main.go               # Application entry point

Key Components

Configuration System (internal/config)

Project Management (internal/project)

Output System (pkg/iostream)

Building and Testing

# Build the project
make all

# Run the application
make run

# Format code
make fmt

# Clean build artifacts
make clean

🀝 Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Run tests: make test
  5. Format code: make fmt
  6. Submit a pull request

πŸ“ License

This project is licensed under the terms specified in the LICENSE file.

πŸ‘€ Author

Elouann Hosta


Built with ❀️ using Go and Cobra CLI

About

Build your own web-apps in a single command. 100% customisable.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published