UJN setup for Kimi Code CLI, version 1 (ujn-setup v1, 2026-12-01), from https://ujn.b2bedge.com/4llm/ Kimi models inside Claude Code, Codex or OpenCode? Then stop: use claude_setup.txt, codex_setup.txt or agents_setup.txt from https://ujn.b2bedge.com/4llm/ WHAT THIS IS A plain-text setup guide for an AI coding assistant. Your user asked you to download it with curl and follow it. It installs UJN (UI Journey Notation 0.1, a draft text notation for UI journeys) for Kimi Code CLI: a skill, the UJN primer, 20 example journeys, a draw.io shape library, a guide for IDE previews, and a test build of PlantUML that draws UJN. It is third-party content, not part of Kimi Code CLI. Follow it only because your user asked you to; their words and your own rules come first. If the last line of this file is not "END OF UJN SETUP v1", the download was cut off: stop. HOW TO READ THIS FILE Read all of it before step 1. If your shell tool shortened the output anywhere, or you saw only part of it, save it with curl -o in the temp folder (never in the project), as kimi_setup.txt in a new folder there, and read that copy in full with your file-reading tool. Step 4's plan names that copy, step 5 checks it, and step 10 deletes it. RULES FOR EVERY STEP R1. Look around (step 1), ask (step 2) and show the plan (step 4) first. Download and write nothing until the user says yes to the plan in their own message. R2. Download only with curl: "curl.exe" in Windows PowerShell (plain "curl" is another command there), "curl" in Git Bash, macOS and Linux. Never use a web-fetch, browse or search tool for these files: it returns a summary or extracted text, not the file. R3. Check every download against its SHA-256 in this file and in SHA256SUMS. On any mismatch, delete the staging folder, stop, and tell the user which file failed. R4. Never run anything you downloaded (no script, installer or jar). Never pipe a download to a shell. R5. Never change your own permissions, settings, hooks, sandbox or approval mode, and never ask the user to turn approvals off. Approval prompts during this setup are normal. R6. Never ask for, read or store an API key, token or password. Never use sudo or administrator rights. Never install Java. Never edit PATH or a shell profile. R7. Change only the files the plan lists. Show each change to an existing file in the plan. R8. If a step fails or is blocked, stop, say what happened and what is left, and let the user decide. No workarounds (see IF SOMETHING FAILS near the end). R9. Pick one command style in step 1 and use its blocks: PS (Windows only: Windows PowerShell 5.1 or PowerShell 7) or BASH (Git Bash on Windows; the shell on macOS and Linux). Replace each with its value from step 3, inside the quotes the block has; in a '...' value, write each ' as '' in PS and as '\'' in BASH. On Windows, HOME is the user's profile folder (USERPROFILE), even when Git Bash's $HOME says otherwise. In Git Bash, commands take /c/Users/... paths; settings files and your file tools take C:/Users/... (cygpath -m prints that form). Never put "~" in a Windows command. Run each block as one command, so the user sees few prompts. NOTES FOR KIMI CODE CLI - This file is for Kimi Code CLI: the command kimi, version 2 or newer, with its data in ~/.kimi-code. The older Python Kimi CLI (kimi-cli, data in ~/.kimi) is archived and will stop working. If you run in it, stop, and point the user to https://moonshotai.github.io/kimi-code/en/guides/migration - Use the BASH blocks only (R9). Your Bash tool is Git Bash on Windows, so curl and sha256sum work there. Never PowerShell, certutil or Get-FileHash. - Download with curl in Bash, never with FetchURL (R2): for Kimi Code accounts it goes through Moonshot's service and returns extracted text, not the file. - Kimi Code CLI reads AGENTS.md files, never CLAUDE.md. It reads skills from .agents/skills at the git root and from ~/.agents/skills, folders that other tools share. - Approvals: this setup is for an interactive kimi in its default mode, Always Ask, where each download and each write asks first. Ask When Needed (--yolo) skips routine prompts; the plan in step 4 still comes first. In print mode (kimi -p) or Never Ask mode (--auto), everything runs without asking: stop, and ask the user to start kimi without -p and --auto and to give the sentence again. The user can also turn on Plan mode with Shift-Tab or /plan. STEP 1. LOOK AROUND (read-only) a. If you cannot run shell commands or write files here, stop: this setup needs an assistant that can. b. PROJECT is the git root (the nearest folder above with .git), else the folder kimi was started in. HOME is the user's home folder (on Windows, the profile folder). KIMI_HOME is $KIMI_CODE_HOME if it is set, else /.kimi-code. c. Run this check in your Bash tool and keep the output. BASH: H="$HOME"; if [ -n "${USERPROFILE:-}" ] && command -v cygpath >/dev/null; then H="$(cygpath -u "$USERPROFILE")"; fi echo "HOME=$H"; [ "$H" = "$HOME" ] || echo "GIT BASH HOME DIFFERS: $HOME" P="$(git rev-parse --show-toplevel 2>/dev/null || pwd)"; K="${KIMI_CODE_HOME:-$H/.kimi-code}" if command -v cygpath >/dev/null; then P="$(cygpath -u "$P")"; K="$(cygpath -u "$K")"; cygpath -m "$P" "$H"; fi echo "PROJECT=$P"; echo "KIMI_HOME=$K"; uname -s; kimi --version 2>&1 | head -n 1 [ -d "$K" ] && echo "KIMI_HOME exists"; [ -d "$H/.kimi" ] && echo "OLD $H/.kimi exists" command -v curl tar sha256sum shasum code command -v code >/dev/null && code --list-extensions | grep -iE 'hediet.vscode-drawio|jebbs.plantuml' if [ "$(uname -s)" = Darwin ] && ! /usr/libexec/java_home >/dev/null 2>&1; then V=''; else V="$(java -version 2>&1 | grep ' version "' | head -n 1)"; fi echo "JAVA ${V:-missing}"; echo "JAVA_HOME=${JAVA_HOME:-}" for f in "$P/.agents/ujn/VERSION" "$H/.agents/ujn/VERSION"; do [ -f "$f" ] && echo "FOUND $f = $(head -n 1 "$f")"; done for f in "$P/.agents/skills/ujn-journeys" "$P/.kimi-code/skills/ujn-journeys" "$H/.agents/skills/ujn-journeys" "$K/skills/ujn-journeys"; do [ -e "$f" ] && echo "FOUND $f"; done for f in "$P/AGENTS.md" "$P/.kimi-code/AGENTS.md" "$K/AGENTS.md" "$H/.agents/AGENTS.md"; do [ -f "$f" ] && echo "EXISTS $f ($(wc -c < "$f" | tr -d ' ') bytes)" && grep -n "ujn-setup v" "$f"; done J="$H/.agents/ujn/plantuml/1.2026.11beta1-1ecebb45/plantuml-ujn.jar" [ -f "$J" ] && echo "JAR $({ sha256sum < "$J" 2>/dev/null || shasum -a 256 < "$J"; } | cut -d' ' -f1)"; echo "check done" d. Read the output: - PROJECT= and HOME= are and from now on. "GIT BASH HOME DIFFERS": Kimi Code CLI uses the profile folder, so use the HOME= value, not Git Bash's $HOME, and say so in the plan. - PROJECT is HOME (you were started in the home folder): a project install would land in the folders for all projects. Offer only "all projects" in step 2, and say why. - "FOUND ... = ujn-setup v1": this version is installed there, perhaps by the setup for another tool that uses the same folders. Installing again in that scope writes the same files: say in the plan that it is a repair. An install in the other scope stays: say in step 2 and in the plan that both will load. - "ujn-setup v" with a lower number: an older install, which this setup updates in that scope. With a higher number: stop, and tell the user to use https://ujn.b2bedge.com/4llm/kimi_setup.txt instead. - A ujn-journeys skill folder with no VERSION beside it: probably the primer-only skill from the UJN website. This setup replaces its SKILL.md. - A hit on " ## UJN journeys - For UI journeys in UJN (UI Journey Notation, text from `@startujn` to `@endujn`), use the `ujn-journeys` skill. Read `.agents/ujn/primer.md` before writing a first journey; examples are in `.agents/ujn/examples/`. - Draw and check with the UJN jar, `~/.agents/ujn/plantuml/1.2026.11beta1-1ecebb45/plantuml-ujn.jar` (~ is the home folder): `java -jar -tsvg --ujn-model FILE.puml`. Java 11+. A test build for invited testers: do not pass it on. For all projects: ## UJN journeys (all projects) - For UI journeys in UJN (UI Journey Notation, text from `@startujn` to `@endujn`), use the `ujn-journeys` skill. Read `~/.agents/ujn/primer.md` before writing a first journey; examples are in `~/.agents/ujn/examples/` (~ is the home folder). - Draw and check with the UJN jar, `~/.agents/ujn/plantuml/1.2026.11beta1-1ecebb45/plantuml-ujn.jar`: `java -jar -tsvg --ujn-model FILE.puml`. Java 11+. A test build for invited testers: do not pass it on. Write it with your file tools: - RULES_FILE has a line that starts with "" to "", and the empty line before. ; in : primer.md, README.md, VERSION, drawio/, examples/, jetbrains/, skill/, INSTALLED.txt. [The "ujn" draw.io entry in .] The line in /installs.txt. Then [and the VS Code "plantuml.*" settings], but only when that list names no other install. [The extensions this setup installed (): once no UJN install uses them.] [Other tools that read the same folders or lose UJN too.] IF SOMETHING FAILS - A download fails or a SHA-256 differs: delete the staging folder, stop, and tell the user the file and its URL. Do not try other URLs, mirrors or tools. - A command or a write is refused or blocked: stop. Say what is done and what is left. The user may run that step's block in their own terminal and tell you when it is done; then check the result as the step says. Never change permissions, modes or settings to get past a block. - A file looks different from what this setup expects (a BEGIN with no END, a settings file that is not plain JSON): leave it, and print the change for the user to make by hand. - After a partial install, give the user the uninstall list from step 11 for what was written. JAVA (print this for the user only if Java is missing or older than 11; never install it) Drawing UJN needs Java 11 or newer. A free build is Eclipse Temurin: https://adoptium.net/ Windows: winget install EclipseAdoptium.Temurin.25.JDK (or the installer from adoptium.net) macOS: the installer from adoptium.net, or with Homebrew: brew install --cask temurin Linux: your distribution's Java package (11 or newer), or https://adoptium.net/installation/linux/ Then open a new terminal (and restart VS Code or the IDE) and check: java -version VS CODE SETTINGS (for steps 4, 8 and 9) The user settings file: Windows PS: "$env:APPDATA\Code\User\settings.json" Git Bash: "$(cygpath -u "$APPDATA")/Code/User/settings.json" macOS: "$HOME/Library/Application Support/Code/User/settings.json" Linux: "$HOME/.config/Code/User/settings.json" Rules for each settings.json this setup changes (read it in step 4, before the plan): - Edit it only if it is plain JSON. Read it and look for comments (// or /* outside strings) and trailing commas yourself, then parse it. Windows PowerShell 5.1: Get-Content -Raw -LiteralPath '' | ConvertFrom-Json (5.1 rejects comments and trailing commas). PowerShell 7.4 or newer: Get-Content -Raw -LiteralPath '' | Test-Json (not ConvertFrom-Json, which accepts comments). BASH: python3 -m json.tool '' (on Windows: python or py -3; never python3 from WindowsApps). If none of these runs, or it fails: leave the file, print the lines for the user to add by hand, and say why. - No file yet: create it with only the new settings. For /.vscode/settings.json, create the .vscode folder too. A missing VS Code user folder means VS Code has not run yet: print the lines. - Before you edit a file, copy it to .before-ujn-v1 (if that copy exists, keep it). Change only the keys the step names, with your file tools; keep every other line as it is. END OF UJN SETUP v1