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

# Shard Cloud VS Code Extension

> Manage your ShardCloud applications and databases directly from VS Code.

## Installation

Install the extension from the VS Code Marketplace:

<Card title="ShardCloud for VS Code" icon="download" href="https://marketplace.visualstudio.com/items?itemName=shard-cloud.shard-cloud">
  Get the official ShardCloud extension from the Visual Studio Marketplace.
</Card>

Or search for **"ShardCloud"** in the VS Code Extensions panel (`Ctrl+Shift+X` / `Cmd+Shift+X`).

### Cursor Users

For Cursor IDE, download the VSIX file directly and install it manually:

<Card title="Download VSIX for Cursor" icon="file-arrow-down" href="https://marketplace.visualstudio.com/_apis/public/gallery/publishers/shard-cloud/vsextensions/shard-cloud/0.0.3/vspackage">
  Download the .vsix file for manual installation in Cursor.
</Card>

To install in Cursor:

1. Download the VSIX file
2. Open Cursor and go to the Extensions tab (`Ctrl+Shift+X` / `Cmd+Shift+X`)
3. Drag and drop the downloaded `.vsix` file into the Extensions panel

***

## Features

<CardGroup cols={2}>
  <Card title="Application Management" icon="rocket">
    Deploy, start, stop, and restart your applications with one click.
  </Card>

  <Card title="Database Management" icon="database">
    View, manage, and connect to your databases from the sidebar.
  </Card>

  <Card title="Real-time Logs" icon="terminal">
    Stream application logs directly in VS Code via SSE.
  </Card>

  <Card title="Resource Monitoring" icon="chart-line">
    Monitor RAM and CPU usage at a glance.
  </Card>
</CardGroup>

### 🚀 Application Management

* **Deploy** your code to ShardCloud with one click
* **Start, Stop, Restart** your applications
* **View Logs** in real-time (SSE streaming)
* **Monitor Resources** - RAM, CPU usage at a glance

### 💾 Database Management

* View all databases in the sidebar
* Start/Stop databases
* Copy connection link for quick access
* Copy database ID

### 📝 .shardcloud Config Support

* **IntelliSense** - Auto-completion for config keys
* **Validation** - Real-time error checking
* **Hover docs** - Documentation on hover
* **File auto-completion** for `MAIN=` field

### 🔗 Quick Actions

* Link existing apps to your workspace
* Sync `.shardcloud` config from deployed apps
* Open apps in ShardCloud Dashboard
* Access websites directly

***

## Getting Started

<Steps>
  <Step title="Login">
    Click the ShardCloud icon in the sidebar and enter your API token.

    <Tip>
      Get your token from [ShardCloud Dashboard](https://shardcloud.app/dash) → **Config** → **Integrations**
    </Tip>
  </Step>

  <Step title="Link an App">
    Click **"Link to Existing App"** in the Current App panel, or create a `.shardcloud` file manually.
  </Step>

  <Step title="Deploy">
    Right-click your app → **"Deploy to App"**, or use the Deploy button in the Current App panel.
  </Step>
</Steps>

***

## .shardcloud Config

Create a `.shardcloud` file in your project root:

```bash theme={null}
# App configuration
APPID=your-app-id
NAME=my-app
MAIN=src/index.ts
RAM=512
VERSION=recommended
SUBDOMAIN=myapp
```

The extension provides IntelliSense and validation for this file.

***

## Learn More

<CardGroup cols={2}>
  <Card title=".shardignore" icon="file-slash" href="/vscode/shardignore">
    Control which files are excluded from deployment.
  </Card>

  <Card title="Commands & Settings" icon="terminal" href="/vscode/commands">
    View all available commands and configuration options.
  </Card>
</CardGroup>

***

## Troubleshooting

<AccordionGroup>
  <Accordion title="Extension not showing apps">
    Ensure you're logged in with a valid API token. Try logging out and back in.
    Check that your token has the correct permissions.
  </Accordion>

  <Accordion title="Deploy fails">
    Check the Output panel (`View` → `Output` → `ShardCloud`) for error details.
    Verify your `.shardcloud` config is valid and `APPID` is set correctly.
  </Accordion>

  <Accordion title="Logs not streaming">
    Ensure your application is running. Check your network connection.
    Try restarting the log stream.
  </Accordion>

  <Accordion title="IntelliSense not working">
    Reload VS Code window (`Ctrl+Shift+P` → `Developer: Reload Window`).
    Ensure the extension is enabled.
  </Accordion>
</AccordionGroup>

***

## Need Help?

<Card title="Shard Cloud Community" icon="discord" color="#7289DA" href="https://discord.gg/jjdYayFu5Q">
  Chat with developers, ask questions, and share feedback in our community
  Discord server.
</Card>
