cocode-ai
v1.1.0
Published
CoCode AI Studio CLI - Your AI-powered code assistant in the terminal.
Maintainers
Readme
CoCode AI CLI (NPM Package)
This is a command-line interface (CLI) for interacting with the CoCode AI Studio backend, designed to be published as an NPM package.
Installation
To install the CLI globally, run:
npm install -g cocode-aiAlternatively, you can install it locally for development:
# Navigate to the cocode-cli directory
cd cocode-cli
# Install dependencies
npm install
# Link the package for local development
npm linkUsage
The CLI provides several commands to interact with the backend services.
General Help
cocode --helpAI Assistant (Chat)
cocode chat "Your message to the AI"
cocode chat "Buatkan component React untuk form login" --project-type reactGenerate a New Project
cocode generate --name "My New App" --req "A simple todo list application" --feat "Add, remove, and mark todos as complete" --framework nextjsFix a Piece of Code
You can pass the code directly or use the --file option.
cocode fix --error "Syntax error on line 5" --code "function hello() { console.log('hello' "
cocode fix --error "Missing semicolon" --file "path/to/your/file.js" --reqs "Ensure code is ES6 compliant"Manage Workspaces
# List all your projects
cocode workspaces list
# Load details about a specific workspace
cocode workspaces load <PROJECT_ID>Manage Previews
# List all your previews
cocode previews list
# Create a new preview for a project
cocode previews create <PROJECT_ID>