Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
99c17e7
chore: update CI workflow to trigger on nightly branch for pushes and…
itsneufox Oct 17, 2025
b573266
temp prod CI allow
itsneufox Oct 17, 2025
8b0a702
test CI for status checks
itsneufox Oct 17, 2025
17a4441
refactor: simplify CI workflow configuration and improve output messages
itsneufox Oct 17, 2025
79bee97
ci: update merge strategy for promoting nightly to production
itsneufox Oct 17, 2025
3ea6fd4
ci: refactor promotion workflow to create a dedicated branch and auto…
itsneufox Oct 17, 2025
acf2c82
ci: enhance promotion workflow by generating GitHub app token for aut…
itsneufox Oct 17, 2025
caf6ad7
ci: update pull request triggers to include production branch
itsneufox Oct 17, 2025
9ad7646
update package-lock.json with dependency version upgrades and removals
itsneufox Oct 17, 2025
12e760a
be gone emojis
itsneufox Oct 17, 2025
8d8fa3f
enhance compiler setup with standard library detection and improved l…
itsneufox Oct 17, 2025
4470981
refactor: all README
itsneufox Oct 18, 2025
d1b63e4
docs: add init presets documentation for reusable project configurations
itsneufox Oct 18, 2025
a02ae58
refactor: improve ANSI stripping logic in logger tests
itsneufox Oct 18, 2025
2217113
feat: enhance compiler setup with custom download URLs and improved s…
itsneufox Oct 18, 2025
32a415f
feat: add preset options to init command for enhanced project configu…
itsneufox Oct 18, 2025
50cd89c
feat: enhance project initialization prompts with default values and …
itsneufox Oct 18, 2025
d6fe95f
feat: improve setup command with preset loading, enhanced logging, an…
itsneufox Oct 18, 2025
de755ee
feat: extend command options with preset and compiler download URL su…
itsneufox Oct 18, 2025
7bcf8e8
feat: implement preset loading functionality for project initialization
itsneufox Oct 18, 2025
469962c
Merge branch 'nightly' into feat-itsneufox/downloads
itsneufox Jan 13, 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
122 changes: 61 additions & 61 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,61 +1,61 @@
name: CI
on:
push:
branches: [nightly]
pull_request:
branches:
- nightly
- production
workflow_dispatch:
jobs:
test:
name: Test
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
node-version: [18.x, 20.x, 22.x]
fail-fast: false
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: npm
- name: Install dependencies
run: npm ci
- name: Build
run: npm run build
- name: Run tests
run: npm test
- name: Check linting
run: npm run lint
- name: Type check
run: npm run type-check
ci-summary:
name: CI Summary
runs-on: ubuntu-latest
needs: test
if: always()
steps:
- name: CI Results
run: |
if [ "${{ needs.test.result }}" = "success" ]; then
echo "All CI tests passed."
else
echo "Some CI tests failed."
exit 1
fi
name: CI

on:
push:
branches: [nightly]
pull_request:
branches:
- nightly
- production
workflow_dispatch:

jobs:
test:
name: Test
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
node-version: [18.x, 20.x, 22.x]
fail-fast: false

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: npm

- name: Install dependencies
run: npm ci

- name: Build
run: npm run build

- name: Run tests
run: npm test

- name: Check linting
run: npm run lint

- name: Type check
run: npm run type-check

ci-summary:
name: CI Summary
runs-on: ubuntu-latest
needs: test
if: always()

steps:
- name: CI Results
run: |
if [ "${{ needs.test.result }}" = "success" ]; then
echo "All CI tests passed."
else
echo "Some CI tests failed."
exit 1
fi
237 changes: 134 additions & 103 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,103 +1,134 @@
# tapi

A command-line tool that doesn't suck for SA-MP and open.mp development.

## What's this?

Tired of wrestling with PAWN compiler setups, server configurations, and the general pain of SA-MP/open.mp development? Yeah, me too. That's why tapi exists.

It's basically a CLI that handles all the boring stuff so you can focus on actually writing code.

## Why should I care?

- **No more manual setup hell** - `tapi init` and you're coding in seconds
- **Server runs in your terminal** - like a real dev server, Ctrl+C to stop
- **Actually works cross-platform** - Windows, Linux, macOS, whatever
- **Doesn't hijack your workflow** - uses standard server configs, no lock-in
- **Clean output** - no spam unless you want it (`--verbose`)

## Getting started

```bash
# Set it up (just once)
tapi setup

# Make a project
mkdir my-gamemode && cd my-gamemode
tapi init

# Code, build, run
tapi build
tapi start # Ctrl+C to stop, that's it
```

## Commands

| Command | What it does | Docs |
|---------|--------------|------|
| `setup` | First-time configuration | [📖](src/commands/setup/README.md) |
| `init` | Create new projects | [📖](src/commands/init/README.md) |
| `build` | Compile your PAWN code | [📖](src/commands/build/README.md) |
| `start` | Run the server | [📖](src/commands/start/README.md) |
| `config` | Change settings | [📖](src/commands/config/README.md) |
| `install` | Grab packages from GitHub | [📖](src/commands/install/README.md) |
| `kill` | Emergency cleanup | [📖](src/commands/kill/README.md) |

## Global options

These work with any command:

