Skip to content

feat: add Autohand Code as a supported CLI provider#1237

Merged
arnestrickmann merged 9 commits intogeneralaction:mainfrom
igorcosta:add_support_autohand_code
Mar 3, 2026
Merged

feat: add Autohand Code as a supported CLI provider#1237
arnestrickmann merged 9 commits intogeneralaction:mainfrom
igorcosta:add_support_autohand_code

Conversation

@igorcosta
Copy link

Summary

  • Register Autohand Code (autohand-cli) as the 22nd supported CLI provider
  • Add SVG icon asset with currentColor fill for automatic light/dark theme adaptation
  • Wire provider into all renderer UI layers: agent selector, info card, asset registry, terminal constants
  • Pass AUTOHAND_API_KEY through the PTY environment for direct-spawn authentication
  • Update exhaustive auto-approve test to include autohand: '--unrestricted'
  • Add Autohand Code to README and docs provider tables (alphabetically after Auggie)

Provider Configuration

Field Value
CLI binary autohand
Install npm install -g autohand-cli
Initial prompt -p flag
Auto-approve --unrestricted
Version detection --version
Doc URL https://autohand.ai/code/
Icon format SVG (inline, theme-adaptive)

Test plan

  • pnpm run type-check passes
  • pnpm run lint passes (0 errors)
  • pnpm run format — no changes needed
  • pnpm exec vitest run — 33/33 suites, 329/329 tests pass
  • ptyManager.test.ts auto-approve flag exhaustive check includes autohand
  • Manual: install autohand-cli, open Emdash, verify Autohand Code appears in agent selector
  • Manual: start a task with Autohand Code, verify CLI spawns correctly with -p prompt
  • Manual: enable auto-approve, verify --unrestricted flag is passed

Igor Costa added 9 commits March 3, 2026 11:01
Add the Autohand Code logo as an SVG asset using currentColor fill
for automatic light/dark theme adaptation.
Add Autohand Code (autohand-cli) as a new provider with:
- CLI binary: autohand
- Initial prompt via -p flag
- Auto-approve via --unrestricted flag
- Version detection via --version
- Documentation at https://autohand.ai/docs/
Add Autohand Code icon import, agent asset definition, agent config
entry, and terminal provider registration across all renderer modules.
The SVG icon is imported as raw content for inline rendering.
Add description and metadata for the Autohand Code provider card
shown when hovering over the agent selector in the UI.
Add AUTOHAND_API_KEY to the environment variable passthrough list
so the Autohand Code CLI can authenticate when spawned via direct
PTY mode (which skips shell profile loading).
Include autohand --unrestricted in the exhaustive auto-approve flag
map so the test continues to verify every provider that declares an
autoApproveFlag in the registry.
Insert Autohand Code alphabetically after Auggie in the provider
table and bump the provider count from twenty-one to twenty-two.
Add Autohand Code to the provider install table and include it in
the auto-approve feature support list. Bump provider count to 22.
Point the documentation link to the product page at /code/ instead
of the generic /docs/ path.
@vercel
Copy link

vercel bot commented Mar 3, 2026

Someone is attempting to deploy a commit to the General Action Team on Vercel.

A member of the Team first needs to authorize it.

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Mar 3, 2026

Greptile Summary

This PR registers Autohand Code (autohand) as the 22nd supported CLI provider in Emdash, following the established pattern for adding new providers across all required integration layers.

Key changes:

  • Registry: New ProviderDefinition in src/shared/providers/registry.ts with cli: 'autohand', autoApproveFlag: '--unrestricted', initialPromptFlag: '-p', and icon: 'autohand.svg'
  • Icon: Theme-adaptive SVG asset using fill="currentColor" throughout, consistent with other SVG icons
  • UI wiring: Provider correctly wired into agentConfig.ts, assets.ts, meta.ts, AgentInfoCard.tsx, and TERMINAL_PROVIDER_IDS
  • PTY auth: AUTOHAND_API_KEY added to the environment passthrough list in ptyManager.ts (minor ordering issue noted inline)
  • Tests: Exhaustive auto-approve flag test updated to include autohand: '--unrestricted'
  • Docs: README and providers.mdx updated with correct provider count (22) and Autohand Code inserted alphabetically

Confidence Score: 5/5

  • This PR is safe to merge — it follows the established provider integration pattern exactly, all tests pass, and the single issue found is a cosmetic ordering nit.
  • The change is a straightforward, well-scoped provider registration that mirrors the pattern used by 21 existing providers. All required integration points (registry, icon, UI layers, PTY env, tests, docs) are covered. The only issue found is that AUTOHAND_API_KEY is inserted out of alphabetical order relative to AUGMENT_SESSION_AUTH in the env vars array — a style nit with no functional impact since the array is iterated uniformly. All 329 tests continue to pass.
  • No files require special attention beyond the minor ordering fix in src/main/services/ptyManager.ts.

