niahere 0.2.2 → 0.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/bin/nia CHANGED
@@ -1,11 +1,22 @@
1
1
  #!/bin/sh
2
2
  if ! command -v bun >/dev/null 2>&1; then
3
3
  echo "niahere requires Bun runtime."
4
- echo ""
5
- echo "Install Bun:"
6
- echo " curl -fsSL https://bun.sh/install | bash"
7
- echo ""
8
- echo "Then run: nia $*"
9
- exit 1
4
+ printf "Install Bun now? (y/n) "
5
+ read -r answer
6
+ if [ "$answer" = "y" ] || [ "$answer" = "Y" ]; then
7
+ curl -fsSL https://bun.sh/install | bash
8
+ export BUN_INSTALL="$HOME/.bun"
9
+ export PATH="$BUN_INSTALL/bin:$PATH"
10
+ if ! command -v bun >/dev/null 2>&1; then
11
+ echo "Bun install failed. Install manually: curl -fsSL https://bun.sh/install | bash"
12
+ exit 1
13
+ fi
14
+ echo "Bun installed. Continuing..."
15
+ else
16
+ echo ""
17
+ echo "Install manually: curl -fsSL https://bun.sh/install | bash"
18
+ echo "Then run: nia $*"
19
+ exit 1
20
+ fi
10
21
  fi
11
22
  exec bun "$(dirname "$0")/../src/cli/index.ts" "$@"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "niahere",
3
- "version": "0.2.2",
3
+ "version": "0.2.3",
4
4
  "description": "A personal AI assistant daemon — scheduled jobs, chat across Telegram and Slack, persona system, and visual identity.",
5
5
  "type": "module",
6
6
  "scripts": {
@@ -22,15 +22,15 @@ Generate photorealistic images of Nia with consistent identity across different
22
22
 
23
23
  The script looks for references in this order:
24
24
  1. `~/.niahere/images/reference.png` — user's custom reference (takes priority)
25
- 2. `assets/nia-reference.jpg` — default shipped with niahere
25
+ 2. `assets/nia-reference.webp` — default shipped with niahere
26
26
 
27
27
  | Location | Purpose |
28
28
  |----------|---------|
29
29
  | `~/.niahere/images/reference.png` | User's reference image |
30
30
  | `~/.niahere/images/profile.png` | User's profile picture (for Telegram/Slack) |
31
31
  | `~/.niahere/images/` | Output directory for new generations |
32
- | `assets/nia-reference.jpg` | Default reference (fallback) |
33
- | `assets/nia-profile.jpg` | Default profile picture (fallback) |
32
+ | `assets/nia-reference.webp` | Default reference (fallback) |
33
+ | `assets/nia-profile.webp` | Default profile picture (fallback) |
34
34
 
35
35
  ## Generation Script
36
36
 
@@ -39,7 +39,7 @@ The script looks for references in this order:
39
39
  ### Basic Usage
40
40
 
41
41
  ```bash
42
- # With reference (default — uses assets/nia-reference.jpg)
42
+ # With reference (default — uses assets/nia-reference.webp)
43
43
  python3 scripts/generate_image.py --prompt "your prompt here"
44
44
 
45
45
  # Without reference (for creating new base images)
@@ -58,7 +58,7 @@ python3 scripts/generate_image.py \
58
58
  | Flag | Default | Description |
59
59
  |------|---------|-------------|
60
60
  | `--prompt` | Default Nia portrait | Image generation prompt |
61
- | `--reference` | `assets/nia-reference.jpg` | Reference image for identity |
61
+ | `--reference` | `assets/nia-reference.webp` | Reference image for identity |
62
62
  | `--no-reference` | false | Generate without reference |
63
63
  | `--model` | `gemini-3.1-flash-image-preview` | Gemini model |
64
64
  | `--aspect-ratio` | `3:4` | Output ratio |
@@ -25,7 +25,7 @@ DEFAULT_MODEL = "gemini-3.1-flash-image-preview"
25
25
  PRO_MODEL = "gemini-3-pro-image-preview"
26
26
  BASIC_MODEL = "gemini-2.5-flash-image"
27
27
  USER_REFERENCE = str(NIA_HOME / "images" / "reference.png")
28
- DEFAULT_REFERENCE = str(PROJECT_ROOT / "assets" / "nia-reference.jpg")
28
+ DEFAULT_REFERENCE = str(PROJECT_ROOT / "assets" / "nia-reference.webp")
29
29
  DEFAULT_OUTPUT = str(NIA_HOME / "images")
30
30
  DEFAULT_PROMPT = (
31
31
  "Generate a warm, natural portrait matching the reference image. "
@@ -300,7 +300,7 @@ export async function runInit(): Promise<void> {
300
300
  const imagesDir = `${home}/images`;
301
301
  mkdirSync(imagesDir, { recursive: true });
302
302
  const hasUserReference = existsSync(`${imagesDir}/reference.png`);
303
- const hasDefaultReference = existsSync(`${SKILL_ASSETS_DIR}/nia-reference.jpg`);
303
+ const hasDefaultReference = existsSync(`${SKILL_ASSETS_DIR}/nia-reference.webp`);
304
304
 
305
305
  if (geminiApiKey && !hasUserReference) {
306
306
  const setupVisual = await ask(rl, "\nGenerate a visual identity for your agent? (y/n)", "y");
@@ -342,10 +342,10 @@ export async function runInit(): Promise<void> {
342
342
  } else if (hasDefaultReference) {
343
343
  // No description — copy defaults
344
344
  const { copyFileSync } = await import("fs");
345
- copyFileSync(`${SKILL_ASSETS_DIR}/nia-reference.jpg`, `${imagesDir}/reference.png`);
345
+ copyFileSync(`${SKILL_ASSETS_DIR}/nia-reference.webp`, `${imagesDir}/reference.png`);
346
346
  console.log(` \u2713 copied default reference image`);
347
- if (existsSync(`${SKILL_ASSETS_DIR}/nia-profile.jpg`)) {
348
- copyFileSync(`${SKILL_ASSETS_DIR}/nia-profile.jpg`, `${imagesDir}/profile.png`);
347
+ if (existsSync(`${SKILL_ASSETS_DIR}/nia-profile.webp`)) {
348
+ copyFileSync(`${SKILL_ASSETS_DIR}/nia-profile.webp`, `${imagesDir}/profile.png`);
349
349
  console.log(` \u2713 copied default profile picture`);
350
350
  }
351
351
  }