MCPcopy Index your code
hub / github.com/archetect/archetect

github.com/archetect/archetect @v3.0.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release v3.0.0 ↗ · + Follow
1,831 symbols 4,825 edges 212 files 285 documented · 16%
What it actually does AI analysis from the code graph — generated when you open this
loading…
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 Rhai scripting and orchestration syntax
  • 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

Extension points exported contracts — how you extend this code

PromptInfo (Interface)
(no doc) [7 implementers]
archetect-api/src/commands/prompt_info.rs
SystemLayout (Interface)
(no doc) [2 implementers]
archetect-core/src/system.rs
Responder (Interface)
(no doc) [2 implementers]
archetect-terminal-io/src/responder.rs
Inflector (Interface)
(no doc)
archetect-inflections/src/lib.rs
ScriptIoHandle (Interface)
(no doc) [4 implementers]
archetect-api/src/io_driver.rs
InflectorNumbers (Interface)
(no doc)
archetect-inflections/src/lib.rs
PromptInfoLengthRestrictions (Interface)
(no doc) [3 implementers]
archetect-api/src/commands/prompt_info.rs
ClientIoHandle (Interface)
(no doc) [2 implementers]
archetect-api/src/io_driver.rs

Core symbols most depended-on inside this repo

clone
called by 198
archetect-core/src/script/lua/context.rs
insert
called by 117
archetect-core/src/script/lua/context.rs
as_str
called by 104
archetect-api/src/context_map.rs
clone
called by 98
archetect-mcp/src/io_handle.rs
collect
called by 88
archetect-bin/src/configuration/mod.rs
get
called by 61
archetect-core/src/catalog/catalog_index.rs
help
called by 54
archetect-api/src/commands/int_prompt_info.rs
respond
called by 49
archetect-terminal-io/src/responder.rs

Shape

Function 1,151
Method 508
Class 119
Enum 43
Interface 10

Languages

Rust100%

Modules by API surface

archetect-core/src/script/lua/modules.rs90 symbols
archetect-core/src/templating/atl/mod.rs78 symbols
archetect-core/src/templating/atl/compiler.rs70 symbols
archetect-core/src/templating/atl/tokenizer.rs57 symbols
archetect-inflections/src/case/mod.rs47 symbols
archetect-core/src/script/lua/context.rs39 symbols
archetect-core/src/manifest.rs35 symbols
archetect-core/tests/test_utils.rs34 symbols
archetect-bin/src/answers/answers.rs34 symbols
archetect-core/src/library.rs30 symbols
archetect-core/src/archetype/render_context.rs30 symbols
archetect-inflections/src/case/snake.rs29 symbols

For agents

$ claude mcp add archetect \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact