akai-cli
v0.2.1
Published
CLI tool for managing the Akai engine in Docker
Maintainers
Readme
Akai CLI
CLI tool for managing the Akai engine in Docker. Built with TypeScript, this tool provides a simple interface to set up, manage, and monitor Docker containers running the Akai engine.
🚀 Features
- TypeScript-based: 100% TypeScript source code
- Visual CLI: Beautiful output with colors, spinners, and boxed messages
- Docker Management: Easy setup and management of Docker containers
- Service Support: Extensible architecture for multiple services
- Idempotent Operations: Safe to run multiple times
📋 Prerequisites
- Node.js >= 14.0.0
- Docker installed and running
- npm or yarn
🛠️ Development
Install Dependencies
npm installBuild the Project
Compiles TypeScript to JavaScript in the dist/ folder:
npm run buildLocal Testing
To test the CLI locally without publishing:
Build the project:
npm run buildLink globally (for development):
npm linkThis creates a global symbolic link that allows you to use the
akaicommand from anywhere.Test the commands:
akai help akai setup akai status akai restartUnlink (when you're done testing):
npm unlink -g akai-cli
Run Directly (without linking)
You can also run the CLI directly without linking:
npm start
# or
node dist/index.js helpDevelopment with Watch Mode
For continuous development, you can use tsc in watch mode:
npx tsc --watchIn another terminal, run the CLI after each change:
npm start📦 Publishing
Preparation for Publishing
Verify everything is built:
npm run buildCheck git status:
git statusUpdate the version:
Edit
package.jsonand update theversionfield following Semantic Versioning:MAJOR.MINOR.PATCH(e.g.,0.1.0→0.2.0for new features)- Or use
npm version:npm version patch # 0.0.1 → 0.0.2 npm version minor # 0.0.1 → 0.1.0 npm version major # 0.0.1 → 1.0.0
Verify required files are included:
Make sure these files/directories are in the repository:
dist/(compiled code)dockerfiles/(static Dockerfiles)package.jsonREADME.md
Publish to npm
Login to npm (if first time):
npm loginVerify you're authenticated:
npm whoamiPublish:
npm publishTo publish as public (if scope is private):
npm publish --access publicVerify the publication:
npm view akai-cli
Publish a Beta/Pre-release Version
npm version prerelease --preid=beta
npm publish --tag betaUsers can install with:
npm install -g akai-cli@betaUpdate After Publishing
- Commit and push changes:
git add . git commit -m "chore: bump version to X.X.X" git push git push --tags # If you used npm version
📝 Available Commands
Once installed (globally or linked), you can use:
akai help # Show help
akai setup # Initial setup
akai setup --service <name> # Setup with custom service
akai status # Container status
akai status --service <name> # Status with custom service
akai restart # Restart container
akai restart --service <name> # Restart with custom service🏗️ Project Structure
akai-cli/
├── dockerfiles/ # Static Dockerfiles per service
│ └── akai-engine/
│ └── Dockerfile
├── src/ # TypeScript source code
│ ├── commands/ # CLI commands
│ ├── config/ # Configuration and constants
│ ├── services/ # Services (Docker, Git)
│ ├── utils/ # Utilities (Output)
│ └── index.ts # Entry point
├── dist/ # Compiled code (generated)
├── package.json
├── tsconfig.json
└── README.md🔧 Available Scripts
npm run build- Compile TypeScript to JavaScriptnpm start- Run the compiled CLInpm test- Run tests (placeholder)npm run lint- Run linter (placeholder)
📚 Resources
🤝 Contributing
- Fork the project
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'feat: Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
📄 License
ISC
