Skip to content

chore(capy): install service CLIs with agent tokens from Infisical - #8375

Merged
capy-ai[bot] merged 2 commits into
mainfrom
chore/capy-service-clis
Dec 1, 2026
Merged

capy-ai[bot] merged 2 commits into
mainfrom
chore/capy-service-clis

Conversation

@ComputelessComputer

@ComputelessComputer ComputelessComputer commented Dec 1, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Context: Agents on Capy machines for Anarlog had supabase but no credentials for it, and no CLI for Vercel, Cloudflare, Sentry, PostHog, Linear or Notion.

Intention: Any thread in this project should be able to drive all seven services from the shell without a login step and without tokens leaking into the processes that build and run Anarlog.

Direction: .capy/tools.sh installs vercel, wrangler, sentry-cli, posthog-cli, linear (schpet/linear-cli) and ntn (Notion's CLI) into ~/.local/opt/service-clis. For each of those, and for the supabase that scripts/setup-devtools.sh already installs, it writes a wrapper in ~/.local/bin. The wrapper fetches only that CLI's own tokens from the char Infisical project's dev:/agents folder, the same folder fastrepl/char#5784 uses, and then execs the real binary, so a vercel build never hands the other services' tokens to the repo's build commands. Setup fails if supabase is missing from /usr/local/bin rather than writing a wrapper that points at nothing. Only posthog-cli is overridden: it targets the Anarlog PostHog project (113410) instead of Char's. Repo tasks such as task supabase-start use the workspace supabase through pnpm exec, so they don't go through the wrapper.

Demo

N/A: this changes machine tooling only.

Verification

  • Ran the new section on its own against a scratch HOME, using Node 22.23.4's npm 10.9.9 as Setup does. Every CLI installed and reports its version.
  • posthog-cli api call project-get through the wrapper returns Anarlog (113410), and vercel whoami authenticates.
  • A Capy test snapshot build of the anarlog project passed on the first commit in 743s: clone, every Setup phase, and the secret scrub, on a fresh machine.
  • After the per-CLI token fix, I reran the section with npm 10. The PostHog, Supabase, Linear and Sentry wrappers authenticate, and Setup exits 1 when /usr/local/bin/supabase is missing.
  • The anarlog project's INFISICAL_TOKEN can read the char dev:/agents folder (key names listed, no values).

Agents on Capy machines need Vercel, Cloudflare, Supabase, Sentry, PostHog, Linear and Notion from the shell. Install their CLIs into one prefix and wrap each, the existing supabase included, so it runs under infisical run with the tokens in Infisical char dev:/agents, never written to disk or exported to other processes. posthog-cli targets the Anarlog project.
devin-ai-integration[bot]

This comment was marked as resolved.

@coderabbitai

coderabbitai Bot commented Dec 1, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

Caution

Review failed

The pull request is closed.

Walkthrough

The tool installer now installs configured service CLI packages when a named binary is missing. It creates Infisical-backed wrappers for the service CLIs and /usr/local/bin/supabase. The PostHog wrapper sets project ID 113410. Version reporting lists service CLI binaries separately from the standard CLI list.

Merge Risk: Moderate · previous review ab3d5

Agents on Capy machines can run vercel build through the new wrapper, and the repository's install and build scripts will then receive all service tokens from the Infisical /agents folder. That undermines the PR's goal of keeping tokens away from processes that build Anarlog. Resolve this before merging, or explicitly accept it, for example by running local builds without secret injection.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the main change: installing service CLIs (Vercel, Wrangler, Sentry, PostHog, Linear, Notion, Supabase) and wiring them to agent tokens from Infisical. The raw summary and objectives bo…
Description check Passed The description states the context, intent, and approach. It names the CLIs installed by .capy/tools.sh, the Infisical wrappers, the dev:/agents folder, the PostHog project override, and the verificat…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the main change: installing service CLIs (Vercel, Wrangler, Sentry, PostHog, Linear, Notion, Supabase) and wiring them to agent tokens from Infisical. The raw summary and objectives both describe this wrapper and installer work in .capy/tools.sh. The title is specific and matches the changeset.

Full details: Description check

Explanation

The description states the context, intent, and approach. It names the CLIs installed by .capy/tools.sh, the Infisical wrappers, the dev:/agents folder, the PostHog project override, and the verification steps. It relates directly to the changeset.

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

coderabbitai[bot]

This comment was marked as resolved.

infisical run injected every dev:/agents secret into each CLI, so vercel build or wrangler dev passed all of them to the repository's own build commands. Each wrapper now fetches only the keys its CLI reads and execs the binary.

Setup also fails when supabase is missing from /usr/local/bin instead of writing a wrapper to nothing.

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 2 new potential issues.

Devin Review

Comment thread .capy/tools.sh Resolved
Comment thread .capy/tools.sh Resolved
@capy-ai
capy-ai Bot merged commit 3e61b2c into main Dec 1, 2026
15 of 16 checks passed
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.

1 participant