Index of every page on this site: llms.txt
All skills
composiohq avatar

/cli-command

@85dab73
by Composiocomposiohq/composio31k stars
4,962
Run it yourself

Design, implement, or review Composio CLI commands under ts/packages/cli using Effect, effect/cli, services, output conventions, configuration and environment variables, and local vendor references. Use for CLI command UX, command wiring, service changes, or CLI source edits. Do not use for CLI E2E-only work; use cli-e2e there.

Use this Skill: https://skilld.dev/gh/composiohq/composio/cli-command

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

referencesdesign.md

≈713 tokens on demand. Your agent reads this file only when SKILL.md points to it.

CLI Design

Principles

  • Keep stdout for data and stderr for human-readable decoration.
  • Use ui.output() only for values scripts should capture.
  • Keep quiet/piped mode clean.
  • Prefer flags over ambiguous positional arguments.
  • Use --json, --dry-run, --force, --no-input, and --no-browser consistently when the command shape needs them.
  • Never accept secrets through flags.

Help And Errors

  • Help text is user experience. Lead with concise descriptions and common examples.
  • Expected errors should tell the user what happened and the next command or fix.
  • Unexpected errors should preserve debug detail through the existing effect-error machinery.

Interactivity

  • Use @clack/prompts through the existing CLI UI abstractions.
  • Prompt only when stdin is a TTY.
  • Non-interactive mode should fail with actionable messages instead of hanging.

Configuration And Exit Codes

  • Runtime config is read from environment variables via effect/Config. Every variable the CLI reads is declared, under its full name, in one of the catalogs in src/config (APP_CONFIG for user-facing COMPOSIO_* settings, DEBUG_CONFIG, TELEMETRY_CONFIG, HOST_CONFIG, GITHUB_CONFIG); add new variables there, never inline. Tests inject ConfigProvider.fromEnvRecord({...}).
  • Persistent user/auth state lives in ~/.composio/config.json and ~/.composio/user_data.json. The API key can be stored in the OS keyring. ComposioUserContext applies environment overrides to stored values.
  • Project-scoped data uses a project-local .composio/ directory.
  • Exit 0 on success and 1 on failure, or 75 (EX_TEMPFAIL) when the failure is a request that is safe to send again as it is: one the API refused with a 429, or one with an idempotent method that timed out, lost its connection, or got a 408 or 5xx (retryAdviceFor in src/effects/retry-advice.ts). A request that failed in flight and may have taken effect exits 1; where the command knows it has a side effect (composio execute), it says to check before running it again. A command a signal cancels exits 128 + the signal's number: 130 (Ctrl-C), 143 (SIGTERM), 129 (SIGHUP). A listener stopped with Ctrl-C or SIGTERM once subscribed exits 0; composio run ends the way its script did (its code, or the same signal). Never assign process.exitCode: an error declares [Runtime.errorExitCode] / [Runtime.errorReported] (effect Runtime), and Runtime.defaultTeardown, run by the CLI's runner (src/run-main.ts), picks the code. Never install signal handlers in a command; cooperate through ShutdownSignal instead (see ts/packages/cli/AGENTS.md). There is no distinct "invalid usage" exit code — do not invent one.

References

  • CLI architecture: ts/packages/cli/AGENTS.md.
  • Effect and Clack sources are read-only under ts/vendor/.

Source: SKILL.md on GitHub

No rule matched.

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

No alertstoday3 checks · Risk SAFE
  • Gen Agent Trust Hub2d

    This skill provides a framework for building and managing CLI commands within the Composio ecosystem. It includes features for executing child processes and handling external data inputs from files and terminal streams, which are standard for developer tools but constitute a surface for indirect injection. The documentation promotes security best practices, such as utilizing system keyrings for credentials and validating all user-supplied data against strict schemas.

  • Sockettoday

    No alerts

  • Snyk2d

    Risk: LOW · No issues

Signed by skilld at 85dab73. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub yesterday.

Activeupdated 3 weeks ago

README badge

README badge for composiohq/composio/cli-command