Skip to main content

CodeTide is a fully local, privacy-preserving tool for parsing and understanding Python codebases using symbolic, structural analysis. No internet, no LLMs, no embeddings - just fast, explainable, and deterministic code intelligence.

Project description

code-tide-logo CodeTide

GitHub Stars PyPI Downloads PyPI - Python Version PyPI - Version Pydantic v2

CodeTide is a fully local, privacy-preserving tool for parsing and understanding Python codebases using symbolic, structural analysis. No internet, no LLMs, no embeddings - just fast, explainable, and deterministic code intelligence.


โœ… Key Features

  • โœ… 100% local & private - all parsing and querying happens on your machine.
  • ๐Ÿ“ฆ Structured parsing of codebases using Tree-sitter.
  • ๐Ÿง  Retrieval of relevant code snippets by symbolic ID - not vector similarity.
  • ๐Ÿงฑ Visualize the architecture and hierarchy of your project.
  • โšก Fast, cacheable parsing with smart update detection.
  • ๐Ÿ” Designed to work alongside tools like Copilot, GPT, and Claude - on your terms.

๐Ÿ”Œ VSCode Extension

CodeTide is available as a native Visual Studio Code extension, giving you direct access to structural code understanding inside your editor.

  • Navigate code intelligently
  • Retrieve context-aware snippets
  • Send context directly to LLMs like Copilot or GPT
  • Works seamlessly with any other extensions

๐Ÿ”— Install it now: CodeTide on VSCode Marketplace
๐Ÿ”ง Extension source code: CodeTide VSCode Extension on GitHub


๐Ÿ–ง CodeTide as an MCP Server

CodeTide now supports acting as an MCP Server, enabling seamless integration with AI agents and tools. This feature allows agents to dynamically interact with your codebase and retrieve context efficiently.

To enable CodeTide as an MCP server in your environment, add the following entry to your servers configuration file:

{
  "mcpServers": {
    "codetide": {
      "command": "uvx",
      "args": [
        "--from",
        "codetide",
        "codetide-mcp-server"
      ],
      "env": {
        "CODETIDE_WORKSPACE": "./"
      }
    }
  }
}

Why This Helps Agents

Agents working with codebases often need:

  • Contextual Understanding: Retrieve declarations, imports, and references for any part of the code.
  • Tool Integration: Use built-in tools to navigate and analyze code.

Available Tools

CodeTide provides the following tools for agents:

  1. getContext: Retrieve code context for identifiers (e.g., functions, classes).
  2. getRepoTree: Explore the repository structure.

Example: Initializing an LLM with CodeTide

Hereโ€™s a snippet from agent_tide.py demonstrating how to initialize an LLM with CodeTide as an MCP server:

from aicore.llm import Llm, LlmConfig
from codetide.mcp import codeTideMCPServer
import os

def init_llm() -> Llm:
    llm = Llm.from_config(
        LlmConfig(
            model="deepseek-chat",
            provider="deepseek",
            temperature=0,
            api_key=os.getenv("DEEPSEEK-API-KEY")
        )
    )
    llm.provider.mcp.add_server(name=codeTideMCPServer.name, parameters=codeTideMCPServer)
    return llm

This setup allows the LLM to leverage CodeTideโ€™s tools for codebase interactions.

CodeTide can now be used as an MCP Server! This allows seamless integration with AI tools and workflows. Below are the tools available: The available tools are:

  • getContext: Retrieve code context for identifiers.
  • getRepoTree: Generate a visual tree representation of the repository.

โš™๏ธ Installation

๐Ÿ“ฆ From PyPI

pip install codetide --upgrade

๐Ÿ› ๏ธ From Source

git clone https://github.com/BrunoV21/CodeTide.git
cd CodeTide
pip install -e .

๐Ÿš€ Example: Running CodeTide on Itself

Here's how to parse the CodeTide repository and extract a snippet from the Python parser:

from codetide import CodeTide
from codetide.core.common import writeFile
from dotenv import load_dotenv
import asyncio
import time
import os

