CLI tool for PlugFn SDK
npm install @plugfn/cliCommand-line interface for the PlugFn SDK.
``bash`
npm install -g @superfunctions/plugfn-cli
Initialize a new PlugFn project.
`bash`
plugfn init
plugfn init --directory ./my-project
Creates:
- Project structure
- Configuration file (plugfn.config.ts).env.example
- Environment template ()
- Example code
Generate TypeScript types for providers.
`bashGenerate types for a specific provider
plugfn generate-types --provider github --output ./types
$3
Create a new provider from template.
`bash
plugfn add-provider --name custom-api --auth api-key
plugfn add-provider --name oauth-service --auth oauth2
`Options:
-
--name: Provider name (required)
- --auth: Auth type (oauth2, api-key, jwt, basic)
- --output: Output directory (default: ./src/providers)$3
Test connections and actions.
`bash
plugfn test --provider github
plugfn test --provider github --action issues.create
plugfn test --provider github --connection conn-123
`Examples
$3
`bash
mkdir my-integration-app
cd my-integration-app
plugfn init
npm install
`$3
`bash
plugfn add-provider --name shopify --auth api-key
`This creates a provider template at
src/providers/shopify/index.ts.$3
`bash
plugfn generate-types --all
``Apache-2.0