archetect-core

Crates.ioarchetect-core
lib.rsarchetect-core
version0.7.3
sourcesrc
created_at2021-05-07 04:52:58.465712
updated_at2021-08-26 23:11:58.815768
descriptionGenerates Content from Archetype Template Directories and Git Repositories.
homepagehttps://archetect.github.io
repositoryhttps://github.com/archetect/archetect
max_upload_size
id394098
size659,354
Jimmie Fulton (jimmiebfulton)

documentation

README

archetect

Rust

Archetect is a powerful code-centric, language agnostic content generator, capable of generating single files, complex projects, or entire architectures. Key features include:

  • A Jinja2-like templating syntax
  • A yaml-based configuration DSL
  • Easy installation
  • Easy archetype authoring and publishing (Git repos or local directories)
  • Smart pluralization and singularization functions (soliloquy->soliloquies, calf->calves)
  • Smart casing functions (camelCase, PascalCase, snake_case, title-case, CONSTANT_CASE)
  • Archetype compositions
  • A distributed menu/catalog system

Modules:

Quick Start

Installation

For a more in-depth guide to installing archetect, see the Installation Guide.

Archetect is a CLI application, and can either be installed by downloading a pre-built binary from Archetect's Releases Page, or by installing with Rust Lang's build tool, cargo:

cargo install archetect --force

Once you have Archetect successfully installed and added to your shell's path, you can test that everything is working while also initializing some default settings by generating them with Archetect itself:

archetect render https://github.com/archetect/archetect-initializer.git ~/.archetect/

This will prompt you for your name and email address, and write this into files within the ~/.archetect, which you can inspect.

Rendering Archetypes

From this point, browse the archetypes and catalogs within the Archetect Github organization for some pre-made archetypes you can use immediately, or for inspiration in making your own. The README.md files commonly have an archetect command line example that can be copy/pasted to your shell to render new projects quickly and easily.

Example:

# To generate a Rust microservice using Actix and Diesel
archetect render https://github.com/archetect/archetype-rust-service-actix-diesel-workspace.git

# To select from a catalog of test_archetypes using a command line menu system
archetect catalog --source https://github.com/archetect/catalog-rust.git

Documentation

Binary Releases

Releases for OSX, Windows, and Linux

Usage

archetect 0.5.0
Jimmie Fulton <jimmie.fulton@gmail.com>
Generates Content from Archetype Template Directories and Git Repositories.

USAGE:
    archetect [FLAGS] [OPTIONS] <SUBCOMMAND>

FLAGS:
    -h, --help       Prints help information
    -o, --offline    Only use directories and already-cached remote git URLs
    -V, --version    Prints version information
    -v, --verbose    Increases the level of verbosity

OPTIONS:
    -a, --answer <key=value>...    Supply a key=value pair as an answer to a variable question.
    -A, --answer-file <path>...    Supply an answers file as answers to variable questions.
    -s, --switch <switches>...     Enable switches that may trigger functionality within Archetypes

SUBCOMMANDS:
    cache          Manage/Select from Archetypes cached from Git Repositories
    catalog        Select From a Catalog
    completions    Generate shell completions
    help           Prints this message or the help of the given subcommand(s)
    render         Creates content from an Archetype
    system         archetect system configuration
Commit count: 210

cargo fmt