Asimonim


A high-performance design tokens parser, validator, and language server, available as a CLI tool and Go library.
Asimonim (אֲסִימוֹנִים) (ahh-see-moh-NEEM) is Hebrew for "tokens".
Design systems use [design tokens][dtcg] to store visual primitives like colors, spacing, and typography. Asimonim parses and validates token files defined by the Design Tokens Community Group (DTCG) specification, supporting both the current draft and the stable V2025_10 schema.
Features
- Multi-schema support: Handles both Draft and V2025_10 DTCG schemas
- Automatic schema detection: Duck-typing detection of schema version from file contents
- Alias resolution: Resolve token references with cycle detection
- Multi-format export: Convert tokens to TypeScript, SCSS, Swift, XML, and more
- CSS output: Generate CSS custom properties from tokens
- Search: Find tokens by name, value, or type with regex support
- Validation: Check files for schema compliance and circular references
- Language Server: Full LSP support for design tokens in your editor
- MCP Server: Model Context Protocol server for AI-assisted development
Installation
npm
npm install -g @pwrs/asimonim
Gentoo Linux
Enable the bennypowers overlay, then install:
eselect repository enable bennypowers
emaint sync -r bennypowers
emerge dev-util/asimonim
From Source
go install bennypowers.dev/asimonim@latest
Documentation
Full documentation is available at bennypowers.dev/asimonim.
Go library
The module is bennypowers.dev/asimonim. The main public packages are:
| Package | Purpose |
|---|
parser | Parse DTCG JSON and YAML into tokens |
resolver | Resolve aliases and $extends relationships |
token | Core token types and prefix-aware lookup |
schema | Schema version detection and conversion |
validator | Schema consistency checks |
convert | Serialize tokens to CSS, SCSS, JS, Swift, Android XML, and other formats |
load | High-level loading from paths and package specifiers |
fs | Filesystem abstraction |
config | Configuration loading |
version | Build and version information |
The module also exports specifier, parser/common, lsp, and mcp, but
the packages above are the primary library surface.
Run go doc bennypowers.dev/asimonim/parser (or the name of any package
above) for the full API and examples.
Embedding the MCP server
mcp.Register mounts asimonim's tools and resources on an MCP server that you
own:
import (
asimonimmcp "bennypowers.dev/asimonim/mcp"
"github.com/modelcontextprotocol/go-sdk/mcp"
)
srv := mcp.NewServer(&mcp.Implementation{Name: "my-server", Version: "1.0.0"}, nil)
_, err := asimonimmcp.Register(srv, filesystem, cfg, cwd,
asimonimmcp.WithTools(asimonimmcp.Selection{Exclude: []string{"convert_tokens"}}),
asimonimmcp.WithConflictPolicy(asimonimmcp.ConflictError),
)
if err != nil {
return err
}
With no options, Register mounts the full surface and replaces existing
entries, matching NewServer. WithTools, WithResources, and
WithTemplates take exact, case-sensitive Include and Exclude lists. An
Include entry that matches nothing is an error; an Exclude entry that
matches nothing is ignored. ConflictError and ConflictSkip inspect the host
server through a short-lived in-memory session when there are selected features
to check, so host session hooks and middleware observe that probe.
ConflictError returns a *RegistrationConflict that lists the conflicting
tools, resources, and templates. A server returned by Register has no
transport of its own, so Run returns an error.
Workspace resolution
Tools and resources resolve their workspace lazily, in this order:
- an explicit
cfg passed to NewServer or Register;
- a directory passed with
WithWorkspace, which is shared by every session
and never queries roots;
- the session's cached resolution;
- the client's MCP roots: directly on protocol revisions before
2026-07-28,
and through multi-round-trip requests (SEP-2322) on 2026-07-28 and later;
- the server's
cwd.