Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.praison.ai/llms.txt

Use this file to discover all available pages before exploring further.

Code Mode CLI

Use Code Mode from the command line for code generation and editing.

Commands

Generate Code

praisonai-ts tools run code-mode \
  --action generate \
  --content "Create a REST API with Express" \
  --language typescript

Edit Code

praisonai-ts tools run code-mode \
  --action edit \
  --file ./src/utils.ts \
  --content "Add error handling"

Explain Code

praisonai-ts tools run code-mode \
  --action explain \
  --file ./src/complex.ts

Review Code

praisonai-ts tools run code-mode \
  --action review \
  --file ./src/api.ts

Options

OptionTypeDefaultDescription
--actionstringgenerateAction: generate, edit, explain, review
--contentstring-Description or instructions
--filestring-Target file path
--languagestringtypescriptProgramming language
--formatbooleantrueFormat output
--outputstring-Output file path

Examples

Generate Python Script

praisonai-ts tools run code-mode \
  --action generate \
  --language python \
  --content "Web scraper for news articles" \
  --output scraper.py

Refactor File

praisonai-ts tools run code-mode \
  --action edit \
  --file ./legacy.js \
  --content "Convert to modern ES6+ syntax"

Environment Variables

VariableRequiredDescription
OPENAI_API_KEYYesFor code generation