Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>MainSequenceNew to Visual Studio Code? Get it now.
MainSequence

MainSequence

Main Sequence GmbH

| (0) | Free
A VS Code extension that mirrors the MainSequence CLI with a friendly UI.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

MainSequence VS Code Extension

Main Sequence Logo

This repository contains the official MainSequence VS Code extension. It puts authentication, project discovery, local bootstrap, and signed terminals in the editor so you can manage MainSequence workspaces without hopping back to a terminal.

Features

  • Authentication panel – configurable backend + base-folder settings, sign-in form, and a post-login summary with a logout button.
  • Projects tree – pulls projects from the MainSequence API, distinguishes remote vs. local state, and offers contextual commands (set up locally, open folder/terminal, freeze env, delete).
  • Local bootstrap – generates a deploy key, registers it through the API, clones the repo, writes a project token & env file, and stores the project under the configured base path.
  • Signed terminals – opens terminals with the appropriate SSH key loaded so Git remotes work without manual agent juggling.
  • Utility commands – mainsequence.buildAndRun, copyLLMInstructions, etc., to keep editor workflows aligned with backend automation.

Development Workflow

  1. Install dependencies
    npm install
    
  2. Compile TypeScript
    • npm run watch during development (used by .vscode/launch.json as preLaunchTask).
    • npm run compile for a one-off build before packaging.
  3. Debug the extension
    • Press F5 (Run Extension) to launch a new Extension Host.
    • Use the “User” webview in the MainSequence activity bar section to sign in. After success the sign-in card hides and the “Signed in as …” card appears with a logout action.
    • Switch to the “Projects” tree to sync remote projects; use context menus or the command palette (Ctrl/Cmd+Shift+P) for operations like “Set Up Project Locally” or “Open Signed Terminal”.
  4. Logs & troubleshooting
    • Temporary SSH keys and config live in the same directories as the CLI (~/.config/mainsequence on Linux). Remove token.json if you need to force a re-login.
    • The extension logs to the VS Code Output channel (MainSequence logger) and to the console in the Extension Host for deeper debugging.

Releasing via GitHub Actions

.github/workflows/release.yml packages the extension with vsce and publishes it to the marketplace. Provide a VSCE_PAT (or equivalent) secret in the repo’s settings before running it.

  1. Ensure package.json has the correct name, publisher, and bumped version (use npm version patch|minor|major).
  2. Commit all changes. Running npm version … also creates a git tag.
  3. Push commits and tags: git push && git push --tags.
  4. The release workflow runs on the tag, builds from src/, and publishes the artifact to the Visual Studio Marketplace under the configured publisher.

Repository Layout

  • src/extension.ts – activation entry point. Wires up all commands (mainsequence.*), registers the tree provider/webviews, and orchestrates terminal creation and progress flows.
  • src/views/projectsView.ts – implements ProjectsProvider (TreeDataProvider) plus project-specific helpers (setUpLocally, openSignedTerminal, freezeEnv, deleteLocal).
  • src/webviews/
    • loginPanel.ts – renders the User view, handles settings persistence, login/logout messaging.
    • currentProjectPanel.ts – placeholder for the “Current Project” view (surface project context or status).
  • src/api.ts – Axios wrapper enforcing endpoint allowlists, token refresh, project listing/token/env fetch calls.
  • src/config.ts – manages shared config + token files under ~/.config/mainsequence (or OS equivalent) so the extension and CLI stay synchronized.
  • src/projects.ts – workspace helpers (org slug derivation, repo URL parsing, local path discovery).
  • src/ssh.ts + scripts/ssh/ – ensures deploy keys exist, starts agents, opens signed terminals (scripts mirror PowerShell/Bash flows used by CLI).
  • src/envfile.ts – writes .env files and injects the fetched project token + backend URL.
  • src/instructions.ts, src/logger.ts, src/instructions – supporting utilities (LLM instructions helpers, logging, etc.).
  • scripts/ – reusable shell/PowerShell scripts grouped by domain (ai, git, ssh, system, uv). Extension commands shell out to these to stay DRY with other MainSequence tooling.
  • media/ – icons and branding artifacts (drop logo.png, icon-128.png, etc., for VS Code marketplace assets).

Contributing & Maintenance

  • Run npm outdated/npm update regularly to keep the toolchain current.
  • Centralize reusable shell logic in scripts/ so both the extension and other MainSequence tooling stay aligned.
  • If new API surfaces are needed, extend src/api.ts and keep the endpoint allowlist restrictive.
  • Capture fresh screenshots for the marketplace listing when you adjust UI, and verify the release workflow after any changes to GitHub Actions or package.json.
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft