Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.1.4] - 2026-03-10

### Added

- `unoff create` now automatically runs `git init` in the newly created plugin directory if git is available
- README: new **Prerequisites** section documenting required software (Node.js ≥ 18, npm ≥ 9, git)

## [0.1.3] - 2026-03-06

### Added
Expand Down Expand Up @@ -80,6 +87,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- 🚧 Sketch plugin template (coming soon)
- 🚧 Framer plugin template (coming soon)

[0.1.4]: https://github.com/yelbolt/unoff-cli/compare/v0.1.3...v0.1.4
[0.1.3]: https://github.com/yelbolt/unoff-cli/compare/v0.1.2...v0.1.3
[0.1.2]: https://github.com/yelbolt/unoff-cli/compare/v0.1.1...v0.1.2
[0.1.1]: https://github.com/yelbolt/unoff-cli/compare/v0.1.0...v0.1.1
Expand Down
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

A CLI tool to quickly scaffold plugins for Figma, Penpot, Sketch, and Framer with built-in development tools and best practices.

## Prerequisites

- **Node.js** ≥ 18
- **npm** ≥ 9
- **git** — required for `unoff create` (initializes a git repository) and for all `unoff add` commands (workers, skills, specs use git submodules)

## Installation

Install globally:
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@unoff/cli",
"version": "0.1.3",
"version": "0.1.4",
"description": "A CLI tool to create plugins for Figma, Penpot, Sketch, and Framer",
"main": "dist/index.js",
"type": "module",
Expand Down
19 changes: 18 additions & 1 deletion src/commands/create.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import ora from 'ora'
import inquirer from 'inquirer'
import Mustache from 'mustache'
import { fileURLToPath } from 'url'
import { spawnSync } from 'child_process'

const __filename = fileURLToPath(import.meta.url)
const __dirname = path.dirname(__filename)
Expand Down Expand Up @@ -262,7 +263,23 @@ export async function createPlugin(platform: string) {
await fs.writeFile(globalConfigPath, configContent, 'utf-8')
}

spinner.succeed(chalk.green('Plugin created successfully!'))
// Initialize git repository
const gitCheck = spawnSync('git', ['--version'], { encoding: 'utf-8' })
if (gitCheck.status === 0) {
const gitInit = spawnSync('git', ['init'], {
cwd: outputDir,
encoding: 'utf-8',
})
if (gitInit.status === 0) {
spinner.succeed(chalk.green('Plugin created successfully! Git repository initialized.'))
} else {
spinner.succeed(chalk.green('Plugin created successfully!'))
console.warn(chalk.yellow('⚠️ Could not initialize git repository. Run `git init` manually.'))
}
} else {
spinner.succeed(chalk.green('Plugin created successfully!'))
console.warn(chalk.yellow('⚠️ git is not available. Run `git init` manually before using `unoff add`.'))
}

console.log(chalk.cyan('\n📦 Next steps:\n'))
console.log(chalk.white(` cd ${pluginSlug}`))
Expand Down
Loading