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:
- Packing. In a git checkout only files git tracks are sent, so
.gitignoreis respected. Dependencies and build output (node_modules/,.git/,dist/,build/,vendor/…), lockfiles, binaries, files over 400 KB,.envfiles and private keys are always left out. - Uploading the zipped files (100 MB limit).
- Review. You see the project type, file count, size, languages and entry points, and confirm with
Ybefore anything is indexed. - Indexing with a progress bar; it prints the repo id when ready.
| Option | What it does |
|---|---|
| PATH | Folder to upload. Default: the current folder. |
| --name NAME | Project name. Default: the folder's name. |
| -y, --yes | Skip the confirmation (for scripts and CI). |
| --no-wait | Return 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
| Command | Purpose |
|---|---|
| sherpa login [--email E] [--password] | Sign in and save the session |
| sherpa logout · whoami | Forget the session · show the account and server |
| sherpa upload [PATH] [--name N] [-y] [--no-wait] | Upload, review and index a folder |
| sherpa status | Your 20 most recent uploads |
| sherpa retry JOB_ID | Retry a failed upload without re-uploading |
| sherpa repos | Your projects and their ids |
| sherpa ask REPO_ID "QUESTION" | A cited answer |
| sherpa COMMAND --help | Help 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
| Limit | Value |
|---|---|
| Upload size | 100 MB packed |
| Indexed per project | 50 MB of text, up to 1,500 files; single files up to 400 KB |
| At once | 1 upload indexing per account |
| Projects | 15 per account |
| Imports per day | 30 (uploads, re-uploads and retries each count) |
Troubleshooting
| Message | What to do |
|---|---|
| can't reach the Sherpa API | Check the server with sherpa whoami; reinstall from this page to reset it. |
| not signed in / session expired | Run sherpa login. |
| no account with this email | Sign up in the web app first. |
| the packed project is … MB | Upload a subfolder, or add generated files to .gitignore. |
| no source files to upload | Everything was filtered out; check you're in the right folder. |
| another upload is still indexing | Wait for it (sherpa status), then retry. |
| daily ingest limit / repo limit reached | Try again tomorrow (UTC), or delete a project in the dashboard. |
