All Projects → Cosmo → Hackman

Cosmo / Hackman

Licence: mit
🤖🔜🤯 Stop writing boilerplate code yourself. Let hackman do it for you via the command line.

Programming Languages

swift
15916 projects

Projects that are alternatives of or similar to Hackman

Catalyst
Typescript NodeJS Microservices Boilerplate with Generator CLI - Moleculer, GraphQL, REST, OAuth2, Jaeger, Grafana, Prometheus, Ory Hydra, Ory Keto w/ Access Control middleware, Moleculer-DB GraphQL mixin, Pug, Redis, sibling client repo (login, persistance layer, react-native-web, ios, android)
Stars: ✭ 30 (-89.51%)
Mutual labels:  boilerplate, generator
Scaffolder
Scaffolder - Increasing dev velocity and standardizing file conventions.
Stars: ✭ 126 (-55.94%)
Mutual labels:  boilerplate, generator
Sao
⚔ Futuristic scaffolding tool
Stars: ✭ 966 (+237.76%)
Mutual labels:  boilerplate, generator
Reactprimer
React component prototyping tool that generates fully connected class component code.
Stars: ✭ 743 (+159.79%)
Mutual labels:  boilerplate, generator
Pollinate
Template your base files and generate new projects from Git(Hub).
Stars: ✭ 213 (-25.52%)
Mutual labels:  boilerplate, generator
Unityprojecttreegenerator
This script will generate universal folder structure for your Unity3D project.
Stars: ✭ 12 (-95.8%)
Mutual labels:  boilerplate, generator
Gp Vue Boilerplate
Grabarz & Partner Boilerplate is a professional front-end template for building fast, robust, and adaptable web apps or sites with vuejs.
Stars: ✭ 71 (-75.17%)
Mutual labels:  boilerplate, generator
Swift Template
A template based module generator for Swift projects.
Stars: ✭ 34 (-88.11%)
Mutual labels:  boilerplate, generator
Ignite
Infinite Red's cutting edge React Native project boilerplate, along with a CLI, component/model generators, and more!
Stars: ✭ 13,296 (+4548.95%)
Mutual labels:  boilerplate, generator
Project Webcube
Continuously updated JS infrastructure for modern web dev
Stars: ✭ 141 (-50.7%)
Mutual labels:  boilerplate, generator
React Cdk
under development - React Component Development Kit with Storybook
Stars: ✭ 583 (+103.85%)
Mutual labels:  boilerplate, generator
Generate
A new command line tool and developer framework for scaffolding out GitHub projects. Generate offers the robustness and configurability of Yeoman, the expressiveness and simplicity of Slush, and more powerful flow control and composability than either.
Stars: ✭ 238 (-16.78%)
Mutual labels:  boilerplate, generator
Vim Doge
(Do)cumentation (Ge)nerator 10+ languages 📚 Generate proper code documentation skeletons with a single keypress. ⚡️🔥
Stars: ✭ 533 (+86.36%)
Mutual labels:  boilerplate, generator
Samples Viewer Generator
🎉 A CLI utility tool to generate web app of data visualization samples for presentation purpose
Stars: ✭ 13 (-95.45%)
Mutual labels:  boilerplate, generator
Automatic Gatsbyjs App Landing Page
Automatic GatsbyJS App Landing Page - Automatically generate iOS app landing page using GatsbyJS
Stars: ✭ 137 (-52.1%)
Mutual labels:  boilerplate, generator
Stator
Stator, your go-to template for the perfect stack. 😍🙏
Stars: ✭ 217 (-24.13%)
Mutual labels:  boilerplate, generator
Extension Create
Create modern cross-browser extensions with no build configuration.
Stars: ✭ 167 (-41.61%)
Mutual labels:  boilerplate, generator
Modular Admin Html
ModularAdmin - Free Dashboard Theme Built On Bootstrap 4 | HTML Version
Stars: ✭ 2,875 (+905.24%)
Mutual labels:  boilerplate
Mevn Boilerplate
A fullstack boilerplate with Mongo, ExpressJS, VueJS and NodeJS.
Stars: ✭ 277 (-3.15%)
Mutual labels:  boilerplate
Github Activity Generator
A script that helps generate a rich GitHub Contribution Graph for your account
Stars: ✭ 259 (-9.44%)
Mutual labels:  generator
 text

HackMan

Swift Package Manager compatible License MIT

HackMan is a simple tool for generating boilerplate code directly via the command line.

Let hackman do the boring work and save some time. Hackman is heavily inspired by the rails command.

Installation

Clone and build

git clone [email protected]:Cosmo/HackMan.git
cd HackMan
swift build -c release

Add hackman executable to your PATH.

PATH=$PATH:$(pwd)/.build/release

or make it persistent

For zsh Users (default on macOS Catalina)

echo "export PATH=\"\$PATH:$(pwd)/.build/release\"" >> ~/.zshrc

For bash Users (default on macOS Mojave)

echo "export PATH=\"\$PATH:$(pwd)/.build/release\"" >> ~/.bash_profile

Usage

New Project

# Create new project directory including a "project.yml" for xcodegen
hackman new APP_NAME

# Change into your project directory
cd APP_NAME

Generators

