Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
038d14b
feat(editor): implement core editor and state management classes
amasiye Feb 11, 2026
2c0874c
feat(composer): update PHP version requirement to ^8.4
amasiye Feb 11, 2026
6ea47f5
feat(exceptions): add DebugException and SendamaConsoleException classes
amasiye Feb 14, 2026
adaf2b0
chore(composer): add atatusoft-ltd/termutil and update dependencies
amasiye Feb 14, 2026
915377e
feat(editor): add EditorStateContext and implement EditState, ModalSt…
amasiye Feb 14, 2026
c02f3c1
feat(debug): implement Debug class and LogLevel enumeration for loggi…
amasiye Feb 14, 2026
40b2219
feat(editor): enhance Editor class with game settings and state manag…
amasiye Feb 14, 2026
72affb8
feat(commands): add EditGame command for editing game configuration
amasiye Feb 14, 2026
050c26c
feat(commands): add EditGame command to command list
amasiye Feb 14, 2026
4918b25
feat(io): add Input handling to Editor
amasiye Feb 16, 2026
07b8ff2
feat(events): create EditorEvent and KeyboardEvent
amasiye Feb 16, 2026
bfd3e20
feat: create SplashScreen.php and Time.php classes
amasiye Feb 16, 2026
bbcf46b
feat(widgets): add AssetsPanel, HierarchyPanel, and InspectorPanel cl…
amasiye Feb 22, 2026
dfd8f3a
feat(editor): add EditorSceneSettings, EditorSettings, ExecutionConte…
amasiye Feb 22, 2026
2e3761a
feat(enumerations): add ChronoUnit enum for time units
amasiye Feb 22, 2026
f47e3da
feat(editor): implement placeholder methods in EditorState and derive…
amasiye Feb 22, 2026
c507aab
feat(settings): enhance GameSettings with terminal dimensions and JSO…
amasiye Feb 22, 2026
0dbb485
feat(functions): add clamp function to constrain a value within a spe…
amasiye Feb 22, 2026
b17fbd3
feat(editor): refactor EditGame and Editor classes for improved confi…
amasiye Feb 22, 2026
f6eb401
feat(dependencies): update termutil version and adjust autoload paths…
amasiye Feb 22, 2026
6ac1552
feat(scene): enhance scene generation with optional class file output…
amasiye Feb 22, 2026
c3f43e1
feat(readme): add logo and center alignment to README header
amasiye Feb 22, 2026
40a258e
feat(readme): add logo and center alignment to README header
amasiye Feb 22, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
244 changes: 124 additions & 120 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,121 +1,125 @@
# Sendama CLI — Console Application for the Sendama 2D Game Engine
by amasiye313@gmail.com

## What is it?

Sendama CLI is a console application that provides a command line interface for the Sendama 2D Game Engine. It is used to create, build, run and manage Sendama projects.

![Screenshot](docs/screenshot.png)

## Requirements

- PHP 8.3 or newer
- WSL (For Windows)
- Composer 2.7.1 or later
- Sendama 2D Game Engine

## Installation

### For Linux, BSD etc

To install Sendama CLI, run the following command in your terminal:
```bash
composer global require sendamaphp/console
```

If you haven't already, add Composer's system-wide vendor bin directory to your $PATH. This directory is at `~/.composer/vendor/bin` or `~/.config/composer/vendor/bin`.

```bash
export PATH="$PATH:$HOME/.composer/vendor/bin"
```

Alternatively, you can link the `sendama` executable to a directory that is already in your $PATH. For example, you can link it to `/usr/local/bin`:

```bash
sudo ln -s ~/.composer/vendor/bin/sendama /usr/local/bin/sendama
```

or

```bash
sudo ln -s ~/.config/composer/vendor/bin/sendama /usr/local/bin/sendama
```

Then, you can run the `sendama` command in your terminal.

```bash
sendama --help
```

### For Windows
From the WSL terminal follow Linux instructions

### OSX
From the OSX terminal follow Linux instructions

## Usage
```bash
sendama [command] [options] [arguments]
```

### Options
- `--help` or `-h` displays help for the command
- `--quiet` or `-q` suppresses output
- `--verbose` or `-v|vv|vvv` increases output verbosity
- `--version` or `-V` displays the application version
- `--ansi` or `-a` forces ANSI output
- `--no-ansi` or `-A` disables ANSI output
- `--no-interaction` or `-n` disables interaction

### Available Commands

#### Completion

Dump shell completion code for the specified shell (bash, fish, zsh, or PowerShell).
```bash
sendama completion
```

#### Help

Displays help for a command
```bash
sendama help
```

#### List

Lists commands
```bash
sendama list
```

#### Create a new project

