
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
@kcflow/cli
Advanced tools
KCFlow is a TypeSafe End-to-End API Builder that allows you to generate Backend Code, Frontend SDKs, and API Documentation simultaneously from a Single Source of Truth.
Install the CLI globally to access the kcflow command from anywhere:
npm install -g @kcflow/cli
Then, install the core library in your project:
npm install kcflow
Create a configuration file and the initial folder structure.
kcflow init
This command generates:
kcflow.config.json (Main configuration file)kcflow/spec/kcflow.spec.ts (API Specification file)Edit kcflow/spec/kcflow.spec.ts to define your API endpoints.
import { defineResource, t } from 'kcflow';
export default defineResource({
products: {
getById: {
method: 'GET',
path: '/products/:id',
body: t.object({
id: t.string()
})
}
}
});
Push your spec to the cloud to generate the SDK, Router, and Documentation.
kcflow gen
(Alias: kcflow push)
kcflow initInitializes KCFlow settings in the current project.
kcflow.config.json.kcflow/spec directory with a sample spec file.kcflow generate (alias: gen, push)Reads the config and spec files, sends them for processing, and writes the generated files to your local machine. Options:
-c, --config <path>: Path to the config file (default: kcflow.config.json).-o, --output <path>: Output directory (default: as specified in config).kcflow login <key>Saves your API Key locally (for users with premium plans).
<key> Your API Key from the KCFlow Console.kcflow login kcf_12345abcdefkcflow.config.json)The JSON file used to configure CLI behavior.
| Property | Type | Description |
|---|---|---|
clientType | `'axios' | 'fetch'` |
spec | string | Path to the Spec file (e.g., ./kcflow/spec/kcflow.spec.ts). |
output.types | string | Path for TypeScript Definitions (.d.ts). |
output.client | string | Path for the Frontend Client SDK. |
output.router | string | Path for the Backend Router. |
output.openapi | string | Path for the Swagger/OpenAPI JSON file. |
Example:
{
"clientType": "axios",
"spec": "./kcflow/spec/kcflow.spec.ts",
"output": {
"types": "./src/generated/types.d.ts",
"client": "./src/generated/client.ts",
"router": "./src/generated/router.ts",
"openapi": "./public/swagger.json"
}
}
kcflow)Used to define data structures (Schema) in your .spec.ts file.
defineResource(def)The main function wrapper for all API definitions.
t (Type Helper)A helper object for defining data types.
t.string(): String value.t.number(): Numeric value.t.boolean(): Boolean value (true/false).t.object({ ... }): Object with nested properties.t.array(itemType): Array of a specific type.t.optional(field): Marks a field as optional.Example usage of t:
body: t.object({
username: t.string(),
age: t.optional(t.number()), // Optional field
tags: t.array(t.string()) // Array of strings
})
Running kcflow gen will produce the following files:
types.d.ts: Contains Interfaces for all Requests and Responses.client.ts: Ready-to-use Frontend SDK (call via client.resource.method()).router.ts: Backend Express Router (call via createRouter(app)).swagger.json: API Documentation in OpenAPI 3.0 standard.FAQs
CLI tool for generating KCFlow API client
We found that @kcflow/cli demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.