async def main():
    st = time.time()
    tide = await CodeTide.from_path(os.getenv("CODETIDE_REPO_PATH"))
    tide.serialize(include_cached_ids=True)
    output = tide.get(["codetide.parsers.python_parser.PythonParser"], degree=1, as_string=True)

    writeFile(output, "./storage/context.txt")
    print(f"took {time.time()-st:.2f}s")

if __name__ == "__main__":
    load_dotenv()
    asyncio.run(main())

This example:

  • Parses the codebase using Tree-sitter
  • Serializes the result for fast reuse
  • Retrieves a specific class with full local context

Here's how to deserialize a CodeTide repository and reuse it:

from codetide import CodeTide
from codetide.core.common import writeFile
from dotenv import load_dotenv
import asyncio
import time
import os

async def main():
    st = time.time()
    tide = CodeTide.deserialize(rootpath=os.getenv("CODETIDE_REPO_PATH"))
    tide.codebase._build_cached_elements()
    await tide.check_for_updates(include_cached_ids=True)
    output = tide.get(["codetide.parsers.python_parser.PythonParser"], degree=2, as_string=True)

    writeFile(output, "./storage/context.txt")
    print(f"took {time.time()-st:.2f}s")

if __name__ == "__main__":
    load_dotenv()
    asyncio.run(main())

This example:

  • Deserializes the previously serialized CodeTide
  • Checks for updates to the codebase
  • Retrieves a specific class with full local context (up to second degree connections)

Here's how to levarage CodeTide's tree view functionalites to get a broad picture of your project:

from codetide import CodeTide
from dotenv import load_dotenv
import time
import os

def main():
    st = time.time()
    tide = CodeTide.deserialize(rootpath=os.getenv("CODETIDE_REPO_PATH"))

    modules_tree_view = tide.codebase.get_tree_view(include_modules=True)
    print(modules_tree_view)
    
    print(f"took {time.time()-st:.2f}s")

if __name__ == "__main__":
    load_dotenv()
    asyncio.run(main())