| Option | What it does |
|--------|--------------|
| `-v, --verbose` | Show detailed debug output |
| `-q, --quiet` | Minimize console output (show only progress bars) |
| `--log-to-file` | Save logs to file for debugging |

## Daily workflow

```bash
# Start project
tapi init

# Work on code...
# (edit your .pwn files)

# Test it
tapi build
tapi start # server runs right here in terminal

# Install some library
tapi install openmultiplayer/omp-stdlib

# Debug something? Save logs to file
tapi --log-to-file build --verbose

# Back to coding...
```

## What you get

When you run `init`, you get a complete setup:
- Server (SA-MP or open.mp, your choice)
- PAWN compiler that actually works
- Proper folder structure
- VS Code integration if you want it
- Git repo with sensible .gitignore
- No weird custom configs - just standard server files

## Requirements

- Node.js (recent version)
- That's it

## Contributing

Found a bug? Got an idea? Cool, let's talk. Check the command docs to see what needs work.

## Status

This is real software that works, but it's still evolving. Don't put it on your production server (yet), but it's great for development.

---

*Stop fighting with tooling, start writing gamemodes.*
# tapi

A companion CLI for SA-MP and open.mp projects that finally treats PAWN development like modern tooling.

## Highlights

- **One-command project bootstrap** – `tapi init` scaffolds folders, compiler, server binaries, git, editor tasks.
- **Batteries-included build & run** – `tapi build` and `tapi start` reuse your existing configs; no magic wrappers.
- **Cross-platform by default** – Windows, Linux, macOS; same commands, same output.
- **Extensible via workflows** – drop `.tapi/workflows/init*.yml` in your repo to automate prompts, downloads, or company defaults.
- **Verbose when you need it, quiet otherwise** – consistent logging with `--verbose`, `--quiet`, and file logging.

## Install

> npm package availability is still in progress. For now, clone the repo or link the CLI locally.

```bash
# clone & link for local development
git clone https://github.com/itsneufox/tapi.git
cd tapi
npm install
npm run build
npm run dev # equivalent to `npm link`
```

After linking you can run `tapi` from any directory.

## Quick start

```bash
# set up global preferences once
$ tapi setup

# start a new project
dir my-gamemode && cd my-gamemode
$ tapi init

# code, rebuild, run
$ tapi build
$ tapi start # Ctrl+C to stop
```

## Commands

| Command | Purpose | Docs |
|---------|---------|------|
| `setup` | First-time configuration | [📖](src/commands/setup/README.md) |
| `init` | Create projects or reuse workflows | [📖](src/commands/init/README.md) |
| `build` | Compile PAWN sources | [📖](src/commands/build/README.md) |
| `start` | Launch the server (watch mode supported) | [📖](src/commands/start/README.md) |
| `config` | Update saved preferences | [📖](src/commands/config/README.md) |
| `install` | Fetch addons/packages | [📖](src/commands/install/README.md) |
| `kill` | Forcefully stop running servers | [📖](src/commands/kill/README.md) |

Global flags available everywhere: `--verbose`, `--quiet`, and `--log-to-file`.

## Workflows & presets

Automate init (and future commands) with workflow files located at:

```
.tapi/workflows/init.yml # default
.tapi/workflows/init-team.yml # invoked via `tapi init --preset team`
.tapi/workflows/init/team.yml # alternative naming
```

See [Init presets](docs/init-presets.md) for the full schema, placeholder list, and automation examples (custom download URLs, chained defaults, non-interactive runs).

```yaml
# .tapi/workflows/init-team.yml
description: Team defaults for staging servers
project:
name: ${folder}
description: "${user}'s staging project"
initGit: true
downloadServer: true
compiler:
downloadCompiler: true
compilerDownloadUrl: "https://internal.example.com/compiler-${platform}.zip?token=${env:TAPI_TOKEN}"
downloadStdLib: true
stdLibDownloadUrl: "https://internal.example.com/includes.zip"
options:
skipCompiler: false
acceptPreset: true
```

### Secrets

`tapi` does **not** load `.env` files automatically. Export any environment variables referenced in workflows yourself:

```bash
# bash / zsh
export TAPI_TOKEN=secret

# PowerShell
$Env:TAPI_TOKEN = 'secret'
```

## Project layout

`init` creates a ready-to-roll workspace:

```
my-project/
├── .tapi/ # tapi metadata (manifest, workflows)
├── compiler/ # optional community compiler
├── gamemodes/ # gamemode sources (.pwn / .amx)
├── filterscripts/ # filterscript sources
├── includes/ # project-specific includes
├── plugins/
├── scriptfiles/
├── qawno/ # bundled compiler from server package
├── config.json # open.mp server config
├── omp-server.exe/.sh # server binaries
└── .vscode/ # VS Code tasks & settings (optional)
```

## Additional docs

- [Init command details](src/commands/init/README.md)
- [Workflows & presets](docs/init-presets.md)
- [Command catalogue](src/commands)

## Contributing

Bugs, ideas, PRs are welcome. Check the command-specific READMEs for current limitations and TODOs, or open an issue to discuss larger changes.

## Status

`tapi` is production-quality for development workflows and actively evolving. For production servers, use at your own discretion and pin versions.

---

*Stop fighting your tooling. Build gamemodes faster.*
Loading