Skip to main content

AST-based code structure outline tool — generate hierarchical symbol maps with call relationships

Project description

codetre

AST-based code structure tree tool.

Extracts classes, functions, methods and their call relationships into a clean hierarchical view. Uses ast-grep for AST-level accuracy across multiple languages.

Requirements

  • Python ≥ 3.10
  • ast-grep (sg) installed and on PATH

Installation

pip install codetre

Usage

# Scan current directory
codetre

# Scan specific directory
codetre src/

# Scan single file
codetre src/main.py

Supported Languages

Python, JavaScript, TypeScript, Go, C, C++, Java, Rust, Ruby, Kotlin, Scala, C#, PHP, Swift, Lua, Bash, and more.

Output Example

file: src/services/auth.py
  class AuthService:9~40
    func login:14~20  -> call[_generate_token, _verify_password]
    func validate_token:22~30
    func logout:32~34

file: src/main.py
  class App:8~39
    func register_user:15~19
    func place_order:21~30  -> call[validate_token, create_order, approve_order]

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

codetre-0.1.0.tar.gz (9.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

codetre-0.1.0-py3-none-any.whl (8.6 kB view details)

Uploaded Python 3

File details

Details for the file codetre-0.1.0.tar.gz.

File metadata

  • Download URL: codetre-0.1.0.tar.gz
  • Upload date:
  • Size: 9.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for codetre-0.1.0.tar.gz
Algorithm Hash digest
SHA256 76a38c7b2ddc22a182c1497e775e2a0c769b13e4f51827d3134717d053323972
MD5 b00c682d39a84b1d8c0a104f9f03dc6a
BLAKE2b-256 2e8ae1d0ba7d0d95fd771875406c2d18c826ddc24d5ff21099ffa374d912d99a

See more details on using hashes here.

File details

Details for the file codetre-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: codetre-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 8.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for codetre-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 de7fe7edcd8164a7b679f014c05cc9ed3e3131d7171a463e3db3c2d8a204ba7f
MD5 c23fcfddd1db2ab1a03a3f1c594b557b
BLAKE2b-256 2e634cb3ee49c2fdc10753ed87729654539c1b4aa530c8edfa720f91d1051248

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page