Skip to content

Usage Guide

This guide explains how to use the cca command-line interface to analyze source code.


๐Ÿ”ง Basic Command

cca <source> [options]

Examples

Analyze a local directory:

cca ./my_project

Analyze a GitHub repository:

cca https://github.com/pallets/flask

โš™๏ธ CLI Options

Option Description
<source> Path to a local directory or a GitHub repo URL
--lang Comma-separated list of languages to analyze (e.g., python,js)
--depth Hierarchy depth for formatted output
--max-files Maximum number of files to process
--ignore-tests Skip test files like test_*.py or *.spec.js
--branch Git branch to use (only applies when source is a GitHub repository)
--copy Copy the formatted output to clipboard
--help Show help message

๐Ÿง  Language Support

Currently supported languages:

  • Python (.py)
  • JavaScript (.js)

๐Ÿงช Tips

  • Combine --ignore-tests true and --ignore <some, files, to, ignore> customize the ignoring.
  • Use --no-coopy to not automatically copy the response from analyzer

๐Ÿ“ Output Example

project/
โ”œโ”€โ”€ module_a/
โ”‚   โ”œโ”€โ”€ file1.py (2 classes, 3 functions)
โ”‚   โ””โ”€โ”€ file2.py (1 function)
โ””โ”€โ”€ module_b/
    โ””โ”€โ”€ file3.js (1 class, 2 exported functions)

For more details on internals, see Architecture.