Important Files Changed

Filename Overview
src/shared/providers/registry.ts Adds autohand to PROVIDER_IDS and a complete ProviderDefinition entry with all expected fields: cli, commands, versionArgs, autoApproveFlag, initialPromptFlag, docUrl, installCommand, icon, and terminalOnly. Definition is well-formed and consistent with other provider entries.
src/main/services/ptyManager.ts Adds AUTOHAND_API_KEY to the PTY environment passthrough list, but it is inserted out of alphabetical order — AUTOHAND_API_KEY appears before AUGMENT_SESSION_AUTH when it should follow it.
src/renderer/providers/assets.ts Imports the raw SVG and registers the autohand asset entry correctly with isSvg: true. The name field ('Autohand') follows the existing convention of using the brand/org name rather than the full product name (e.g., 'Anthropic' for Claude, 'Sourcegraph' for Amp).
src/renderer/providers/meta.ts Imports the autohand SVG icon and registers it in the ICONS map keyed by 'autohand.svg', matching the icon field in the registry. The agentMeta record derives autohand automatically from PROVIDERS, so no manual entry is needed.
src/renderer/lib/agentConfig.ts Adds autohand to the agentConfig record with isSvg: true and the correct raw SVG import. Entry is placed within the "initial prompt support" group, which is correct since autohand has initialPromptFlag: '-p'.
src/renderer/components/AgentInfoCard.tsx Adds the autohand entry to agentInfo with an accurate title and description; no issues found.
src/renderer/constants/agents.ts Appends 'autohand' to TERMINAL_PROVIDER_IDS, correctly extending the TerminalProviderId union type.
src/test/main/ptyManager.test.ts Exhaustive auto-approve test is correctly updated to include autohand: '--unrestricted', maintaining complete coverage of all providers with auto-approve flags.
src/assets/images/autohand.svg New SVG icon using fill="currentColor" throughout all paths, enabling automatic theme adaptation. 16×16 viewBox is consistent with other SVG icons in the project.
README.md Provider count updated from 21 to 22; Autohand Code inserted alphabetically (after Auggie, before Charm) in the supported providers table.
docs/content/docs/providers.mdx Provider count updated to 22; Autohand Code added to the provider table and to the auto-approve feature description.

Sequence Diagram

sequenceDiagram
    participant UI as Renderer UI
    participant Registry as providers/registry.ts
    participant Meta as providers/meta.ts
    participant PTY as ptyManager.ts
    participant CLI as autohand CLI

    UI->>Registry: getProvider('autohand')
    Registry-->>UI: { cli: 'autohand', initialPromptFlag: '-p', autoApproveFlag: '--unrestricted' }

    UI->>Meta: agentMeta['autohand']
    Meta-->>UI: { label: 'Autohand Code', icon: autohand.svg, ... }

    UI->>PTY: startDirectPty({ providerId: 'autohand', ... })
    PTY->>PTY: resolveProviderCommandConfig('autohand')
    PTY->>PTY: buildProviderCliArgs({ initialPromptFlag: '-p', autoApproveFlag: '--unrestricted' })
    PTY->>PTY: inject AUTOHAND_API_KEY from env
    PTY->>CLI: spawn('autohand', ['-p', prompt, '--unrestricted'])
    CLI-->>PTY: PTY stream
    PTY-->>UI: output data
Loading

Last reviewed commit: bae951d

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

11 files reviewed, 1 comment

Edit Code Review Agent Settings | Greptile

Comment on lines +21 to 22
'AUTOHAND_API_KEY',
'AUGMENT_SESSION_AUTH',
Copy link
Contributor

Choose a reason for hiding this comment

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

AUTOHAND_API_KEY breaks alphabetical ordering

The AGENT_ENV_VARS array is sorted alphabetically throughout, but AUTOHAND_API_KEY is inserted before AUGMENT_SESSION_AUTH. Alphabetically, AUG (G = 7th letter) precedes AUT (T = 20th letter), so AUGMENT_SESSION_AUTH should come first.

Suggested change
'AUTOHAND_API_KEY',
'AUGMENT_SESSION_AUTH',
'AUGMENT_SESSION_AUTH',
'AUTOHAND_API_KEY',

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

@arnestrickmann arnestrickmann merged commit ea703ad into generalaction:main Mar 3, 2026
3 of 4 checks passed
@arnestrickmann
Copy link
Contributor

Hey @igorcosta,
Thanks for opening the PR - excited to try out Autohand!

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