@sonacode/sona-cli
v1.0.1
Published
`sona-cli` is a simple and efficient CLI tool designed to streamline project creation, cache management, and tool upgrades. Built with [Bun](https://bun.sh), it offers a fast and modern JavaScript runtime experience.
Downloads
18
Readme
sona-cli
sona-cli is a simple and efficient CLI tool designed to streamline project creation, cache management, and tool upgrades. Built with Bun, it offers a fast and modern JavaScript runtime experience.
Features
- Create Projects: Quickly scaffold new projects using predefined templates.
- Clear Cache: Remove common cache and build folders to free up space and resolve potential issues.
- Upgrade Tool: Seamlessly upgrade
sona-clito the latest version.
Installation
To install the cli tool globally:
npm intall -g @sonacode/sona-cliUsage
Run the CLI tool using:
bun run index.tsAlternatively, after building and linking the CLI, you can use:
sona <command>Commands
1. create
Create a new project from a predefined template.
sona create- Description: Prompts you to select a project template and specify a project name.
- Templates Available:
Next.js + TypeScript (latest)Astro + Svelte
2. clear-cache
Remove common cache and build folders.
sona clear-cache- Description: Deletes directories like
.next,node_modules,.turbo,dist,build,.astro, andtestif they exist in the current working directory. - Output: Displays success or failure messages for each directory.
3. upgrade
Upgrade sona-cli to the latest version.
sona upgrade- Description: Checks for the latest version of
sona-cliand upgrades if a newer version is available. - Output: Displays the current and latest versions, along with the upgrade status.
Development
Build
To build the project, run:
bun run buildLink CLI
To link the CLI globally for testing:
bun run link-cliContributing
Contributions are welcome! Feel free to open issues or submit pull requests for new features or bug fixes.
License
This project is licensed under the MIT License.
For more information about Bun, visit Bun's official website.
