Giter VIP home page Giter VIP logo

xcodetargetgraphgen's Introduction

version Swift Package Manager Build License

What is this?

XcodeTargetGraphGen is a Swift command-line tool that interprets .xcodeproj files to create a visual depiction of module-level internal dependencies using Mermaid diagram syntax. By supporting multiple package managers, it enables users to visually map out the structure and dependencies of Xcode projects across various environments, providing a clear and comprehensible graphical representation of these relationships.

The supported package managers are as follows:

  • Swift Package Manager
  • Carthage
  • CocoaPods (only supports the old format that does not use .xcfilelist)

Installing

Swift Package Manager

Use as CLI

git clone https://github.com/CuriositySoftware/XcodeTargetGraphGen.git
cd XcodeTargetGraphGen
swift run xcgraphgen [project-file-path]

Usage

Simply run:

xcgraphgen [project-file-path] [OPTIONS...] 
$ xcgraphgen -h
OVERVIEW: Output Xcode Target Dependency Graph.

USAGE: xcgraphgen [<options>] <project-file-path>

ARGUMENTS:
  <project-file-path>     .xcodeproj file path.

OPTIONS:
  --output-file-path <output-file-path>
                          Output file path. (default: ./dependencies.md)
  --mermaid-theme <mermaid-theme>
                          Select Mermaid theme type (eg: neutral, forest, dark, base). (default: dark)
  --mermaid-syntax-type <mermaid-syntax-type>
                          Select Mermaid syntax type. (default: flowchart)
  --mermaid-chart-direction <mermaid-chart-direction>
                          Select Mermaid graph/flowchart direction. (default: TD)
  --enable-swift-package-output/--disable-swift-package-output
                          Targeting Swift Package Product for output. (default: --disable-swift-package-output)
  --enable-apple-sdk-output/--disable-apple-sdk-output
                          Targeting Apple SDKs for output. (default: --disable-apple-sdk-output)
  --enable-carthage-output/--disable-carthage-output
                          Targeting Carthage for output. (default: --enable-carthage-output)
  --enable-cocoa-pods-output/--disable-cocoa-pods-output
                          Targeting CocoaPods SDKs for output (only old format without .xcfilelist). (default: --enable-cocoa-pods-output)
  --enable-vendor-output/--disable-vendor-output
                          Targeting vendor project for output. (default: --disable-vendor-output)
  --dry-run               Output to console without file output
  --version               Show the version.
  -h, --help              Show help information.

Examples

swift run -c release xcgraphgen ./Samples/SampleiOSApp/SampleiOSApp.xcodeproj/
%%{init: {'theme':'dark'}}%%
flowchart TD
style SampleiOSApp stroke-width:4px
subgraph Swift Package
Algorithms["Algorithms"]
end
subgraph Swift Package Local
Utility["Utility"]
end
subgraph Carthage
APIKit.xcframework["APIKit.xcframework"]
end
subgraph Native Target
APIClient["APIClient"]
AppFeature["AppFeature"]
FeatureA["FeatureA"]
FeatureB["FeatureB"]
SampleiOSApp["SampleiOSApp"]
SampleiOSAppTests["SampleiOSAppTests"]
SampleiOSAppUITests["SampleiOSAppUITests"]
end
FeatureB --> APIClient
FeatureB --> Algorithms
AppFeature --> FeatureA
AppFeature --> FeatureB
SampleiOSAppTests --> SampleiOSApp
SampleiOSAppUITests --> SampleiOSApp
FeatureA --> APIClient
SampleiOSApp --> AppFeature
APIClient --> Utility
APIClient --> APIKit.xcframework
Loading

Other libraries

The Swift and iOS communities have other tools for Xcode that have different priorities and tradeoffs than XcodeTargetGraphGen.

xcodetargetgraphgen's People

Contributors

irgaly avatar yimajo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

xcodetargetgraphgen's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.