Skip to main content

Local-first, evidence-backed codebase intelligence CLI

Project description

Sherpa

Sherpa is a local-first codebase intelligence tool. It will turn source code into an evidence-backed graph of files, symbols, and relationships.

The project is under active development. Sherpa indexes C, C++, and Python files and uses tree-sitter to extract functions, methods, classes, structs, includes/imports, calls, source locations, and parser diagnostics into a local SQLite database. It records evidence-backed defines, calls, and includes relationships while preserving ambiguous and unresolved references.

Build

Prerequisites: a C++20 compiler, CMake 3.25+, Ninja, and vcpkg.

cmake --preset dev -DCMAKE_TOOLCHAIN_FILE="$VCPKG_ROOT/scripts/buildsystems/vcpkg.cmake"
cmake --build --preset dev
ctest --preset dev

Install

Milestone 16 prepares three release channels:

# Homebrew tap
brew install sre0089/tap/sherpa

# PyPI CLI distribution (recommended)
pipx install sherpa-code

The PyPI distribution is named sherpa-code because sherpa belongs to an unrelated project. It still installs the sherpa and sherpa-server commands. These commands become available after the first signed-off release is published and the external Homebrew tap and PyPI trusted publisher are configured. Native archives are attached directly to each GitHub release.

See Installation for platforms and verification.

Sherpa also installs a C++20 library and CMake package. Embedded consumers use <sherpa/api/client.hpp> and link Sherpa::Sherpa; see the public C++ API. Hosts can also register explicitly linked observers through the versioned plugin API.

Editor integrations can launch the installed sherpa-server JSON-RPC process. See editor integration and the initial VS Code extension.

Use

./build/dev/sherpa index /path/to/repository
cd /path/to/repository
sherpa query symbol qualified::symbol
sherpa query symbol overloaded --signature 'overloaded(int value)'
sherpa query file src/file.cpp
sherpa query callers qualified::symbol
sherpa query callees qualified::symbol
sherpa callers qualified::symbol
sherpa callees qualified::symbol
sherpa impact src/file.cpp
sherpa impact qualified::symbol
sherpa path caller::symbol callee::symbol
sherpa export graph.json

Queries use the current directory as the repository by default. sherpa query ... is the grouped read-only query surface; the top-level callers and callees commands remain as compatibility aliases. Use --repo <path> to query another repository, --database <path> to override the platform cache location, and --format json for machine-readable output. See Indexing for incremental refresh behavior, Querying the graph for lookup rules, and the Query JSON contract for automation. See Graph export for the versioned interchange format. Release process documents artifact creation and publisher setup.

Status

Sherpa currently discovers .c, .cc, .cpp, .cxx, .h, .hh, .hpp, .hxx, .inc, .py, and .pyi files. It performs syntax-based analysis only: overload resolution, type inference, dynamic dispatch, preprocessor expansion, and compiler/interpreter-accurate semantics are not implemented. Call and dependency resolution is intentionally conservative and every result carries status, confidence, and provenance.

License

Sherpa is available under the MIT License.

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

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

sherpa_code-0.1.2-py3-none-win_amd64.whl (3.4 MB view details)

Uploaded Python 3Windows x86-64

sherpa_code-0.1.2-py3-none-manylinux_2_35_x86_64.whl (3.6 MB view details)

Uploaded Python 3manylinux: glibc 2.35+ x86-64

sherpa_code-0.1.2-py3-none-macosx_15_0_x86_64.whl (3.2 MB view details)

Uploaded Python 3macOS 15.0+ x86-64

sherpa_code-0.1.2-py3-none-macosx_15_0_arm64.whl (3.1 MB view details)

Uploaded Python 3macOS 15.0+ ARM64

File details

Details for the file sherpa_code-0.1.2-py3-none-win_amd64.whl.

File metadata

  • Download URL: sherpa_code-0.1.2-py3-none-win_amd64.whl
  • Upload date:
  • Size: 3.4 MB
  • Tags: Python 3, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for sherpa_code-0.1.2-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 f7e72239484b375f490b79520f0c8ac91f0d11d19e4e0bb8702a5f23496d7254
MD5 c7bce2ab5f2620752f51b7fdee125332
BLAKE2b-256 c90cec49142d7d08891b84d627aff9fbc62fc450ac604e7756ed1bc56ad40675

See more details on using hashes here.

Provenance

The following attestation bundles were made for sherpa_code-0.1.2-py3-none-win_amd64.whl:

Publisher: publish-pypi.yml on sre0089/sherpa

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

File details

Details for the file sherpa_code-0.1.2-py3-none-manylinux_2_35_x86_64.whl.

File metadata

File hashes

Hashes for sherpa_code-0.1.2-py3-none-manylinux_2_35_x86_64.whl
Algorithm Hash digest
SHA256 54f3c792992d90b61b933dd89ee18659175ff827f84fd66d2f495586b8f56c1f
MD5 47dcc0babac9e2e014f5f5e0308dc760
BLAKE2b-256 c783f49e967a530979f6e8ac65fa4ba7607adebcfd6c0d50fdf912a03d08ec17

See more details on using hashes here.

Provenance

The following attestation bundles were made for sherpa_code-0.1.2-py3-none-manylinux_2_35_x86_64.whl:

Publisher: publish-pypi.yml on sre0089/sherpa

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

File details

Details for the file sherpa_code-0.1.2-py3-none-macosx_15_0_x86_64.whl.

File metadata

File hashes

Hashes for sherpa_code-0.1.2-py3-none-macosx_15_0_x86_64.whl
Algorithm Hash digest
SHA256 4253d325b268dda8911064171c85a3c8d5c9ae9b638a9374242a4557b9b709c8
MD5 12fa9460b85b6718b261af3dea1d5790
BLAKE2b-256 9d3aa0fabc9ef0ec0c85bd82b9513b13cea31c38b5a2fdb6e86e80a3e028907b

See more details on using hashes here.

Provenance

The following attestation bundles were made for sherpa_code-0.1.2-py3-none-macosx_15_0_x86_64.whl:

Publisher: publish-pypi.yml on sre0089/sherpa

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

File details

Details for the file sherpa_code-0.1.2-py3-none-macosx_15_0_arm64.whl.

File metadata

File hashes

Hashes for sherpa_code-0.1.2-py3-none-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 00bc85c59952e46b7517e006ba4112e1feceb4c13699fd191458aec311fc6780
MD5 1244ae5095c7fc5c29540eb60aa63ed0
BLAKE2b-256 9155f8ef81353569501b1bfe3ce07f8016c3de34af1503cf17e31c872040c4d2

See more details on using hashes here.

Provenance

The following attestation bundles were made for sherpa_code-0.1.2-py3-none-macosx_15_0_arm64.whl:

Publisher: publish-pypi.yml on sre0089/sherpa

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 Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page