> ## Documentation Index
> Fetch the complete documentation index at: https://code.storage/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# store.findOne()

> Find an existing repository by its ID.

> [!WARNING]
>
> This page documents the earlier Code Storage SDKs: `@pierre/storage`, `pierre-storage`, and
> `code-storage-go`. New code uses the [Pierre SDK](https://code.storage/docs/sdks.md). To move code to the new SDK, use the
> [`pierre-migrate`
> skill](https://github.com/pierrecomputer/skills/tree/main/skills/pierre-migrate).

```typescript TypeScript theme={null} theme={"theme":{"light":"github-light","dark":"min-dark"}}
const repo = await store.findOne({ id: 'team/project-alpha' });
if (repo) {
  console.log(`Found repository: ${repo.id}`);
}
```

```python Python theme={null} theme={"theme":{"light":"github-light","dark":"min-dark"}}
repo = await storage.find_one(id="team/project-alpha")
if repo:
    # Generate a scoped Git URL and print it
    url = await repo.get_remote_url()
    print(f"Repository URL: {url}")
```

```go Go theme={null} theme={"theme":{"light":"github-light","dark":"min-dark"}}
// Find a repository by ID
repo, err := client.FindOne(context.Background(), storage.FindOneOptions{ID: "team/project-alpha"})
if repo != nil {
	// Default: read/write access, 1-year TTL
url, err := repo.RemoteURL(context.Background(), storage.RemoteURLOptions{})
	fmt.Printf("Repository URL: %s", url)
}
```

## Options

**id** `string` *required*

The repository ID to search for.

## Returns

Returns a `Repository` instance if found, or `null`/`None` if the repository doesn't exist. In Go,
`FindOne` returns `(*Repo, error)` and uses `nil` for not found.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.