- TypeScript 48.6%
- JavaScript 35.6%
- CSS 14.3%
- Shell 0.9%
- Nix 0.6%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
main on our fork now fast-forwards to surface after each push, so the fork's front page shows the latest work. AGENTS.md says so in the branch rules and the finishing steps. |
||
| .forgejo/workflows | ||
| scripts | ||
| surface | ||
| .editorconfig | ||
| .gitattributes | ||
| .gitignore | ||
| AGENTS.md | ||
| CLAUDE.md | ||
| flake.lock | ||
| flake.nix | ||
| README.md | ||
| secretspec.toml | ||
slc
ScottyLabs Code (SLC) is an agentic coding agent, built by the ScottyLabs AI (slai) team.
The repository holds no application code yet. It sets up the development environment, the secrets in OpenBao, and access to the ScottyLabs AI gateway (LiteLLM), which SLC will call for its models.
Repository layout
.
├── .forgejo/workflows/ci.yml # CI, reusing kennel's shared checks
├── scripts/ping-litellm.sh # Checks the AI gateway and this repository's key
├── flake.nix # Nix dev shell, through kennel's flake module
└── secretspec.toml # Secret declarations, resolved from OpenBao
Before you start
- Join
slaithrough governance. Team membership grants read access to this repository's secrets in OpenBao. - Install Git and either Nix (recommended) or the tools listed under Without Nix.
Setting up OpenBao
ScottyLabs keeps secrets in OpenBao at https://secrets.scottylabs.org. Governance writes this repository's secrets to secret/secretspec/slc/<profile>/<NAME>, and secretspec reads them from there through the provider declared in secretspec.toml.
With Nix (recommended)
Install Lix by following kennel's local development guide. Then clone the repository and enter the dev shell:
git clone ssh://forgejo@git.cmu.dev/ScottyLabs/slc.git
cd slc
nix develop
The dev shell provides bao and secretspec, sets BAO_ADDR=https://secrets.scottylabs.org, and selects the dev profile. Log in to OpenBao with your Andrew ID:
bao login -method=oidc
A browser window opens for single sign-on. The token is saved to ~/.vault-token and lasts several months, so you only need to log in again when it expires. Kennel's secrets guide covers the details.
Without Nix
Install OpenBao (brew install openbao on macOS) and secretspec (curl -sSL https://install.secretspec.dev | sh), then log in:
export BAO_ADDR=https://secrets.scottylabs.org
bao login -method=oidc
Outside the dev shell, pass the profile and the provider on every command, as in secretspec run -p openbao -P dev -- <command>. Passing the provider keeps a global secretspec configuration, such as provider = "keyring" in ~/.config/secretspec/config.toml, from overriding OpenBao.
Checking access
Confirm that both secrets resolve:
secretspec check
A working setup reports 2 found, 0 missing. If LITELLM_API_KEY is missing, confirm that bao token lookup succeeds and that your Andrew ID is listed in data/teams/slai.yaml in governance.
Secrets
secretspec.toml declares the following, which governance's ai_gateway feature writes to OpenBao on every profile:
| Variable | Description |
|---|---|
LITELLM_API_KEY |
LiteLLM virtual key for this repository. The prod profile has its own key, and staging, preview, and dev share a key with a lower monthly budget |
LITELLM_BASE_URL |
Gateway URL, https://litellm.scottylabs.org |
Never commit either value, and don't copy them into .env files that leave your machine. Run commands through secretspec run so the values only exist in that process's environment.
Using the LiteLLM gateway
The gateway at LITELLM_BASE_URL accepts both the OpenAI and the Anthropic API formats. It meters spend against this repository's key, under the slai team.
Ping it
scripts/ping-litellm.sh checks the gateway's health, lists the models this key can use, and sends a short test message:
secretspec run -- ./scripts/ping-litellm.sh
Gateway: https://litellm.scottylabs.org
Health: "I'm alive!"
Models available to this key:
claude-fable-5-2
claude-opus-5-5
claude-sonnet-5-5
claude-haiku-5-5
...
Sending a test message to claude-haiku-5-5...
pong
Pass a model name as the first argument to test a different model, as in ./scripts/ping-litellm.sh claude-sonnet-5-5.
With curl
The health check needs no key:
curl https://litellm.scottylabs.org/health/liveliness
Every other route needs the key. Wrap these commands in secretspec run -- bash -c '...', or run them in a shell started with secretspec run -- $SHELL.
# List models
curl "$LITELLM_BASE_URL/v1/models" \
-H "Authorization: Bearer $LITELLM_API_KEY"
# OpenAI format
curl "$LITELLM_BASE_URL/v1/chat/completions" \
-H "Authorization: Bearer $LITELLM_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model": "claude-haiku-5-5", "messages": [{"role": "user", "content": "Hello"}]}'
# Anthropic format
curl "$LITELLM_BASE_URL/v1/messages" \
-H "x-api-key: $LITELLM_API_KEY" \
-H "anthropic-version: 2023-06-01" \
-H "Content-Type: application/json" \
-d '{"model": "claude-haiku-5-5", "max_tokens": 256, "messages": [{"role": "user", "content": "Hello"}]}'
With an SDK
Point any OpenAI- or Anthropic-compatible client at the gateway. The OpenAI SDK needs /v1 on the base URL, and the Anthropic SDK adds it on its own.
import os
from anthropic import Anthropic
from openai import OpenAI
anthropic = Anthropic(
base_url=os.environ["LITELLM_BASE_URL"],
api_key=os.environ["LITELLM_API_KEY"],
)
openai = OpenAI(
base_url=os.environ["LITELLM_BASE_URL"] + "/v1",
api_key=os.environ["LITELLM_API_KEY"],
)
Contributing
CI runs kennel's shared checks on every push and pull request. Run the same hooks locally before pushing:
nix develop --command prek run --all-files
Commits follow Conventional Commits.
Related repositories
- governance: team membership and the
ai_gatewayfeature that provisions this repository's keys. - kennel: the dev shell module, the shared CI, and deployments.
- slai-rfcs: design documents for
slaiprojects, including SLC.