Output:
โ”œโ”€โ”€ codetide
โ”‚   โ”œโ”€โ”€ core
โ”‚   โ”‚   โ”œโ”€โ”€ common.py
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ CONTEXT_INTRUCTION
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ TARGET_INSTRUCTION
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ readFile
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ wrap_content
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ wrap_package_dependencies   
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ writeFile
โ”‚   โ”‚   โ”œโ”€โ”€ defaults.py
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ DEFAULT_BATCH_SIZE
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ DEFAULT_CACHED_ELEMENTS_FILE
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ DEFAULT_CACHED_IDS_FILE     
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ DEFAULT_ENCODING
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ DEFAULT_MAX_CONCURRENT_TASKS
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ DEFAULT_SERIALIZATION_PATH
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ INSTALLATION_DIR
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ LANGUAGE_EXTENSIONS
โ”‚   โ”‚   โ”œโ”€โ”€ html.py
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ render_html_view
โ”‚   โ”‚   โ”œโ”€โ”€ mermaid.py
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ _render_class_contents
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ _render_file_contents
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ _render_mermaid_node
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ _safe_mermaid_id
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ save_mermaid_to_html_file
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ to_mermaid_boxy_flowchart
โ”‚   โ”‚   โ””โ”€โ”€ models.py
โ”‚   โ”‚       โ”œโ”€โ”€ BaseCodeElement
โ”‚   โ”‚       โ”‚   โ”œโ”€โ”€ file_path
โ”‚   โ”‚       โ”‚   โ”œโ”€โ”€ raw
โ”‚   โ”‚       โ”‚   โ”œโ”€โ”€ stored_unique_id
โ”‚   โ”‚       โ”‚   โ”œโ”€โ”€ apply_second_line_indent_to_first
โ”‚   โ”‚       โ”‚   โ”œโ”€โ”€ file_path_without_suffix
โ”‚   โ”‚       โ”‚   โ”œโ”€โ”€ unique_id
โ”‚   โ”‚       โ”‚   โ””โ”€โ”€ unique_id
โ”‚   โ”‚       โ”œโ”€โ”€ ClassAttribute
โ”‚   โ”‚       โ”‚   โ”œโ”€โ”€ class_id
โ”‚   โ”‚       โ”‚   โ””โ”€โ”€ visibility
โ”‚   โ”‚       โ”œโ”€โ”€ ClassDefinition
โ”‚   โ”‚       โ”‚   โ”œโ”€โ”€ attributes
โ”‚   โ”‚       โ”‚   โ”œโ”€โ”€ bases
โ”‚   โ”‚       โ”‚   โ”œโ”€โ”€ bases_references
โ”‚   โ”‚       โ”‚   โ”œโ”€โ”€ methods
โ”‚   โ”‚       โ”‚   โ”œโ”€โ”€ name
โ”‚   โ”‚       โ”‚   โ”œโ”€โ”€ add_attribute
โ”‚   โ”‚       โ”‚   โ”œโ”€โ”€ add_method
โ”‚   โ”‚       โ”‚   โ”œโ”€โ”€ all_methods_ids
โ”‚   โ”‚       โ”‚   โ””โ”€โ”€ references
โ”‚   โ”‚       โ”œโ”€โ”€ CodeBase
โ”‚   โ”‚       โ”‚   โ”œโ”€โ”€ _cached_elements
โ”‚   โ”‚       โ”‚   โ”œโ”€โ”€ root
โ”‚   โ”‚       โ”‚   โ”œโ”€โ”€ _build_cached_elements
โ”‚   โ”‚       โ”‚   โ”œโ”€โ”€ _build_tree_dict
โ”‚   โ”‚       โ”‚   โ”œโ”€โ”€ _list_all_unique_ids_for_property
โ”‚   โ”‚       โ”‚   โ”œโ”€โ”€ _render_class_contents
โ”‚   โ”‚       โ”‚   โ”œโ”€โ”€ _render_file_contents
โ”‚   โ”‚       โ”‚   โ”œโ”€โ”€ _render_tree_node
โ”‚   โ”‚       โ”‚   โ”œโ”€โ”€ all_classes
โ”‚   โ”‚       โ”‚   โ”œโ”€โ”€ all_functions
โ”‚   โ”‚       โ”‚   โ”œโ”€โ”€ all_imports
โ”‚   โ”‚       โ”‚   โ”œโ”€โ”€ all_variables
โ”‚   โ”‚       โ”‚   โ”œโ”€โ”€ deserialize_cache_elements
โ”‚   โ”‚       โ”‚   โ”œโ”€โ”€ get
โ”‚   โ”‚       โ”‚   โ”œโ”€โ”€ get_import
โ”‚   โ”‚       โ”‚   โ”œโ”€โ”€ get_tree_view
โ”‚   โ”‚       โ”‚   โ”œโ”€โ”€ serialize_cache_elements
โ”‚   โ”‚       โ”‚   โ””โ”€โ”€ unique_ids
โ”‚   โ”‚       โ”œโ”€โ”€ CodeContextStructure
โ”‚   โ”‚       โ”‚   โ”œโ”€โ”€ _cached_elements
โ”‚   โ”‚       โ”‚   โ”œโ”€โ”€ _unique_class_elements_ids
โ”‚   โ”‚       โ”‚   โ”œโ”€โ”€ class_attributes
โ”‚   โ”‚       โ”‚   โ”œโ”€โ”€ class_methods
โ”‚   โ”‚       โ”‚   โ”œโ”€โ”€ classes
โ”‚   โ”‚       โ”‚   โ”œโ”€โ”€ functions
โ”‚   โ”‚       โ”‚   โ”œโ”€โ”€ imports
โ”‚   โ”‚       โ”‚   โ”œโ”€โ”€ preloaded
โ”‚   โ”‚       โ”‚   โ”œโ”€โ”€ requested_elements
โ”‚   โ”‚       โ”‚   โ”œโ”€โ”€ variables
โ”‚   โ”‚       โ”‚   โ”œโ”€โ”€ add_class
โ”‚   โ”‚       โ”‚   โ”œโ”€โ”€ add_class_attribute
โ”‚   โ”‚       โ”‚   โ”œโ”€โ”€ add_class_method
โ”‚   โ”‚       โ”‚   โ”œโ”€โ”€ add_function
โ”‚   โ”‚       โ”‚   โ”œโ”€โ”€ add_import
โ”‚   โ”‚       โ”‚   โ”œโ”€โ”€ add_preloaded
โ”‚   โ”‚       โ”‚   โ”œโ”€โ”€ add_variable
โ”‚   โ”‚       โ”‚   โ”œโ”€โ”€ as_list_str
โ”‚   โ”‚       โ”‚   โ””โ”€โ”€ from_list_of_elements
โ”‚   โ”‚       โ”œโ”€โ”€ CodeFileModel
โ”‚   โ”‚       โ”‚   โ”œโ”€โ”€ classes
โ”‚   โ”‚       โ”‚   โ”œโ”€โ”€ file_path
โ”‚   โ”‚       โ”‚   โ”œโ”€โ”€ functions
โ”‚   โ”‚       โ”‚   โ”œโ”€โ”€ imports
โ”‚   โ”‚       โ”‚   โ”œโ”€โ”€ raw
โ”‚   โ”‚       โ”‚   โ”œโ”€โ”€ variables
โ”‚   โ”‚       โ”‚   โ”œโ”€โ”€ _list_all
โ”‚   โ”‚       โ”‚   โ”œโ”€โ”€ add_class
โ”‚   โ”‚       โ”‚   โ”œโ”€โ”€ add_function
โ”‚   โ”‚       โ”‚   โ”œโ”€โ”€ add_import
โ”‚   โ”‚       โ”‚   โ”œโ”€โ”€ add_variable
โ”‚   โ”‚       โ”‚   โ”œโ”€โ”€ all_classes
โ”‚   โ”‚       โ”‚   โ”œโ”€โ”€ all_functions
โ”‚   โ”‚       โ”‚   โ”œโ”€โ”€ all_imports
โ”‚   โ”‚       โ”‚   โ”œโ”€โ”€ all_variables
โ”‚   โ”‚       โ”‚   โ”œโ”€โ”€ get
โ”‚   โ”‚       โ”‚   โ”œโ”€โ”€ get_import
โ”‚   โ”‚       โ”‚   โ””โ”€โ”€ list_raw_contents
โ”‚   โ”‚       โ”œโ”€โ”€ CodeReference
โ”‚   โ”‚       โ”‚   โ”œโ”€โ”€ name
โ”‚   โ”‚       โ”‚   โ””โ”€โ”€ unique_id
โ”‚   โ”‚       โ”œโ”€โ”€ FunctionDefinition
โ”‚   โ”‚       โ”‚   โ”œโ”€โ”€ decorators
โ”‚   โ”‚       โ”‚   โ”œโ”€โ”€ modifiers
โ”‚   โ”‚       โ”‚   โ”œโ”€โ”€ name
โ”‚   โ”‚       โ”‚   โ”œโ”€โ”€ references
โ”‚   โ”‚       โ”‚   โ””โ”€โ”€ signature
โ”‚   โ”‚       โ”œโ”€โ”€ FunctionSignature
โ”‚   โ”‚       โ”‚   โ”œโ”€โ”€ parameters
โ”‚   โ”‚       โ”‚   โ””โ”€โ”€ return_type
โ”‚   โ”‚       โ”œโ”€โ”€ ImportStatement
โ”‚   โ”‚       โ”‚   โ”œโ”€โ”€ alias
โ”‚   โ”‚       โ”‚   โ”œโ”€โ”€ definition_id
โ”‚   โ”‚       โ”‚   โ”œโ”€โ”€ import_type
โ”‚   โ”‚       โ”‚   โ”œโ”€โ”€ name
โ”‚   โ”‚       โ”‚   โ”œโ”€โ”€ raw
โ”‚   โ”‚       โ”‚   โ”œโ”€โ”€ source
โ”‚   โ”‚       โ”‚   โ””โ”€โ”€ as_dependency
โ”‚   โ”‚       โ”œโ”€โ”€ MethodDefinition
โ”‚   โ”‚       โ”‚   โ””โ”€โ”€ class_id
โ”‚   โ”‚       โ”œโ”€โ”€ Parameter
โ”‚   โ”‚       โ”‚   โ”œโ”€โ”€ default_value
โ”‚   โ”‚       โ”‚   โ”œโ”€โ”€ name
โ”‚   โ”‚       โ”‚   โ”œโ”€โ”€ type_hint
โ”‚   โ”‚       โ”‚   โ””โ”€โ”€ is_optional
โ”‚   โ”‚       โ”œโ”€โ”€ PartialClasses
โ”‚   โ”‚       โ”‚   โ”œโ”€โ”€ attributes
โ”‚   โ”‚       โ”‚   โ”œโ”€โ”€ class_header
โ”‚   โ”‚       โ”‚   โ”œโ”€โ”€ class_id
โ”‚   โ”‚       โ”‚   โ”œโ”€โ”€ filepath
โ”‚   โ”‚       โ”‚   โ”œโ”€โ”€ methods
โ”‚   โ”‚       โ”‚   โ””โ”€โ”€ raw
โ”‚   โ”‚       โ””โ”€โ”€ VariableDeclaration
โ”‚   โ”‚           โ”œโ”€โ”€ modifiers
โ”‚   โ”‚           โ”œโ”€โ”€ name
โ”‚   โ”‚           โ”œโ”€โ”€ raw
โ”‚   โ”‚           โ”œโ”€โ”€ references
โ”‚   โ”‚           โ”œโ”€โ”€ type_hint
โ”‚   โ”‚           โ””โ”€โ”€ value
โ”‚   โ”œโ”€โ”€ parsers
โ”‚   โ”‚   โ”œโ”€โ”€ base_parser.py
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ BaseParser
โ”‚   โ”‚   โ”‚       โ”œโ”€โ”€ extension
โ”‚   โ”‚   โ”‚       โ”œโ”€โ”€ import_statement_template
โ”‚   โ”‚   โ”‚       โ”œโ”€โ”€ language
โ”‚   โ”‚   โ”‚       โ”œโ”€โ”€ parse_file
โ”‚   โ”‚   โ”‚       โ”œโ”€โ”€ resolve_inter_files_dependencies
โ”‚   โ”‚   โ”‚       โ”œโ”€โ”€ resolve_intra_file_dependencies
โ”‚   โ”‚   โ”‚       โ””โ”€โ”€ tree_parser
โ”‚   โ”‚   โ”œโ”€โ”€ generic_parser.py
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ GenericParser
โ”‚   โ”‚   โ”‚       โ”œโ”€โ”€ _filepath
โ”‚   โ”‚   โ”‚       โ”œโ”€โ”€ extension
โ”‚   โ”‚   โ”‚       โ”œโ”€โ”€ import_statement_template
โ”‚   โ”‚   โ”‚       โ”œโ”€โ”€ language
โ”‚   โ”‚   โ”‚       โ”œโ”€โ”€ parse_code
โ”‚   โ”‚   โ”‚       โ”œโ”€โ”€ parse_file
โ”‚   โ”‚   โ”‚       โ”œโ”€โ”€ resolve_inter_files_dependencies
โ”‚   โ”‚   โ”‚       โ”œโ”€โ”€ resolve_intra_file_dependencies
โ”‚   โ”‚   โ”‚       โ””โ”€โ”€ tree_parser
โ”‚   โ”‚   โ””โ”€โ”€ python_parser.py
โ”‚   โ”‚       โ””โ”€โ”€ PythonParser
โ”‚   โ”‚           โ”œโ”€โ”€ _filepath
โ”‚   โ”‚           โ”œโ”€โ”€ _tree_parser
โ”‚   โ”‚           โ”œโ”€โ”€ _default_unique_import_id
โ”‚   โ”‚           โ”œโ”€โ”€ _find_elements_references
โ”‚   โ”‚           โ”œโ”€โ”€ _find_references
โ”‚   โ”‚           โ”œโ”€โ”€ _generate_unique_import_id
โ”‚   โ”‚           โ”œโ”€โ”€ _get_content
โ”‚   โ”‚           โ”œโ”€โ”€ _get_element_count
โ”‚   โ”‚           โ”œโ”€โ”€ _process_aliased_import
โ”‚   โ”‚           โ”œโ”€โ”€ _process_assignment
โ”‚   โ”‚           โ”œโ”€โ”€ _process_block
โ”‚   โ”‚           โ”œโ”€โ”€ _process_class_node
โ”‚   โ”‚           โ”œโ”€โ”€ _process_decorated_definition
โ”‚   โ”‚           โ”œโ”€โ”€ _process_expression_statement
โ”‚   โ”‚           โ”œโ”€โ”€ _process_function_definition
โ”‚   โ”‚           โ”œโ”€โ”€ _process_import_node
โ”‚   โ”‚           โ”œโ”€โ”€ _process_node
โ”‚   โ”‚           โ”œโ”€โ”€ _process_parameters
โ”‚   โ”‚           โ”œโ”€โ”€ _process_type_parameter
โ”‚   โ”‚           โ”œโ”€โ”€ _skip_init_paths
โ”‚   โ”‚           โ”œโ”€โ”€ count_occurences_in_code
โ”‚   โ”‚           โ”œโ”€โ”€ extension
โ”‚   โ”‚           โ”œโ”€โ”€ filepath
โ”‚   โ”‚           โ”œโ”€โ”€ filepath
โ”‚   โ”‚           โ”œโ”€โ”€ import_statement_template
โ”‚   โ”‚           โ”œโ”€โ”€ init_tree_parser
โ”‚   โ”‚           โ”œโ”€โ”€ language
โ”‚   โ”‚           โ”œโ”€โ”€ parse_code
โ”‚   โ”‚           โ”œโ”€โ”€ parse_file
โ”‚   โ”‚           โ”œโ”€โ”€ resolve_inter_files_dependencies
โ”‚   โ”‚           โ”œโ”€โ”€ resolve_intra_file_dependencies
โ”‚   โ”‚           โ”œโ”€โ”€ tree_parser
โ”‚   โ”‚           โ””โ”€โ”€ tree_parser
โ”‚   โ””โ”€โ”€ autocomplete.py
โ”‚       โ””โ”€โ”€ AutoComplete
โ”‚           โ”œโ”€โ”€ __init__
โ”‚           โ”œโ”€โ”€ get_fuzzy_suggestions
โ”‚           โ””โ”€โ”€ get_suggestions
โ”œโ”€โ”€ examples
โ”‚   โ”œโ”€โ”€ parse_codetide.py
โ”‚   โ”‚   โ””โ”€โ”€ main
โ”‚   โ””โ”€โ”€ parse_project.py
โ”‚       โ””โ”€โ”€ main
โ””โ”€โ”€ setup.py
    โ”œโ”€โ”€ here
    โ”œโ”€โ”€ long_description
    โ”œโ”€โ”€ requirements
    โ””โ”€โ”€ requirements_visualization

