Skip to content
kompiroPublic

About

A text modeling language describes system architecture, deployment archives, teams structure

Resources

Code of conduct

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

2,419 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

karasu 鴉

karasu logo

English (this file) · 日本語

Ask DeepWiki Built with Cloudflare

Architecture as code for understanding and evolving real systems.

karasu is a text-based architecture modeling language and toolchain. It keeps a system's logical structure, physical deployment, and team ownership in one model that people, code, and AI agents can all read and evolve.

An AI agent reverse-engineers a repository into one karasu model; the web app then shows the whole system, drills into a service and its domains, focuses on a node and on an edge, zooms into the use cases of a domain, and switches to the deploy view.

Try it in your browser →

Documentation · Guides · Syntax reference · Examples · VS Code

One model, three perspectives

Architecture is more than a diagram. You need to understand what the system does, how it runs, who owns it, and how those boundaries change together.

Perspective What it describes
Logical Systems, services, domains, use cases, entities, and dependencies
Physical Deployments, runtimes, databases, queues, and storage
Organizational Teams and ownership

The .krs text is the source of truth. Humans can edit it, the CLI can derive it from existing artifacts, and AI agents can create or refine it from source code. karasu renders the same model as focused diagrams with continuous drill-down, instead of forcing every level of a system into one overloaded picture.

Try it

1. Explore in the browser

Open the web app to edit a model, navigate its diagrams, and follow the built-in tutorial. Nothing needs to be installed.

To work in your editor instead, install the VS Code extension:

code --install-extension karasu-tools.karasu-vscode

2. Bootstrap from your own system

Already have Docker Compose, Kubernetes manifests, an OpenAPI schema, or SQL DDL? karasu translate turns it into an editable .krs starting point:

npx --yes karasu@latest translate --from compose docker-compose.yml > architecture.krs
npx --yes karasu@latest serve .

Use --from k8s, --from openapi, or --from db for the other supported inputs. See Using the CLI for the full command reference.

3. Model with an AI agent

Two agent skills drive the karasu CLI for you:

  • karasu-author builds and updates a model of your own system through conversation: it interviews you one layer at a time, reads the code to skip questions the code answers, and checks every change with karasu check.
  • reverse-architecture has a repository-aware agent inspect an existing codebase and build a model, combining agent judgment for domain structure with deterministic CLI extraction and validation. See the guide for what it costs and how to review the result.

The skills drive the karasu CLI, so install that too with npm i -g karasu. In Claude Code, install them as a plugin:

/plugin marketplace add kompiro/karasu
/plugin install karasu@karasu

For other agents, copy them into the directory your agent reads skills from:

npx karasu skill install --dir .agents/skills

The result is a map to review and evolve, not a claim of perfect ground truth. karasu remains useful without AI: the model is plain text, editable by hand, and independent of the agent that produced it.

A small model

system Shop {
  user Customer [human]
  service Storefront {
    domain Ordering
  }
  service Payment [external]

  Customer -> Storefront "Place an order"
  Storefront -> Payment "Charge"
}

deploy Production {
  oci WebApp {
    runtime "Node.js"
    realizes Storefront
  }
}

organization Product {
  team Commerce {
    owns Storefront
  }
}

Open it in the web app or run npx --yes karasu@latest serve . to move between the System, Deploy, and Org views and drill into the details.

Why karasu?

  • Architecture that can evolve with the system — review text changes in Git, compare diagrams, and keep architecture close to engineering work.
  • Logical, physical, and organizational boundaries together — discuss service design, deployment, and ownership in the same vocabulary.
  • Progressive disclosure — start with a scoped overview, then drill down only where detail is useful.
  • A shared model for people and tools — hand-edit .krs, generate a scaffold from structured inputs, or let an AI agent propose changes without making the model dependent on AI.

karasu takes inspiration from C4 Model, Structurizr, and Mermaid. Read Core concepts for the design rationale and the guides for modeling service and team boundaries, onboarding, and architectural evolution.

Documentation

Project status

karasu is a personal learning project, maintained on a best-effort basis with no SLA. The .krs / .krs.style language specification is v1.0 and keeps backward compatibility; the TypeScript API remains v0.x and may change between minor releases. See ADR-1314 for the language compatibility commitment.

Contributing, security, and license

Issues and pull requests are welcome. See CONTRIBUTING.md and the Code of Conduct. Report vulnerabilities through private vulnerability reporting, not a public issue; see SECURITY.md.

Licensed under the Apache License, Version 2.0.

About

A text modeling language describes system architecture, deployment archives, teams structure

Resources

Code of conduct

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Releases

Used by

Contributors

Languages