cli-commands

A command-line interface for creating and developing Koapp projects. It provides commands for starting projects, generating code, and handling HTTP-related utilities.

In plain words
What is it for?
Use it to initialize a new application, generate components, run HTTP utilities, and develop or extend commands stored in the project's commands directory.
Why use it?
It removes the need to assemble the initial project structure and configuration by hand. Generated projects include common service, database, package, and Docker setup files.

Cursor rule for Codex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add rules/axiosleo/node-koapp/cli-commands
Clone the repo
git clone --depth 1 https://github.com/AxiosLeo/node-koapp

Made for: Codex.

Per session 0 Nothing until a file matches its globs; then the whole rule loads.
When invoked 422 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.00422
Opus 5 $0.00000 $0.00211
Sonnet 5 $0.00000 $0.00084
Haiku 4.5 $0.00000 $0.00042

Measured yesterday against content hash fce0aba5c550, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

cli-commands scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.agents/rules/cli-commands.mdc · 70 lines

What it actually says

CLI Command Patterns

CLI Entry Point

The main CLI is defined in bin/koapp.js and provides:

  • koapp init <app-name> - Initialize new project
  • koapp gen - Generate code/components
  • koapp http - HTTP-related utilities

Command Structure

Commands are implemented in the commands/ directory:

Project Initialization

The init command creates new projects using templates from assets/tmpl/:

npx @axiosleo/koapp init <app-name> -d <optional-dir>

This generates:

  • TypeScript service structure
  • Database configuration
  • Docker compose setup
  • Package.json with dependencies
  • Basic application structure

Template System

Templates use .tmpl extension and are processed during project generation:

  • assets/tmpl/services/ - Service templates
  • assets/tmpl/database/ - Database setup
  • assets/tmpl/docker-compose.yml.tmpl - Docker configuration
  • assets/tmpl/package.json.tmpl - Package configuration

Command Development

When creating new CLI commands:

  1. Create command file in commands/ directory
  2. Extend base Command class from @axiosleo/cli-tool
  3. Implement exec(args, options) method
  4. Register command in main CLI file

Usage Examples

# Initialize new project
npx @axiosleo/koapp init my-app

# Initialize in specific directory
npx @axiosleo/koapp init my-app -d ./projects

# Show help
npx @axiosleo/koapp init -h
Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 70 lines · 0 tokens per session scan A fce0aba5c550

Subscribe to this mod's changes

cli-commands is a cursor rule published in the GitHub repository AxiosLeo/node-koapp (129 stars, last pushed 18d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 422 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.