๐Ÿง  Philosophy

CodeTide is about giving developers structure-aware tools that are fast, predictable, and private. Your code is parsed, navigated, and queried as a symbolic graph - not treated as a black box of tokens. Whether youโ€™re building, refactoring, or feeding context into an LLM - you stay in control.

Like a tide, your codebase evolves - and CodeTide helps you move with it, intelligently.

โŒ What CodeTide Does Not Use

To be clear, CodeTide does not rely on:

  • โŒ Large Language Models (LLMs)
  • โŒ Embedding models or token similarity
  • โŒ Vector databases or search indexes
  • โŒ External APIs or cloud services

Instead, it uses:

  • โœ… Tree-sitter for lightweight, fast, and accurate parsing
  • โœ… Deterministic logic and symbolic references to navigate your codebase

๐Ÿ—บ๏ธ Roadmap

Hereโ€™s whatโ€™s next for CodeTide:

  • ๐Ÿงฉ Support more languages already integrated with Tree-sitter
    โ†’ TypeScript is the top priority. Now available in Beta

- ๐Ÿงญ Handle relative imports in Python projects
โ†’ Improve resolution for intra-package navigation.


๐Ÿค– Agents Module: AgentTide

CodeTide now includes an agents module, featuring AgentTideโ€”a precision-driven software engineering agent that connects directly to your codebase and executes your requests with full code context.

