# What Repository Formats Does Instagit Support? A Complete Guide to GitHub, GitLab, and Beyond

> Explore Instagit's support for GitHub URLs, shorthand, GitLab, Bitbucket, and public Git/SSH links. Simplify your repository integrations today.

- Repository: [Instalabs AI/instagit](https://github.com/instalabsai/instagit)
- Tags: tutorial
- Published: 2026-02-19

---

**Instagit supports full GitHub URLs, shorthand references (owner/repo), GitLab and Bitbucket URLs, and any public Git URL including SSH clone links.**

Instagit, developed by instalabsAI/instagit, accepts diverse repository identifiers through its `ask_repo` tool, making it compatible with virtually any public Git hosting platform. Understanding these supported repository formats ensures seamless integration whether you're analyzing GitHub projects, GitLab repositories, or self-hosted Git instances.

## Full GitHub URLs

Instagit accepts complete HTTPS URLs pointing to GitHub repositories. This is the most explicit format, ensuring there is no ambiguity about the source platform or repository location.

```typescript
await instagit.ask_repo({
  repo: "https://github.com/vercel/next.js",
  prompt: "Explain the file-system routing mechanism."
});

```

## GitHub Shorthand Notation

For convenience, Instagit supports the compact `owner/repo` shorthand syntax. When provided in this format, Instagit automatically resolves the reference to the full GitHub URL.

```typescript
await instagit.ask_repo({
  repo: "vercel/next.js", // shorthand
  prompt: "What are the default API routes?"
});

```

## GitLab and Bitbucket URLs

Instagit is platform-agnostic and accepts public URLs from alternative hosting services. You can provide direct links to GitLab, Bitbucket, or other Git hosting platforms.

```typescript
await instagit.ask_repo({
  repo: "https://gitlab.com/gitlab-org/gitlab",
  prompt: "Summarize the merge request workflow."
});

```

## Generic Public Git URLs

Beyond web URLs, Instagit supports any valid public Git URL, including SSH clone links and direct Git protocol addresses. This flexibility allows integration with repositories regardless of their hosting configuration.

```typescript
await instagit.ask_repo({
  repo: "git@github.com:nodejs/node.git",
  prompt: "Detail the event-loop implementation in lib/internal/per_context.js."
});

```

## How Instagit Validates Repository Formats

Instagit implements strict validation using **Zod** schemas to ensure repository strings are properly formatted before processing. The validation logic is defined in [`src/index.ts`](https://github.com/instalabsAI/instagit/blob/main/src/index.ts) at lines 58-60, where the `repo` parameter schema explicitly documents accepted formats:

> "Repository to analyze. Accepts GitHub URLs (https://github.com/owner/repo), shorthand (owner/repo), GitLab/Bitbucket URLs, or any public Git URL"

Once validated, the repository identifier is forwarded to the backend API via [`src/api.ts`](https://github.com/instalabsAI/instagit/blob/main/src/api.ts), which handles the actual cloning or fetching operations using the appropriate Git client.

## Key Implementation Files

| File | Role |
|------|------|
| **[`src/index.ts`](https://github.com/instalabsAI/instagit/blob/main/src/index.ts)** | Declares the `ask_repo` tool, defines the `repo` parameter schema, and documents accepted formats. |
| **[`src/api.ts`](https://github.com/instalabsAI/instagit/blob/main/src/api.ts)** | Contains the client that talks to the Instagit backend, handling cloning/fetching of any public Git URL. |
| **[`src/kitt.ts`](https://github.com/instalabsAI/instagit/blob/main/src/kitt.ts)** | Manages progress reporting while the repository is being fetched and analyzed. |
| **[`src/token.ts`](https://github.com/instalabsAI/instagit/blob/main/src/token.ts)** | Handles authentication tokens that protect the API calls. |

## Summary

- Instagit supports **four primary repository formats**: full GitHub URLs, GitHub shorthand (`owner/repo`), GitLab/Bitbucket URLs, and any public Git URL including SSH links.
- Validation occurs through **Zod schemas** in [`src/index.ts`](https://github.com/instalabsAI/instagit/blob/main/src/index.ts), ensuring only properly formatted repository strings reach the backend.
- The **`ask_repo`** tool in [`src/api.ts`](https://github.com/instalabsAI/instagit/blob/main/src/api.ts) handles the actual repository fetching regardless of the input format provided.
- This flexibility allows users to reference repositories using their preferred naming convention without manual URL conversion.

## Frequently Asked Questions

### Does Instagit support private repositories?

Instagit is designed primarily for public repositories. While the system accepts any valid Git URL, accessing private repositories would require appropriate authentication credentials configured in the Git client or API layer, which depends on your specific Instagit deployment and token configuration in [`src/token.ts`](https://github.com/instalabsAI/instagit/blob/main/src/token.ts).

### Can I use SSH URLs with Instagit?

Yes, Instagit explicitly supports SSH clone URLs such as `git@github.com:owner/repo.git`. The backend API in [`src/api.ts`](https://github.com/instalabsAI/instagit/blob/main/src/api.ts) processes these URLs using standard Git protocols, allowing you to use the same SSH URLs you would use for manual `git clone` operations.

### What happens if I provide an invalid repository format?

Instagit validates all repository strings using Zod schemas defined in [`src/index.ts`](https://github.com/instalabsAI/instagit/blob/main/src/index.ts) before sending them to the backend. If you provide an invalid format, the validation will fail immediately with a descriptive error, preventing wasted API calls to non-existent or malformed repository addresses.

### Does Instagit work with self-hosted Git instances?

Yes, because Instagit accepts "any public Git URL," it can interact with self-hosted Git instances such as Gitea, Gogs, or self-managed GitLab installations. As long as the repository is publicly accessible via standard Git protocols (HTTPS or SSH), Instagit can analyze it through the `ask_repo` tool.