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.2.0.tar.gz (10.8 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.2.0-py3-none-any.whl (9.4 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for codetre-0.2.0.tar.gz
Algorithm Hash digest
SHA256 28691d710f84f68c0867e94cc07cf7ebbf340936e6f851df4df645ac0e306106
MD5 267a588a42f3890c453052b2b2dd2385
BLAKE2b-256 1e487301279031aeb96733cf00c3b78fa964780d85e49ee234d39581fff0e5e5

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for codetre-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 41fcdf764052141cc3f7a6a41d06cb7106b7eb2c405a07f2ade7627974743a3e
MD5 da863966410b4c9c2e9dcb5070dc7e2c
BLAKE2b-256 83765636b33ed8c2c3a57f3ce0074ab5b4cd1f7edd3c5e162cb62af61df9c806

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