https://github.com/vaibav03/genjs-cli
https://github.com/vaibav03/genjs-cli
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/vaibav03/genjs-cli
- Owner: vaibav03
- Created: 2025-01-12T06:09:58.000Z (3 months ago)
- Default Branch: master
- Last Pushed: 2025-02-14T06:17:23.000Z (2 months ago)
- Last Synced: 2025-02-14T06:25:50.197Z (2 months ago)
- Language: JavaScript
- Size: 122 KB
- Stars: 5
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-AI-driven-development - genjs-cli - a command-line tool that interacts with the Anthropic API to generate code templates based on custom prompts. (Uncategorized / Uncategorized)
README
# genjs-cli
`genjs-cli` is a command-line tool that interacts with the [Anthropic API](https://www.anthropic.com/) to generate code templates based on custom prompts. This tool helps developers quickly create React and Node.js applications. With simple commands, you can initialize your project, set an API key, and clear previously generated files.
---
## Features
- **Initialize Projects**: Set your API key and custom prompts to generate code templates.
- **Interact with the Anthropic API**: Use custom prompts to generate Node.js and React code.
- **Persistent API Key**: The API key is saved in the local storage, so you don’t have to input it repeatedly.
- **Interactivity**: During the `init` command, users are prompted for the API key and custom prompt if they haven't been set.
- **File Clearing**: With `clear`, users can remove all generated files with a confirmation prompt.---
## Installation
To get started with `genjs-cli`, follow these steps:
1. **Install dependencies** globally using npm:
```bash
npm install genjs-cli -g
```
---## Usage
### `init` Command
Running `npx genjs-cli init` allows the user for setting up the API key and prompt interactively.

#### Options:
- `-a, --api_key `: Set your Anthropic API key (optional, will prompt if not provided).
- `-p, --prompt `: Provide your custom prompt for code generation.#### Example:
```bash
npx genjs-cli init -a YOUR_API_KEY -p "Generate a React component that fetches data from an API"
```### clear command:
```bash
npx genjs-cli clear
```Clears all files in your directory