Skip to content

VS Code

  • The VS Code extension is a companion to the Cosine CLI. The CLI must be installed and available.
  • The extension auto-discovers the CLI, streams “Cosine Changes” into VS Code, and provides inline actions to open files and diffs.

https://youtu.be/944Cs5wvkoY

  • Shares lightweight editor context (active file and selection) so Genie can respond more precisely.
  • Adds a “✦ Cosine Changes” tree in the Explorer to track files with live previews or SCM changes; click items to open diffs or previews.
  • Launches a “Cosine” terminal and runs the CLI for you (configurable).
  • Streams in code changes for quicker validation and diff viewing
  • Cosine CLI installed and on PATH (cos --version)
  • VS Code 1.105.0 or later

https://cosine.sh/cli

Terminal window
cos --version
  1. Install the CLI and verify cos --version.
  2. Install the VS Code extension.
  3. Open a project in VS Code and reload the window.
  4. The extension will start a “Cosine” terminal and run cos (if auto-start is enabled).
  5. Use the “✦ Cosine Changes” view in the Explorer to preview live updates; open diffs when coding streams complete.
  • Sign in: if the terminal shows “You are not logged in”, run cos login and complete auth in your browser.
  • Start the CLI: it auto-starts by default; otherwise run “Cosine: Start CLI”. Use “Cosine: Focus CLI Terminal” to bring it to front.
  • Provide context: open a file or select a block of code. The extension shares the active file/selection with Genie.
  • Ask Genie: type your request in the CLI prompt (e.g., “refactor this function”, “add tests for X”, “fix lint errors”). Watch live previews stream in the “Cosine Changes” view.
  • Review diffs: when a stream ends, a native diff opens (configurable via settings). Use inline actions to open Working, Live, or Diff for each item.
  • Apply/commit: the CLI writes changes to your repo. Review them in Git and commit as usual. The extension is visual-only for previews/diffs.
  • CLI not found:
    • Check cos --version. If not found, install the CLI or add its install directory to your PATH.
    • In VS Code, set “Cosine: CLI Path” (e.g., /usr/local/bin/cos).
  • Bridge not connected:
    • Check status bar. Run “Cosine: Start VS Code Bridge”.
    • Verify the CLI is running in the “Cosine” terminal.
  • Extension: uninstall from VS Code Extensions.
  • CLI: remove the cos binary from its install location (e.g., /usr/local/bin/cos or your user bin dir).
  • Do I need the CLI for the extension to work?
    • Yes. The extension is a companion to the CLI and depends on it.
  • How do I update the CLI?
    • Re-run the install script or install a newer release. Then verify with cos --version.
  • Where do I see changes?
    • Use the “✦ Cosine Changes” view to preview and open diffs as Genie streams updates.