Run these generators inside of your project directory.

# Create an AppDelegate
hackman generate app_delegate

Options
  --coordinator, -c
    Adds coordinator support

  --force, -f
    Force override existing files
# Create an empty AssetCatalog
hackman generate asset_catalog

Options
  --force, -f
    Force override existing files
# Create a LaunchScreen-Storyboard
hackman generate launch_screen

Options
  --force, -f
    Force override existing files
# Create a ReusableView protocol and useful extensions for UICollectionViews and UITableViews
hackman generate reusable_view

Options
  --force, -f
    Force override existing files
# Create a Coordinator protocol
hackman generate coordinator

Options
  --force, -f
    Force override existing files
# Create a MainCoordinator
hackman generate coordinator_main NAME NAME …

Options
  --force, -f
    Force override existing files

  --include=NAME,NAME,…
    Include ViewControllers that were not generated via scaffold.
    Names must be separated with commas. Spaces between names are not allowed.
# Create a Child-Coordinator with the given name
hackman generate coordinator_child NAME

Options
  --force, -f
    Force override existing files
# Create a Model with the given name and properties
hackman generate model NAME [PROPERTY[:TYPE] PROPERTY[:TYPE]] …

Options
  --force, -f
    Force override existing files
# Create a UIViewController-Subclass with the given name
hackman generate view_controller NAME

Options
  --coordinator, -c
    Adds coordinator support

  --force, -f
    Force override existing files
# Create a ViewControllerCollection (UIViewController-Subclass with a UICollectionView) and UICollectionViewDataSource
hackman generate view_controller_collection NAME [PROPERTY[:TYPE] PROPERTY[:TYPE]] …

Options
  --coordinator, -c
    Adds coordinator support

  --force, -f
    Force override existing files
# Create a UICollectionViewCell-Subclass with the given namen and properties as UILabels
hackman generate collection_view_cell NAME [PROPERTY[:TYPE] PROPERTY[:TYPE]] …

Options
  --force, -f
    Force override existing files
# Create a ViewControllerTable (UIViewController-Subclass with a UITableView) and UITableViewDataSource
hackman generate view_controller_table NAME [PROPERTY[:TYPE] PROPERTY[:TYPE]] …

Options
  --coordinator, -c
    Adds coordinator support

  --force, -f
    Force override existing files
# Create a UITableViewCell-Subclass with the given namen and properties as UILabels
hackman generate table_view_cell NAME [PROPERTY[:TYPE] PROPERTY[:TYPE]] …

Options
  --force, -f
    Force override existing files
# Create a ViewControllerDetail (UIViewController-Subclass) with the given namen and properties as UILabels
hackman generate view_controller_detail NAME [PROPERTY[:TYPE] PROPERTY[:TYPE]] …

Options
  --coordinator, -c
    Adds coordinator support

  --force, -f
    Force override existing files
# Create a UIViewController-Subclass with a UIWebView
hackman generate view_controller_web

Options
  --coordinator, -c
    Adds coordinator support

  --force, -f
    Force override existing files
# Create a UIViewController-Subclass with entry points for legal documents
hackman generate view_controller_information

Options
  --coordinator, -c
    Adds coordinator support
  
  --force, -f
    Force override existing files
# Create Model, UICollectionView/UITableView Extensions, UIViewController with UICollectionView/UITableView, ViewControllerDetail, ChildCoordinator, Coordinator Protocol and ReusableView Protocol
hackman generate scaffold NAME [PROPERTY[:TYPE] PROPERTY[:TYPE]] …

# By default, the scaffold will be UICollectionView based.
# In order to create UITableView based scaffolds, pass the --view=table at the end.
# Like so:
hackman generate scaffold song title:string year:int --view=table

Options
  --coordinator, -c
    Adds coordinator support
    
  --force, -f
    Force override existing files

You can also write hackman g instead of hackman generate.

Properties

When creating scaffolds, models, controllers you can also specify multiple fields to be generated automatically

hackman g scaffold author name:string birthday:date

This commands creates among other things a struct of type Author with the following properties.

    let name: String
    let birthday: Date

You can also reference to your custom types.

hackman g scaffold Article title:string body:string published_at:date author:author

This will generate the following properties inside of the Article model.

    let title: String
    let body: String
    let publishedAt: Date
    let author: Author

If you omit the property type, hackman assumes you want a property of type String.

hackman g scaffold article title body published_at:date author:author

An example of a fully working app

hackman new MusicApp
cd MusicApp
hackman g app_delegate --coordinator
hackman g asset_catalog
hackman g launch_screen
hackman g scaffold artist name --coordinator
hackman g scaffold song title year:int --coordinator
hackman g scaffold album name uuid artist:artist created_at:date updated_at:date --coordinator
hackman g view_controller_information --coordinator
hackman g coordinator_main song artist album --include=information
xcodegen
open MusicApp.xcodeproj

Demo

Demo

Requirements

  • Xcode 10
  • Swift 5

Todos

  • [ ] Easier setup
  • [ ] Easy support for custom generators
  • [x] Add help (-h / --help)
  • [ ] SwiftUI based templates
  • [ ] Generator for localization

Contact

License

HackMan is released under the MIT License.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].