Sherpa AI

Command-line tool

Sherpa CLI

Upload a codebase from your machine and ask about it, from the terminal.

One Python file, no dependencies (Python 3.9+). Uploads show up in your dashboard like any other project. The commands below are set up for http://13.205.197.5:8000.

Install

$ mkdir -p ~/.local/bin && curl -fsSL http://13.205.197.5:8000/cli/sherpa.py -o ~/.local/bin/sherpa && chmod +x ~/.local/bin/sherpa

If your shell then says sherpa: command not found, add ~/.local/bin to your PATH: export PATH="$HOME/.local/bin:$PATH" (put it in ~/.zshrc or ~/.bashrc).

$ sherpa --version

Sign in

$ sherpa login

We email you a 6-digit code; type it in. This works for every account, including ones created with Google. Password account? Add --password. The session is saved in ~/.config/sherpa/config.json (readable only by you) and lasts a day.

$ sherpa whoami
$ sherpa logout

Upload a project

$ cd path/to/your-project
$ sherpa upload

What happens:

  1. Packing. In a git checkout only files git tracks are sent, so .gitignore is respected. Dependencies and build output (node_modules/, .git/, dist/, build/, vendor/ …), lockfiles, binaries, files over 400 KB, .env files and private keys are always left out.
  2. Uploading the zipped files (100 MB limit).
  3. Review. You see the project type, file count, size, languages and entry points, and confirm with Y before anything is indexed.
  4. Indexing with a progress bar; it prints the repo id when ready.
OptionWhat it does
PATHFolder to upload. Default: the current folder.
--name NAMEProject name. Default: the folder's name.
-y, --yesSkip the confirmation (for scripts and CI).
--no-waitReturn as soon as indexing starts; check later with status.

Update a project

Upload again with the same name. Only changed files are re-indexed, so it's much faster than the first time.

$ sherpa upload --name my-project -y

Ask questions

$ sherpa repos
$ sherpa ask <repo_id> "How does signup work?"

Answers are printed as Markdown, followed by the exact file and line ranges they are based on.

Status & retry

$ sherpa status
$ sherpa retry <job_id>

A failed upload can be retried for 24 hours without uploading the files again.

Commands

CommandPurpose
sherpa login [--email E] [--password]Sign in and save the session
sherpa logout · whoamiForget the session · show the account and server
sherpa upload [PATH] [--name N] [-y] [--no-wait]Upload, review and index a folder
sherpa statusYour 20 most recent uploads
sherpa retry JOB_IDRetry a failed upload without re-uploading
sherpa reposYour projects and their ids
sherpa ask REPO_ID "QUESTION"A cited answer
sherpa COMMAND --helpHelp for one command

Use in CI

Keep the index in step with your code by uploading on every push. Set SHERPA_TOKEN (from a login, stored as a CI secret) instead of signing in. Tokens expire after a day by default.

# with SHERPA_TOKEN set from your CI secrets
$ curl -fsSL http://13.205.197.5:8000/cli/sherpa.py -o sherpa.py
$ python3 sherpa.py upload . --name my-project --yes

Limits

LimitValue
Upload size100 MB packed
Indexed per project50 MB of text, up to 1,500 files; single files up to 400 KB
At once1 upload indexing per account
Projects15 per account
Imports per day30 (uploads, re-uploads and retries each count)

Troubleshooting

MessageWhat to do
can't reach the Sherpa APICheck the server with sherpa whoami; reinstall from this page to reset it.
not signed in / session expiredRun sherpa login.
no account with this emailSign up in the web app first.
the packed project is … MBUpload a subfolder, or add generated files to .gitignore.
no source files to uploadEverything was filtered out; check you're in the right folder.
another upload is still indexingWait for it (sherpa status), then retry.
daily ingest limit / repo limit reachedTry again tomorrow (UTC), or delete a project in the dashboard.