---
title: "Add a package to your repo"
description: "Where a generated package goes in your repository, how to depend on it, and how to build it. For projects with a destination configured, the pull request already did this."
url: https://typeship.dev/docs/guides/add-to-your-repo
markdown: https://typeship.dev/docs/guides/add-to-your-repo.md
section: "Get started"
---
> ## Documentation index
> Fetch the complete documentation index at https://typeship.dev/llms.txt (every page, one line each) or the full text at https://typeship.dev/llms-full.txt.
> Append .md to any docs URL, or send Accept: text/markdown, for the markdown twin of that page.

# Add a package to your repo

Where a generated package goes in your repository, how to depend on it, and how to build it. For projects with a destination configured, the pull request already did this.

A generated package is a complete package for its ecosystem: readable source, zero runtime dependencies, and a build. This guide covers placing one by hand. When a project has a [destination](https://typeship.dev/docs/projects/#destinations) configured, typeship's pull request puts the package in place, one per language, and updates it on every spec change, so most of this page is only for downloaded zips.

**TypeScript**

### Where to put it

* In a monorepo with workspaces: `packages/acme`.
* In a single-package repository: `vendor/acme`.
* Any path works. The import name comes from `name` in the generated `package.json`, not from the directory.

### Depend on it

As a file dependency:

```bash
npm install ./vendor/acme
# or
pnpm add ./vendor/acme
# or
yarn add file:./vendor/acme
```

Or as a workspace member:

```json title="package.json"
{ "workspaces": ["packages/*"] }
```

```json title="apps/api/package.json"
{
  "dependencies": {
    "acme": "*"
  }
}
```

Installing also puts the package's bins on your PATH when those platforms were generated: `acme` for the CLI and `acme-mcp` for the MCP server.

### Build it

The package ships as TypeScript source and must be compiled before anything imports it. `main`, `types`, and `exports` point into `dist/`:

```bash
cd vendor/acme
npm install     # typescript and @types/node, dev only
npm run build   # tsc -> dist/
```

After the build, `dist/` holds the compiled JavaScript, `.d.ts` declarations, and declaration maps, so editors jump from your code into the package's source.

### ESM only

* The package declares `"type": "module"` and its `exports` map exposes an `import` entry only. `require()` is not supported.
* Node 18 or newer.
* Works with modern bundlers. It is tree-shakeable: one module per resource and `"sideEffects": false`, so bundlers drop the resources you never call.

**Python**

### Where to put it

Anywhere. The package directory is `acme/` next to its `pyproject.toml`. A `vendor/acme` directory in your repository is a fine home.

### Depend on it

```bash
pip install ./vendor/acme
# or, in a requirements file:
./vendor/acme
```

Or, once you [publish to PyPI](https://typeship.dev/docs/guides/publish), `pip install acme`.

### Nothing to build

`pyproject.toml` declares `dependencies = []` and `requires-python >= 3.11`. Import and go:

```python
from acme import AcmeClient
```

**Go**

### Where to put it

Go modules live in their own repository. `go get` resolves a module path to a repository root, which is why the recommended destination for a Go package is a dedicated repository such as `acme/acme-go`. Set that repository as the Go destination in project settings, and the module path follows.

### Depend on it

```bash
go get github.com/acme/acme-go
```

```go
import acme "github.com/acme/acme-go"
```

Until the module is pushed to its repository, `go.mod`'s `replace` directive points at a local directory:

```text title="go.mod"
replace github.com/acme/acme-go => ../acme-go
```

### Nothing to build

The module has no `require` block. `go build` compiles it with the standard library alone.

## Keep custom code outside the package

Regenerating replaces the entire package. Never put your own code inside it. Wrap the client in a module you own. See [Extend the client](https://typeship.dev/docs/guides/customize).

## Sitemap

[Every page of these docs](https://typeship.dev/llms.txt)
