> ## 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.

# findOne()

> Find an existing repository by its ID.

<CodeGroup>
  ```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)
  }
  ```
</CodeGroup>

## Options

<ParamField path="id" type="string" required>
  The repository ID to search for.
</ParamField>

## 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.
