Skip to main content
View Source on Github

Attributes

classes

console

current_commit

default_branch

directories

external_modules

functions

global_vars

imports

interfaces

language

name

repo_path

symbols

types

viz

Methods

ai

Generates a response from the AI based on the provided prompt, target, and context.
View Source on Github

Parameters

checkout

Checks out a git branch or commit and syncs the codebase graph to the new state.
View Source on Github

Parameters

commit

Commits all staged changes to the codebase graph and synchronizes the graph with the filesystem if specified.
View Source on Github

Parameters

create_directory

Creates a directory at the specified path.
View Source on Github

Parameters

create_file

Creates a new file in the codebase with specified content.
View Source on Github

Parameters

files

A list property that returns all files in the codebase.
View Source on Github

find_by_span

Finds editable objects that overlap with the given source code span.
View Source on Github

Parameters

from_repo

Fetches a codebase from GitHub and returns a Codebase instance.
View Source on Github

Parameters

get_class

Returns a class that matches the given name.
View Source on Github

Parameters

get_directory

Returns Directory by dir_path, or full path to the directory from codebase root.
View Source on Github

Parameters

get_file

Retrieves a file from the codebase by its filepath.
View Source on Github

Parameters

get_function

Retrieves a function from the codebase by its name.
View Source on Github

Parameters

get_relative_path

Calculates a relative path from one file to another, removing the extension from the target file.
View Source on Github

Parameters

get_symbol

Returns a Symbol by name from the codebase.
View Source on Github

Parameters

get_symbols

Retrieves all symbols in the codebase that match the given symbol name.
View Source on Github

Parameters

git_commit

Commits all staged changes to the codebase and git.
View Source on Github

Parameters

has_directory

Returns a boolean indicating if a directory exists in the codebase.
View Source on Github

Parameters

has_file

Determines if a file exists in the codebase.
View Source on Github

Parameters

has_symbol

Returns whether a symbol exists in the codebase.
View Source on Github

Parameters

reset

Resets the codebase by
View Source on Github

set_ai_key

Sets the OpenAI key for the current Codebase instance.
View Source on Github

set_session_options

Sets the Session options for the current codebase.
View Source on Github

should_fix

Returns True if the flag should be fixed based on the current mode and active group.
View Source on Github

Parameters

visualize

Visualizes a NetworkX graph or Plotly figure.
View Source on Github

Parameters