Create a new Sendama project
```bash
sendama new:game mygame
```
or
```bash
sendama new mygame
```

#### Arguments
- `name` is the name of the project
- `directory` is the path to the project directory

### Generate a new scene
```bash
sendama generate:scene myscene
```

### Generate a new texture
```bash
sendama generate:texture mytexture
```

#### Generate a new texture with a specific size
```bash
sendama generate:texture mytexture --width=32 --height=32
<div align="center" style="margin: 32px">
<img src="logo.png" alt="Sendama 2d Game Engine" width="128" height="128" align="center">
</div>

# Sendama CLI &mdash; Console Application for the Sendama 2D Game Engine
by amasiye313@gmail.com

## What is it?

Sendama CLI is a console application that provides a command line interface for the Sendama 2D Game Engine. It is used to create, build, run and manage Sendama projects.

![Screenshot](docs/screenshot.png)

## Requirements

- PHP 8.3 or newer
- WSL (For Windows)
- Composer 2.7.1 or later
- Sendama 2D Game Engine

## Installation

### For Linux, BSD etc

To install Sendama CLI, run the following command in your terminal:
```bash
composer global require sendamaphp/console
```

If you haven't already, add Composer's system-wide vendor bin directory to your $PATH. This directory is at `~/.composer/vendor/bin` or `~/.config/composer/vendor/bin`.

```bash
export PATH="$PATH:$HOME/.composer/vendor/bin"
```

Alternatively, you can link the `sendama` executable to a directory that is already in your $PATH. For example, you can link it to `/usr/local/bin`:

```bash
sudo ln -s ~/.composer/vendor/bin/sendama /usr/local/bin/sendama
```

or

```bash
sudo ln -s ~/.config/composer/vendor/bin/sendama /usr/local/bin/sendama
```

Then, you can run the `sendama` command in your terminal.

```bash
sendama --help
```

### For Windows
From the WSL terminal follow Linux instructions

### OSX
From the OSX terminal follow Linux instructions

## Usage
```bash
sendama [command] [options] [arguments]
```

### Options
- `--help` or `-h` displays help for the command
- `--quiet` or `-q` suppresses output
- `--verbose` or `-v|vv|vvv` increases output verbosity
- `--version` or `-V` displays the application version
- `--ansi` or `-a` forces ANSI output
- `--no-ansi` or `-A` disables ANSI output
- `--no-interaction` or `-n` disables interaction

### Available Commands

#### Completion

Dump shell completion code for the specified shell (bash, fish, zsh, or PowerShell).
```bash
sendama completion
```

#### Help

Displays help for a command
```bash
sendama help
```

#### List

Lists commands
```bash
sendama list
```

#### Create a new project

Create a new Sendama project
```bash
sendama new:game mygame
```
or
```bash
sendama new mygame
```

#### Arguments
- `name` is the name of the project
- `directory` is the path to the project directory

### Generate a new scene
```bash
sendama generate:scene myscene
```

### Generate a new texture
```bash
sendama generate:texture mytexture
```

#### Generate a new texture with a specific size
```bash
sendama generate:texture mytexture --width=32 --height=32
```
2 changes: 2 additions & 0 deletions bin/sendama
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/usr/bin/env php
<?php

use Sendama\Console\Commands\EditGame;
use Sendama\Console\Commands\GenerateEvent;
use Sendama\Console\Commands\GeneratePrefab;
use Sendama\Console\Commands\GenerateScene;
Expand Down Expand Up @@ -30,6 +31,7 @@ function bootstrap(): void
$app->addCommands([
new NewGame(),
new PlayGame(),
new EditGame(),
new GeneratePrefab(),
new GenerateEvent(),
new GenerateScene(),
Expand Down
11 changes: 5 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,11 @@
"name": "sendamaphp/console",
"type": "library",
"description": "A simple CLI for creating and managing sendama-engine projects.",
"require-dev": {
"pestphp/pest": "^2.34"
},
"license": "MIT",
"autoload": {
"psr-4": {
"Sendama\\Console\\": "src/"
"Sendama\\Console\\": "src/",
"Atatusoft\\Termutil\\": "/home/amasiye/development/atatusoft/projects/external/termutil/src/"
},
"files": [
"src/Util/Functions.php"
Expand All @@ -21,10 +19,11 @@
}
],
"require": {
"php": ">=8.3",
"php": "^8.4",
"symfony/console": "^7.0",
"amasiye/figlet": "^1.2",
"vlucas/phpdotenv": "^5.6"
"vlucas/phpdotenv": "^5.6",
"atatusoft-ltd/termutil": "^1.1"
},
"config": {
"allow-plugins": {
Expand Down
Loading
Loading