Code Server

Run VS Code in the browser as a devframe panel: detect a local editor, launch on demand, embed in an auto-authenticated iframe.

Run VS Code in the browser as a devframe panel: detect a local editor, launch on demand, embed in an auto-authenticated iframe.

Package: @devframes/plugin-code-server · framework: Vue

Launcher before start

The embedded editor in the browser

What it does

  • Detection — probes with --version; if absent, shows install info.
  • Launch — a managed child process on a free port, readiness-probed.
  • Auto-auth — fresh auth per launch; the editor opens signed in.

Backends

mode: 'local' (default) auto-detects code-server, else code serve-web.

backendBinaryAuth handoff
'code-server'code-serverpassword + session cookie
'ms-code-serve-web'code serve-webconnection token (?tkn=)

Tunnel mode

mode: 'tunnel' runs code tunnel and embeds vscode.dev; first launch prompts a device login (code CLI).

Standalone

pnpx @devframes/plugin-code-server

Mount into a Vite host

// vite.config.ts
import { codeServerVite } from '@devframes/plugin-code-server/vite'
import { defineConfig } from 'vite'

export default defineConfig({
  plugins: [
    codeServerVite(),
  ],
})

Programmatic

import { createCodeServerDevframe } from '@devframes/plugin-code-server'

export default createCodeServerDevframe({
  // backend: 'code-server',    // default: auto-detect
  // mode: 'local',             // 'local' | 'tunnel'
  // serverPort: 8080,          // default: free port near 8080
  // startOnBoot: true,         // launch during setup
  // reuseExistingServer: true, // adopt a server on the port
  // tunnel: { name: 'my-box' },
})

RPC

Namespaced devframes:plugin:code-server:*:

FunctionTypePurpose
detectqueryRe-probe; returns installed/version/bin/backend/mode.
statusqueryCurrent status; connect descriptor if running.
startactionLaunch and await readiness.
stopactionStop the process.

Status (minus connect descriptor) mirrors into …:state.

Source

plugins/code-server