1## Setting up the environment
 2
 3To set up the repository, run:
 4
 5```sh
 6$ ./scripts/bootstrap
 7$ ./scripts/lint
 8```
 9
10This will install all the required dependencies and build the SDK.
11
12You can also [install go 1.18+ manually](https://go.dev/doc/install).
13
14## Modifying/Adding code
15
16Most of the SDK is generated code. Modifications to code will be persisted between generations, but may
17result in merge conflicts between manual patches and changes from the generator. The generator will never
18modify the contents of the `lib/` and `examples/` directories.
19
20## Adding and running examples
21
22All files in the `examples/` directory are not modified by the generator and can be freely edited or added to.
23
24```go
25# add an example to examples/<your-example>/main.go
26
27package main
28
29func main() {
30  // ...
31}
32```
33
34```sh
35$ go run ./examples/<your-example>
36```
37
38## Using the repository from source
39
40To use a local version of this library from source in another project, edit the `go.mod` with a replace
41directive. This can be done through the CLI with the following:
42
43```sh
44$ go mod edit -replace github.com/anthropics/anthropic-sdk-go=/path/to/anthropic-sdk-go
45```
46
47## Running tests
48
49Most tests require you to [set up a mock server](https://github.com/stoplightio/prism) against the OpenAPI spec to run the tests.
50
51```sh
52# you will need npm installed
53$ npx prism mock path/to/your/openapi.yml
54```
55
56```sh
57$ ./scripts/test
58```
59
60## Formatting
61
62This library uses the standard gofmt code formatter:
63
64```sh
65$ ./scripts/format
66```