#ctags #analysis #language #different #regex #results #generate

bin+lib modeling

Modeling is a tools to analysis different languages by Ctags

16 releases (5 breaking)

0.6.2 Mar 15, 2022
0.6.1 Feb 2, 2022
0.6.0 Jan 17, 2022
0.5.0 Jan 15, 2022
0.1.7 May 7, 2021

#1204 in Text processing

Download history 11/week @ 2024-02-23 1/week @ 2024-03-01 51/week @ 2024-03-29 8/week @ 2024-04-05

59 downloads per month

MIT license


Rust 2.5K SLoC // 0.0% comments JavaScript 434 SLoC // 0.0% comments C++ 85 SLoC // 0.1% comments Java 38 SLoC // 0.4% comments Go 25 SLoC // 0.4% comments TypeScript 25 SLoC


crates.io docs.rs license

Modeling is a tools to analysis different languages by Ctags


  1. analysis ctags
  • generate to opt
  • call ctags with opt
  • analysis ctags logs by regex
  1. generate results
  2. visual result with visualing (optional)

language support:

  • Java
  • C#
  • Cpp
  • TypeScript
  • Golang
  • Rust
  • ... others by ctags


  • modeling, generate model from source code.
  • concepting, generate concepts from source code.
  • visualing, visualization the uml.
Modeling 0.6.1

    modeling [FLAGS] [OPTIONS]

    -b, --by-modules             multiple modules
    -d, --debug                  output debug information
    -f, --field-only             only load field in methods
    -h, --help                   Prints help information
        --inline-id-suffix       if class's prop end with Id and class in list, will replace `int` type to `xxClass`
    -m, --merge                  merge for same method name
    -V, --version                Prints version information
        --without-impl-suffix    if class's prop start with `IRepository` will become `Repository`
        --without-parent         without class inheritance

    -g, --grep <grep>                  by grep regex rules: for example: `.*Service` [default: ]
    -i, --input <input>                input dir [default: .]
    -o, --output-type <output-type>    support: puml, mermaid, graphviz with json [default: puml]
    -p, --packages <packages>...       filter by packages, like: `com.phodal.modeling`
    -s, --suffixes <suffixes>...       filter by suffixes, like: `java` for .java file

sample: puml to Image

convert to image: plantuml modeling.puml modeling.svg -tsvg

sample: Grep with MVC

modeling --input=/youpath/ --field-only --without-parent --grep ".*Service|.*Controller|.*Repository"

sample: with Graphviz and Visualization

with --output-type=graphviz

modeling --input=/youpath  --field-only -o graphviz --without-impl-suffix


cargo install modeling
modeling .


use modeling::{by_dir};
use modeling::render::PlantUmlRender;

let classes = by_dir("src/");
let puml = PlantUmlRender::render(&classes);

output sample:


class Animal {
  + string name
  + string constructor()

class Horse extends Animal {

class Snake extends Animal {



ctags analysis based on https://github.com/dalance/ptags with MIT, see in src

ctags parser rewrite from Golang's https://github.com/ruben2020/tags2uml with Apache License.

@ 2020~2021 This code is distributed under the MIT license. See LICENSE in this directory.


~1M SLoC