AgentTide leverages CodeTideโ€™s symbolic code understanding to:

  • Retrieve and reason about relevant code context for any request
  • Generate atomic, high-precision patches using strict protocols
  • Apply changes directly to your codebase, with robust validation

Where to Find It

What It Does

AgentTide acts as an autonomous agent that:

  • Connects to your codebase using CodeTideโ€™s parsing and context tools
  • Interacts with users via a conversational interface
  • Identifies relevant files, classes, and functions for any request
  • Generates and applies diff-style patches, ensuring code quality and requirements fidelity

Example Usage

To use AgentTide, ensure you have the aicore package installed (pip install codetide[agents]), then instantiate and run the agent:

from codetide import CodeTide
from codetide.agents.tide.agent import AgentTide
from aicore.llm import Llm, LlmConfig
import os, asyncio

async def main():
    tide = await CodeTide.from_path("/path/to/your/repo")
    llm = Llm.from_config(
        LlmConfig(
            model="deepseek-chat",
            provider="deepseek",
            temperature=0,
            api_key=os.getenv("DEEPSEEK-API-KEY")
        )
    )
    agent = AgentTide(llm=llm, tide=tide)
    await agent.run()

if __name__ == "__main__":
    asyncio.run(main())

AgentTide will prompt you for requests, retrieve the relevant code context, and generate precise patches to fulfill your requirements.

