{"id":21488863,"url":"https://github.com/asenajs/asena-cli","last_synced_at":"2025-07-21T12:03:00.575Z","repository":{"id":261073641,"uuid":"881239973","full_name":"AsenaJs/Asena-cli","owner":"AsenaJs","description":"Asena-cli is a command-line tool designed to streamline and enhance the experience of using the Asena framework, making development faster and easier.","archived":false,"fork":false,"pushed_at":"2025-05-08T22:32:09.000Z","size":383,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-09T13:58:26.213Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AsenaJs.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-10-31T07:08:34.000Z","updated_at":"2025-05-14T02:09:19.000Z","dependencies_parsed_at":"2024-12-28T12:20:31.254Z","dependency_job_id":"e7a52512-d529-44f3-8b1f-8b28031d5677","html_url":"https://github.com/AsenaJs/Asena-cli","commit_stats":null,"previous_names":["asenajs/asena-cli"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/AsenaJs/Asena-cli","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AsenaJs%2FAsena-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AsenaJs%2FAsena-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AsenaJs%2FAsena-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AsenaJs%2FAsena-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AsenaJs","download_url":"https://codeload.github.com/AsenaJs/Asena-cli/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AsenaJs%2FAsena-cli/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265445302,"owners_count":23766445,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-23T14:12:23.420Z","updated_at":"2025-07-15T16:31:02.865Z","avatar_url":"https://github.com/AsenaJs.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1\u003e\n  \u003cimg src=\"https://avatars.githubusercontent.com/u/179836938?s=200\u0026v=4\" width=\"125\" align=\"center\"/\u003e\n\u003c/h1\u003e\n\n# Asena CLI\n\n[![Version](https://img.shields.io/badge/version-0.2.0-blue.svg)](https://asena.dev)\n[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://opensource.org/licenses/MIT)\n[![Bun Version](https://img.shields.io/badge/Bun-1.2.8%2B-blueviolet)](https://bun.sh)\n\nAsena-cli provides several command-line utilities to help developers manage their asena applications efficiently. Here's a comprehensive guide to all available commands.\n\n## 📚 Table of Contents\n- [Installation](#-installation)\n- [Getting Started](#-getting-started)\n- [Commands](#-commands)\n- [Configuration](#-configuration)\n- [Project Structure](#-project-structure)\n\n\n## 🚀 Installation\n\nPrerequisite: [Bun runtime](https://bun.sh) (v1.2.8 or higher)\n\n```bash\nbun install -g @asenajs/asena-cli\n````\n\nVerify installation:\n\n```bash\nasena --version\n```\n\n## 🏁 Getting Started\n\n3 steps to create a new project:\n\n1. Scaffold a new project:\n\n```bash\nasena create\n```\n\n2. Navigate into the project directory:\n\n```bash\ncd \u003cProject name\u003e\n```\n\n3. Start development:\n\n```bash\nasena dev start\n```\n\nYour application will be available at http://localhost:3000.\n\n## 📖 Commands\n\n### ```asena create```\n\nThe Create command bootstraps new Asena projects with a complete development environment setup.\n\n#### Features\n\n- **Interactive Setup**: Uses inquirer for a user-friendly setup experience\n- **Project Structure**: Creates the basic project structure with necessary files and directories\n- **Default Components**: Generates default controller and server setup\n- **Development Tools**: Optional integration of:\n  - ESLint configuration\n  - Prettier setup\n- **Dependency Management**: Automatically installs required dependencies\n\n### ```asena generate```\n\nNote: You can also use `asena g` as a shortcut.\n\nThe generate command allows you to quickly and consistently create project components.\n\n### Features\n\n- **Multi-Component Support**: Ability to generate controllers, services, and middlewares\n- **Automatic Code Generation**: Creates template code with base structure and necessary imports\n- **Project Structure Integration**: Places generated files in the correct directories\n- **Shortcuts**: Command aliases for faster usage (g, c, s, m)\n\n\n| **Component** | **Full Command**              | **Shortcut Command** | **Description**              |\n|---------------|-------------------------------|-----------------------|--------------------------|\n| Controller    | `asena generate controller`   | `asena g c`           | Generates a controller   |\n| Service       | `asena generate service`      | `asena g s`           | Generates a service      |\n| Middleware    | `asena generate middleware`   | `asena g m`           | Generates a middleware   |\n\n\n### ```asena dev start```\n\nThe Dev command enables development mode with enhanced debugging capabilities.\n\n#### Features\n\n- **Build Integration**: Automatically builds the project before starting\n\n### ```asena build```\n\nThe Build command handles project deployment preparation.\n\n#### Features\n\n- **Configuration Processing**: Reads and processes the Asena configuration file\n- **Code Generation**: Creates a temporary build file that combines all controllers and components\n- **Import Management**: Handles import statements and organizes them based on the project structure. No need to add controllers manually to root file\n- **Server Integration**: Processes the AsenaServer configuration and integrates components\n\n### ```asena init```\n\nThe Init command helps set up project configuration with default settings(no need if you used ```asena create```).\n\n#### Features\n\n- **Configuration Generation**: Creates `asena-config` configuration file\n- **Default Values**: Provides sensible defaults for quick start\n\n## ⚙️ Configuration\n\nCustomization via `asena.config.ts`:\n\n```typescript\nimport { defineConfig } from '@asenajs/asena'\n\nexport default defineConfig({\n    sourceFolder: 'src', // folder where the project files are located\n    rootFile: 'src/index.ts', // entry file of the project\n    buildOptions: { // build options. For more details, visit https://bun.sh/docs/bundler\n        outdir: 'dist',\n        sourcemap: 'linked',\n        target: 'bun',\n        minify: {\n            whitespace: true,\n            syntax: true,\n            identifiers: false,\n        },\n    },\n});\n```\n\n## 📂 Project Structure\n\nDefault project structure:\n\n```bash\nmy-app/\n├── src/\n│   ├── controllers/    # Route controllers\n│   ├── services/       # Business logic\n│   ├── middlewares/    # Middleware files\n│   └── index.ts        # Application entry point\n├── tests/              # Test files\n├── public/             # Static assets\n├── asena.config.ts     # Configuration\n└── package.json\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fasenajs%2Fasena-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fasenajs%2Fasena-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fasenajs%2Fasena-cli/lists"}