Skip to content

Add Cursor Cloud development environment setup for Linux#122

Closed
arul28 wants to merge 6 commits into
mainfrom
cursor/development-environment-setup-3671
Closed

Add Cursor Cloud development environment setup for Linux#122
arul28 wants to merge 6 commits into
mainfrom
cursor/development-environment-setup-3671

Conversation

@arul28
Copy link
Copy Markdown
Owner

@arul28 arul28 commented Apr 3, 2026

Summary

Makes ADE run natively on Linux, fixes onboarding for new machines, and adds environment variable credential fallbacks for headless/cloud environments.

Changes

1. Fix onboarding on new machines (main.ts)

Onboarding checked for the .ade directory to decide if a project was fresh. Since .ade is partially tracked in git, the directory always exists on clone — but ade.db, secrets, and API keys are gitignored. Onboarding was silently skipped on new machines.

Fix: Check for ade.db (gitignored, machine-local) instead of .ade directory.

2. Fix cr-sqlite sync API graceful degradation (kvDb.ts)

The sync API methods threw when cr-sqlite was unavailable, blocking project initialization on Linux.

Fix: Return safe no-op defaults instead of throwing.

3. Env var fallback for credentials (githubService.ts, linearCredentialService.ts, apiKeyStore.ts)

All credential stores only read from Electron's safeStorage encrypted files, requiring GUI setup. Headless/CI/cloud environments had no way to provide credentials.

Fix: Check environment variables as a fallback when the encrypted store is empty:

Service Env vars
GitHub GITHUB_TOKEN, ADE_GITHUB_TOKEN
Linear LINEAR_API_KEY, ADE_LINEAR_TOKEN
AI providers ANTHROPIC_API_KEY, OPENAI_API_KEY, GOOGLE_API_KEY, MISTRAL_API_KEY, DEEPSEEK_API_KEY, XAI_API_KEY, GROQ_API_KEY, TOGETHER_API_KEY, OPENROUTER_API_KEY

The encrypted store remains the primary source. Env vars are only checked when no stored credential is found.

4. AGENTS.md cloud instructions

Added Linux dev environment setup documentation.

How this changes the flow

For regular desktop users: Nothing changes. The encrypted store is still checked first. If you set a token through the GUI, it works exactly as before. The env var fallback is never reached.

For new machines / clones: Onboarding now correctly triggers when you open a project that was cloned from git, even if .ade/ exists in the repo. Previously it was silently skipped.

For cloud agents / CI: Set credentials as environment variables (e.g. Cursor Cloud Secrets panel). ADE picks them up automatically — no GUI interaction needed. The onboarding wizard still shows but all credential steps will already be satisfied.

Evidence

Onboarding wizard triggers on fresh machine

ADE running on Linux with project loaded

Validation

Check Desktop MCP Server
typecheck Pass Pass
lint Pass (0 errors) N/A
build Pass Pass
test (shard) Pass (124/124) Pass (126/126)

To show artifacts inline, enable in settings.

Open in Web Open in Cursor 

- Document Linux-specific environment setup (GPU acceleration, node-pty rebuild, spawn-helper compilation)
- Document dev mode race condition workaround
- Note cr-sqlite and computer-use feature limitations on Linux
- Add tips for running Electron app and tests efficiently

Co-authored-by: Arul Sharma <arul28@users.noreply.github.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 3, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
ade Ready Ready Preview, Comment Apr 4, 2026 3:23am

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 3, 2026

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 94e927ae-09f4-416e-8224-270d0d6beb24

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch cursor/development-environment-setup-3671

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

cursoragent and others added 2 commits April 3, 2026 04:53
The sync API methods (getDbVersion, exportChangesSince, applyChanges)
threw when cr-sqlite extension was unavailable, preventing project
initialization on platforms without the extension (Linux).

Changed to return safe no-op defaults (0, [], empty result) instead
of throwing, allowing the sync service to initialize harmlessly
without CRDT sync capability.

Co-authored-by: Arul Sharma <arul28@users.noreply.github.com>
Co-authored-by: Arul Sharma <arul28@users.noreply.github.com>
Check for ade.db (gitignored, machine-local) instead of the .ade
directory (tracked in git with shared config). This ensures onboarding
runs when a project is cloned to a new machine that has the shared
scaffold but no local runtime state.

Co-authored-by: Arul Sharma <arul28@users.noreply.github.com>
Allows headless/CI/cloud environments to provide credentials via
environment variables when Electron's safeStorage encrypted store
is empty or unavailable.

- GitHub: GITHUB_TOKEN or ADE_GITHUB_TOKEN
- Linear: LINEAR_API_KEY or ADE_LINEAR_TOKEN
- AI providers: ANTHROPIC_API_KEY, OPENAI_API_KEY, GOOGLE_API_KEY,
  MISTRAL_API_KEY, DEEPSEEK_API_KEY, XAI_API_KEY, GROQ_API_KEY,
  TOGETHER_API_KEY, OPENROUTER_API_KEY

The encrypted store remains the primary source. Env vars are only
checked as a fallback when no stored credential is found.

Co-authored-by: Arul Sharma <arul28@users.noreply.github.com>
When a project is opened for the first time on a new machine and
environment variables provide at least one credential (GitHub token,
AI API key, or Linear token), mark onboarding as complete so the
wizard is skipped. This lets cloud agents and CI environments that
set credentials via env vars go straight to the Work view.

Co-authored-by: Arul Sharma <arul28@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants