MCPcopy Index your code
hub / github.com/Keats/tera

github.com/Keats/tera @v2.0.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release v2.0.0 ↗ · + Follow
741 symbols 2,015 edges 62 files 157 documented · 21%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Tera

For v1 users: see migration guide.

v1 repository is still available in https://github.com/Keats/tera1. v2 is a from-scratch rewrite and it didn't make sense to just overwrite the whole repo to me.

Tera is a template engine inspired by Jinja2 and the Django template language.

<title>{% block title %}{% endblock title %}</title>
<ul>
{% for user in users %}
  <li><a href="https://github.com/Keats/tera/raw/v2.0.0/{{ user.url }}">{{ user.username }}</a></li>
{% endfor %}
</ul>

It intentionally deviates from Jinja2/Django in many ways, only the overall look and feel is similar.

Documentation

API documentation is available on docs.rs.

Tera documentation is available on its site.

Extension points exported contracts — how you extend this code

ArgFromValue (Interface)
Converts a template Value into a type that can be used in Rust code [11 implementers]
tera/src/args.rs
Sealed (Interface)
(no doc) [25 implementers]
tera/src/args.rs
Filter (Interface)
The filter function type definition [3 implementers]
tera/src/filters.rs
TestResult (Interface)
Converts a custom test return value into a `TeraResult `. [2 implementers]
tera/src/tests.rs
Test (Interface)
The test function type definition [2 implementers]
tera/src/tests.rs

Core symbols most depended-on inside this repo

insert
called by 177
tera/src/context.rs
push
called by 127
tera/src/vm/stack.rs
add
called by 103
tera/src/parsing/instructions.rs
default
called by 79
tera/src/filters.rs
len
called by 61
tera/src/value/mod.rs
pop
called by 57
tera/src/vm/stack.rs
register_filter
called by 54
tera/src/tera.rs
as_str
called by 51
tera/src/value/mod.rs

Shape

Method 363
Function 263
Class 85
Enum 23
Interface 7

Languages

Rust100%

Modules by API surface

tera/src/value/mod.rs75 symbols
tera/src/tera.rs66 symbols
tera/src/filters.rs53 symbols
tera/src/value/ser.rs45 symbols
tera/src/parsing/ast.rs43 symbols
tera/src/parsing/parser.rs37 symbols
tera/src/errors.rs31 symbols
tera/src/tests.rs23 symbols
tera/src/value/number.rs19 symbols
tera/src/snapshot_tests/rendering.rs19 symbols
tera/src/vm/for_loop.rs17 symbols
tera/src/value/de.rs17 symbols

For agents

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

⬇ download graph artifact