Disclaimer: AgentTide is designed for focused, context-aware code editing, not for generating entire applications from vague ideas. While CodeTide as a platform can support larger workflows, the current version of AgentTide is optimized for making precise, well-scoped changes. For best results, provide one clear request at a time. AgentTide does not yet have access to your terminal or the ability to execute commands, but support for test-based validation is planned in future updates.

For more details, see the agents module source code.


๐Ÿ“„ License

CodeTide is licensed under the Apache 2.0 License.


๐Ÿง‘โ€๐Ÿ’ป Contributing

Interested in contributing to CodeTide? We welcome contributions of all kinds - especially new language parsers!

If you'd like to add support for a new language (e.g., Rust, Java, Go), see our CONTRIBUTING.md guide. You'll implement your parser by extending our BaseParser interface and providing robust test coverage. Reference implementations are available for Python and TypeScript in the tests/parsers directory.

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

codetide-0.0.25.tar.gz (69.4 kB view details)

Uploaded Source

Built Distribution

codetide-0.0.25-py3-none-any.whl (71.1 kB view details)

Uploaded Python 3

File details

Details for the file codetide-0.0.25.tar.gz.

File metadata

  • Download URL: codetide-0.0.25.tar.gz
  • Upload date:
  • Size: 69.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for codetide-0.0.25.tar.gz
Algorithm Hash digest
SHA256 c45b3a2e9f7179ff8f23e9104b958123e0349894a904313314067a58e3da1047
MD5 aff1e955b8baa1f9e4eeb2082e740666
BLAKE2b-256 afa3302bde49f4cc42fcf1b92b1f1058b0b1547857ea760521295d4b7ec282ca

See more details on using hashes here.

Provenance

The following attestation bundles were made for codetide-0.0.25.tar.gz:

Publisher: python_package.yml on BrunoV21/CodeTide

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file codetide-0.0.25-py3-none-any.whl.

File metadata

  • Download URL: codetide-0.0.25-py3-none-any.whl
  • Upload date:
  • Size: 71.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for codetide-0.0.25-py3-none-any.whl
Algorithm Hash digest
SHA256 f14ec25c7e26d4c05ef93519f038422d5d88e9c1df41f2f9094f72490e3c0001
MD5 60018a679724489f09751e2d8606150d
BLAKE2b-256 1d1d4ffde048d62b66db628ec735f904efa0c9b498bcbdaa9482f5cb5718cde7

See more details on using hashes here.

Provenance

The following attestation bundles were made for codetide-0.0.25-py3-none-any.whl:

Publisher: python_package.yml on BrunoV21/CodeTide

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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