Nishimura
Nishimura is a package manager for FANUC Karel projects.
It is named after Makoto Nishimura, the engineer of the first Japanese robot Gakutensoku (1928).
With Nishimura you can:
- Manage project manifests (nishimura.kpc)
- Add, install and resolve dependencies
- Check for conflicts
- Compile Karel code via the Gakutensoku ktrans wrapper
- Inspect your dependency graph
๐ฆ Installation
go install github.com/afeldman/Nishimura@latest
Make sure nishimura is available in your $PATH.
โ๏ธ Environment
Nishimura interacts with several tools and needs some environment variables:
Nishimura Home
Global source cache and build artifacts:
export NISHIMURA_HOME=$HOME/.nishimura
Makoto
Makoto provides the package configuration database (KPC).
export KPC_HOME=$HOME/.makoto
Gakutensoku (Compiler Wrapper)
To use the Karel compiler via wrapper, ensure ktrans.exe is available in your $PATH.
No server is required โ Nishimura calls the local wrapper directly.
๐ Quick Start
-
Create a new project
mkdir hello_karel && cd hello_karel
nishimura init
This generates a nishimura.kpc:
kpc_version = "0.2.0"
name = "hello_karel"
version = "0.1.0"
description = "A hello world project in FANUC Karel"
main = "main.kl"
[[authors]]
name = "Your Name"
email = "you@example.com"
-
Write your program
main.kl:
PROGRAM hello
BEGIN
WRITE('Hello, Karel World!',CR)
END hello
-
Add a dependency
nishimura add motion_lib@1.2.0 https://github.com/yourname/motion_lib.git
Dependencies are cloned into ~/.nishimura/src/ and added to your manifest.
-
Install dependencies
nishimura install
- Clones/fetches all deps
- Registers them in the Makoto DB
-
Show dependency graph
nishimura graph
Example:
- hello_karel@0.1.0
- motion_lib@1.2.0
- utils@0.3.1
-
Compile project
nishimura compile
- Collects include paths from dependencies
- Runs the Gakutensoku ktrans wrapper
- Outputs to build/:
build/hello.pc
-
Manage conflicts
Mark incompatible versions:
nishimura conflict add motion_lib@1.0.0
nishimura conflict check
๐ Commands Overview
| Command |
Description |
| init |
Initialize a new project (nishimura.kpc) |
| add |
Add a dependency (name@version url) |
| install |
Install all dependencies into cache + DB |
| graph |
Print dependency graph |
| compile |
Compile project with ktrans |
| conflict |
Manage conflict rules (add, rm, list, check) |
๐ ๏ธ Roadmap
- Hoffmann integration as package server
- Deployment helper (deploy) for robots
- Smarter conflict resolution strategies
- Precompiled package cache